X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=developers-reference.git;a=blobdiff_plain;f=best-pkging-practices.dbk;h=1651ddba158761370bb4f00ab639dd1f9c327542;hp=bbcf706eb2321812c0540149b18e46be63a96b15;hb=de9303fd6b9183e5b1cfbce5fccc68ab9f968cde;hpb=72b7cc60b12e8be27c75d820d2f40d5531a3dc33 diff --git a/best-pkging-practices.dbk b/best-pkging-practices.dbk index bbcf706..1651ddb 100644 --- a/best-pkging-practices.dbk +++ b/best-pkging-practices.dbk @@ -75,13 +75,6 @@ individual dh_* helpers. If you are going to use a helper, you do need to take the time to learn to use that helper, to learn its expectations and behavior. - -Some people feel that vanilla debian/rules files are -better, since you don't have to learn the intricacies of any helper system. -This decision is completely up to you. Use what works for you. Many examples -of vanilla debian/rules files are available at . -
@@ -414,7 +407,7 @@ described above is also shown. Priority: optional <snip> Vcs-Svn: svn://svn.debian.org/svn/pkg-vim/trunk/packages/vim - Vcs-Browser: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim + Vcs-Browser: https://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim Homepage: http://www.vim.org
@@ -830,128 +823,62 @@ If you don't do so, the whole template will not be translated as long as a translator will send you an update. -To unfuzzy translations, you can use two methods. The first -method does preventive search and replace actions in the -PO files. The latter uses gettext utilities to unfuzzy -strings. - - -Preventive unfuzzy method: +To unfuzzy translations, you can use +msguntypot (part of the po4a package). -Try finding a complete translation file before -the change: - -for i in debian/po/*po; do echo -n $i: ; msgfmt -o /dev/null --statistics $i; done - -The file only showing translated items will be used -as the reference file. If there is none (which should not happen if you take -care to properly interact with translators), you should use the file -with the most translated strings. - - - - -Identify the needed change. In this example, let's assume the change is about -fixing a typo in the word typo which was inadvertently -written as tpyo. Therefore, the change is -s/tpyo/typo. - - - - -Check that this change is only applied to the place where you really intend -to make it and not in any other place -where the original string is appropriate. This specifically applies to -change in punctuation, for instance. - - - - -Modify all PO files by using sed. The use of that command -is recommended over any text editor to guarantee that the files encoding will -not be broken by the edit action: - - -cd debian/po -for i in *.po; do sed -i 's/tpyo/typo/g' $i; done - - - - -Change the debconf template file to fix the typo. - - - - -Run debconf-updatepo. - - - - -Check the foo.po reference file. Its statistics should -not be changed: +Regenerate the POT and PO files. - -msgfmt -o /dev/null --statistics debian/po/foo.po - +debconf-updatepo -If the file's statistics changed, you did something wrong. Try again -or ask for help on the &email-debian-i18n; mailing list. +Make a copy of the POT file. +cp templates.pot templates.pot.orig - - -Gettext utilities method: - - -Put all incomplete PO files out of the way. You can check the completeness by -using (needs the gettext package -installed): +Make a copy of all the PO files. -for i in debian/po/*po; do echo -n $i: ; msgfmt -o /dev/null --statistics $i; done +mkdir po_fridge; cp *.po po_fridge -Move all files which report either fuzzy strings to a temporary place. Files -which report no fuzzy strings (only translated and untranslated) will be kept -in place. +Change the debconf template files to fix the typos. -Now and now only, modify the template for -the typos and check again that translation are not impacted (typos, spelling -errors, sometimes typographical corrections are usually OK). +Regenerate the POT and PO files (again). - - +debconf-updatepo -Run debconf-updatepo. This will fuzzy all strings you -modified in translations. You can see this by running the above again. +At this point, the typo fix fuzzied all the translations, and this +unfortunate change is the only one between the PO files of your main +directory and the one from the fridge. Here is how to solve this. -Use the following command: +Discard fuzzy translation, restore the ones from the fridge. -for i in debian/po/*po; do msgattrib --output-file=$i --clear-fuzzy $i; done +cp po_fridge/*.po . -Move back to debian/po the files which showed fuzzy strings in the first step. +Manually merge the PO files with the new POT file, but taking the useless fuzzy into account. +msguntypot -o templates.pot.orig -n templates.pot *.po -Run debconf-updatepo again. +Clean up. +rm -rf templates.pot.orig po_fridge @@ -1696,9 +1623,9 @@ incrementing the version number, so there can be no guarantee that a pristine tarball is identical to what upstream currently distributing at any point in time. All that can be expected is that it is identical to something that upstream once did distribute. -If a difference arises later (say, if upstream notices that he wasn't using -maximal compression in his original distribution and then -re-gzips it), that's just too bad. Since there is no good +If a difference arises later (say, if upstream notice that they weren't using +maximal compression in their original distribution and then +re-gzip it), that's just too bad. Since there is no good way to upload a new .orig.tar.{gz,bz2,xz} for the same version, there is not even any point in treating this situation as a bug. This makes it possible to use checksums to easily verify that all changes between Debian's @@ -1754,7 +1681,7 @@ that you must remove before uploading. In these cases the developer must construct a suitable .orig.tar.{gz,bz2,xz} -file himself. We refer to such a tarball as a repackaged upstream +file themselves. We refer to such a tarball as a repackaged upstream source. Note that a repackaged upstream source is different from a Debian-native package. A repackaged source still comes with Debian-specific changes in a separate .diff.gz or .debian.tar.{gz,bz2,xz} @@ -1922,7 +1849,7 @@ of meta-packages (built by the source packages The long description of the meta-package must clearly document its purpose -so that the user knows what he will lose if he removes the package. Being +so that the user knows what they will lose if they remove the package. Being explicit about the consequences is recommended. This is particularly important for meta-packages which are installed during initial installation and that have not been explicitly installed by the user.