1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
|
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
"http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
]>
<book label="langupdate" status="0.0.6">
<bookinfo>
<title>langupdate</title>
<copyright>
<year>2006-2008</year>
<holder>Neil Williams</holder>
</copyright>
<date>Thu Jan 8 21:04:16 GMT 2009</date>
<releaseinfo>Release: 0.0.6</releaseinfo>
<legalnotice id="GPL">
<title>The GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007</title>
<para>This documentation is part of langupdate.</para>
<para>langupdate is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.</para>
<para>This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.</para>
<para>You should have received a copy of the GNU General Public License
along with this program. If not, see
<ulink url="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</ulink>.
</para>
<note>
<para>You can find a copy of the GNU General
Public Licence in the <filename>COPYING</filename>
file in the langupdate source or installed (e.g. in
/usr/share/doc/langupdate/) by your distribution.</para>
</note>
</legalnotice>
</bookinfo>
<chapter label="1" id="manpages"><title>LANGUPDATE</title>
<refentry id="langupdate">
<refentryinfo>
<productname>LANGUPDATE</productname>
<productnumber>1</productnumber>
</refentryinfo>
<refmeta>
<refentrytitle>langupdate</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo>Copyright FSF 1996-2006</refmiscinfo>
</refmeta>
<refnamediv>
<refname>langupdate</refname>
<refpurpose>
An apt frontend for the Emdebian implementation of 'tdebs'
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>langupdate</command>
<arg>
<group>
<arg>-n</arg> <arg>--dry-run </arg>
</group>
</arg>
<arg>
<group>
<arg>--suite</arg>
</group>
<replaceable>string</replaceable>
</arg>
<arg>
<group>
<arg>-r</arg>
<arg>--autoremove</arg>
</group>
</arg>
<arg>
<group>
<arg>-m</arg>
<arg>--mirror</arg>
</group>
<replaceable>string</replaceable>
</arg>
<arg>
<group>
<arg>-v</arg>
<arg>--verbose</arg>
</group>
<replaceable>integer</replaceable>
</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>langupdate</command>
<arg choice="req">
<group>
<arg>-?</arg>
<arg>-h</arg>
<arg>--help</arg>
<arg>--version</arg>
</group>
</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><emphasis>langupdate</emphasis> is a method for synchronising
the translation file support with the list of installed packages and
the list of locales supported on their own machine.
</para>
<para><emphasis>langupdate</emphasis> uses a temporary file for the
sources.list and updates it from the list of supported locales each
time langupdate is run, i.e. it combines the effects of
<computeroutput>apt-get update</computeroutput> with
<computeroutput>apt-get upgrade</computeroutput>. tdeb packages have
no dependencies so 'dist-upgrade' is not required.
</para>
</refsect1>
<refsect1>
<title>Purpose</title>
<para>Emdebian TDebs provide a method for splitting all translation files out of
packages and into separate TDeb packages, organised by the locale root and
source package. This allows individual users to only install translations
files for the locales supported on their own machine and only for the
packages installed at the time.</para>
<para>Note that this functionality is not available for Debian TDebs
and <command>langupdate</command> does not install any translation
packages if only Debian packages are installed as these already contain
all the translation files.</para>
<para><command>langupdate</command> is intended to support Emdebian Grip
where Emdebian packages can be mixed with Debian packages.
</para>
<refsect2>
<title>Disc space is not cheap</title>
<para>Debian packages collate all available translations into a
single package which can easily lead to 250Mb of unused translation
files on a typical installation. Emdebian generates a single
package for every translation of each Emdebian package, leading
to a tenfold increase in the number of binary packages built from
each source package. To solve this problem, langupdate supports a
secondary apt cache so that the main apt cache can be kept as
small as possible.
</para>
<para><emphasis>langupdate</emphasis> then queries the secondary
apt cache to get a list of all translation packages (tdebs) that
match the list of locales supported on the device. This list is
then compared with the list of installed binaries. The translation
packages that match the installed package are then installed with
<command>apt-get</command>.
</para>
</refsect2>
<refsect2>
<title>Why C and C++?</title>
<para>There is no direct hook into <command>apt-get upgrade</command>
and no easy way of reading the apt-cache from C without forking a
call to apt-cache itself. So I use libapt-pkg which is a C++ library.
The rest of the code is C because I prefer to use the memory
management of glib2. If anyone fancies porting langupdate to just
C++ for use on devices that do not have room for libglib2.0-0,
patches are welcome.
</para>
</refsect2>
</refsect1>
<refsect1>
<title>Commands</title>
<variablelist>
<varlistentry>
<term>
<option>-r</option>|<option>--autoremove</option>
</term>
<listitem>
<para>Request apt to purge all orphaned TDebs - either where
the package has been uninstalled or the locale has become
unsupported.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--version</option>
</term>
<listitem>
<para>Display version of <emphasis>langupdate</emphasis>
and exit.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-?</option>|
<option>-h</option>|<option>--help</option>
</term>
<listitem>
<para>Display help message for <emphasis>langupdate</emphasis>
and exit.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Options</title>
<refsect2>
<title>langupdate options</title>
<variablelist>
<varlistentry>
<term><option>-n</option>|<option>--dry-run</option>
</term>
<listitem>
<para>Show the cache data without installing any packages.
(In autoremove mode, show the list of packages to be removed
without performing the purge.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option>|<option>--mirror</option>
<replaceable>MIRROR</replaceable></term>
<listitem>
<para>
Override the default Emdebian mirror
(<emphasis>http://www.emdebian.org/locale/</emphasis>) and use a
different one.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--suite</option>
<userinput> SUITE</userinput></term>
<listitem>
<para>
Specify a different suite to check. Only suites supported by
the chosen mirror will be usable. The default Emdebian mirror
only supports <filename>testing</filename> and
<filename>unstable</filename> or the codenames
<filename>sid</filename>, <filename>lenny</filename> and
(once Lenny is released) <filename>squeeze</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--verbose</option>
<userinput> integer</userinput></term>
<listitem>
<para>
Increase the verbosity of messages, levels between 0 and 4
are supported.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1>
<title>langupdate and Debian</title>
<para><command>langupdate</command> is primarily intended for Emdebian
support and plans for TDebs in Debian are only at a planning stage.
Emdebian packages can be identified by the <emphasis>em[0-9]</emphasis>
version suffix:
</para>
<example id="emdebian_suffix">
<title>Example of an Emdebian version suffix in use</title>
<programlisting>
apt-cache show dpkg
Package: dpkg
Source: dpkg (1.14.23)
Version: 1.14.23em1
Architecture: amd64
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Installed-Size: 1096
Pre-Depends: libc6 (>= 2.7-1), coreutils (>= 5.93-1), lzma
Replaces: manpages-de (<= 0.4-3em1), manpages-pl (<= 20051117-1em1)
Conflicts: apt (<< 0.7.7em1), aptitude (<< 0.4.7-1em1), dpkg-dev (<< 1.14.16em1), dpkg-iasearch (<< 0.11em1), sysvinit (<< 2.82-1em1)
Priority: required
Section: admin
Filename: pool/main/d/dpkg/dpkg_1.14.23em1_amd64.deb
Size: 447968
</programlisting>
</example>
<para>Emdebian packages already have all <filename>/usr/share/locale/*</filename>
content removed, so the Emdebian TDeb does not need to <emphasis>Replace:</emphasis>
the Emdebian package. There is one Emdebian TDeb per source package per locale
per architecture which could, potentially, have to <emphasis>Replace:</emphasis>
multiple binary packages built from the one source package in Debian. Even if
the sysadmin removes files from <filename>/usr/share/locale/</filename>
manually, it is not trivial for <command>langupdate</command> to identify
which files remain and therefore which TDebs could be safely installed.
Therefore, <command>langupdate</command> compares the list of binary packages
installed with the list of available TDebs and ignores TDebs where the binary
package does not bear an Emdebian version suffix.
</para>
<para>Unless the system includes a mix of both Debian and Emdebian packages,
<command>langupdate</command> will report that there is nothing to do.
</para>
</refsect1>
<refsect1>
<title>Bugs</title>
<para>langupdate is heavily reliant on accurate data in the <filename>dpkg</filename>
and <filename>apt</filename> data sources. The size of these data sources also
has a significant impact on processing time, especially where a mix of Debian
and Emdebian packages exist.
</para>
<para>Please attach the output of <command>apt-cache policy</command> to
all bug reports against langupdate in Debian.
</para>
</refsect1>
<refsect1>
<title>Author</title>
<para><emphasis>langupdate</emphasis> was written
by Neil Williams <email>linux@codehelp.co.uk</email>.
</para>
<para>This manual page was written by Neil Williams
<email>linux@codehelp.co.uk</email>
</para>
</refsect1>
<refsect1>
<title>Copyright</title>
<para>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.</para>
<para>This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.</para>
<para>You should have received a copy of the GNU General Public License
along with this program. If not, see
<<ulink url="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</ulink>>.
</para>
</refsect1>
</refentry>
</chapter>
</book>
|