[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ next ]


TDeb Specification
Chapter 8 - Resolution of corner cases


8.1 TDeb documentation duplication

Basing the TDeb on the source package means that the TDeb could include large amounts of translated documentation. This results in a corner case where a package with debconf templates and a large amount of translated documentation would result in the docs being installed merely to obtain the translated templates. In order to resolve this, each source package may have one or more tdebs. If a source package has translations, it must have a tdeb named after the source package (suffixed with -tdeb) and all debconf templates must be placed in it. Such a package should place all architecture independent documentation (even in the native language) into a tdeb. If a package contains documentation which is not always required (for example API documentation or user documentation), the source package may provide additional ${source}-${foo}-tdeb_$version_all.tdeb files.

If tdebs are revised by the translation teams, the suffix +t[0-9]+ must be used and all tdebs for the source package must be revised at the same time.


8.2 TDebs and package managers

Package managers can find out whether a package has a base tdeb by examining the Packages file for Translation-Version: [0-9]+. In the case of Translation-Version: 0, the tdeb name and version is the same as the source file with -tdeb appended.

In the case of Translation-Version: 1 or higher, the tdeb name is ${source}-tdeb_$version+t[0-9]+_all.tdeb. Additional tdebs are referenced in the Packages file in the following way: Additional-Translations: ${source}-api-tdeb, ${source}-user-tdeb

In cases where a base tdeb is present, package managers *must* call dpkg with the tdeb and the deb in the same invocation in order to ensure that all debconf templates can be extracted before the config script is run.

There is no need to unpack in order to obtain the debconf templates - the tdeb merely has to be locatable by debconf which will call apt-extracttemplates and load the translated debconf strings into memory. See TDebs and debconf:


8.3 TDebs and debconf

apt-extracttemplates is used by debconf's dpkg-preconfigure to extract templates from the not-yet-extracted .debs right after download. This needs to take tdebs into account. Note that the templates are per-binary while tdebs are per-source. Also, the .deb should have non-translated templates.


8.4 TDebs and multiple templates files

If a source package builds multiple binaries that use debconf, the debian/ directory will contain foo.templates and bar.templates. The TDeb will retain all templates files under the original names. apt-extracttemplates and po-debconf will need to work together to ensure that all templates files are available to debconf so that debconf can selectively load only the templates files required.


8.5 Tdebs and usr/share/doc

A tdeb needs usr/share/doc/copyright and changelog.Debian and dpkg will create the necessary files, just as with a normal .deb.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ next ]


TDeb Specification

0.0.3

Neil Williams codehelp@debian.org
Joerg Jaspert joerg@debian.org
Mark Hymers mhy@debian.org
Frank Lichtenheld djpig@debian.org