Rechercher une page de manuel
langupdate
Langue: en
Version: Thu Jan 8 21:04:16 GMT 2009 (debian - 07/07/09)
Section: 1 (Commandes utilisateur)
Sommaire
NAME
langupdate - An apt frontend for the Emdebian implementation of 'tdebs'SYNOPSIS
- langupdate [[[-n] | [--dry-run ]]] [[[--suite]] string] [[[-r] | [--autoremove]]] [[[-m] | [--mirror]] string] [[[-v] | [--verbose]] integer]
- langupdate {[[-?] | [-h] | [--help] | [--version]]}
DESCRIPTION
langupdate
- 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.
langupdate 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 apt-get update with apt-get upgrade. tdeb packages have no dependencies so 'dist-upgrade' is not required.
PURPOSE
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.
Note that this functionality is not available for Debian TDebs and langupdate does not install any translation packages if only Debian packages are installed as these already contain all the translation files.
langupdate is intended to support Emdebian Grip where Emdebian packages can be mixed with Debian packages.
Disc space is not cheap
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.
langupdate 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 apt-get.
Why C and C++?
There is no direct hook into apt-get upgrade 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.
COMMANDS
-r|--autoremove
- Request apt to purge all orphaned TDebs - either where the package has been uninstalled or the locale has become unsupported.
--version
- Display version of langupdate and exit.
-?| -h|--help
- Display help message for langupdate and exit.
OPTIONS
langupdate options
-n|--dry-run
- Show the cache data without installing any packages. (In autoremove mode, show the list of packages to be removed without performing the purge.)
-m|--mirror MIRROR
- Override the default Emdebian mirror (http://www.emdebian.org/locale/) and use a different one.
--suite SUITE
- Specify a different suite to check. Only suites supported by the chosen mirror will be usable. The default Emdebian mirror only supports testing and unstable or the codenames sid, lenny and (once Lenny is released) squeeze.
--verbose integer
- Increase the verbosity of messages, levels between 0 and 4 are supported.
LANGUPDATE AND DEBIAN
langupdate 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 em[0-9] version suffix:
Example 1.1. Example of an Emdebian version suffix in use
-
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
Emdebian packages already have all /usr/share/locale/* content removed, so the Emdebian TDeb does not need to Replace: the Emdebian package. There is one Emdebian TDeb per source package per locale per architecture which could, potentially, have to Replace: multiple binary packages built from the one source package in Debian. Even if the sysadmin removes files from /usr/share/locale/ manually, it is not trivial for langupdate to identify which files remain and therefore which TDebs could be safely installed. Therefore, langupdate 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.
Unless the system includes a mix of both Debian and Emdebian packages, langupdate will report that there is nothing to do.
BUGS
langupdate is heavily reliant on accurate data in the dpkg and apt 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.
Please attach the output of apt-cache policy to all bug reports against langupdate in Debian.
AUTHOR
langupdate was written by Neil Williams <linux@codehelp.co.uk>.
This manual page was written by Neil Williams <linux@codehelp.co.uk>
COPYRIGHT
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.
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.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
COPYRIGHT
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre