On 2010/10/5 Colin Watson wrote:
> On Tue, Oct 05, 2010 at 11:39:20AM +0100, Colin Watson wrote:
>> If a master document is more recent than the POT, calling 'po4a
>> --rm-translations' will have the side-effect of updating it and the PO
>> files based on it.  This is annoying because it makes it difficult to
>> write a minimal patch for a Debian package that uses po4a upstream; the
>> clean rule can end up changing source files, which is normally
>> undesirable.
>>
>> Could you please either make --rm-translations do nothing except
>> removing the translated files, or else add an option to inhibit updating
>> the PO/POT files?
>
> In fact, ordinary calls to 'po4a' to generate translations (which I do
> during 'make') also involve updating the PO/POT files.  I've had to do
> this in the man-db packaging:
>
> override_dh_auto_build:
>        set -e; for preserve in man/po4a/po/*.pot man/po4a/po/*.po; do \
>                [ ! -e "$$preserve.safe" ] || continue; \
>                cp -a "$$preserve" "$$preserve.safe"; \
>        done
>        dh_auto_build
>
> override_dh_auto_clean:
>        dh_auto_clean
>        set -e; for preserve in man/po4a/po/*.pot man/po4a/po/*.po; do \
>                [ -e "$$preserve.safe" ] || continue; \
>                mv "$$preserve.safe" "$$preserve"; \
>        done
>
> This is really pretty ugly, though.  GNU gettext only updates these
> files on explicit request or when you say 'make dist', which I think is
> much better behaviour.

Hello Colin,

To be honest in our SVN trunk I already removed the
--no-backups/--rm-backups flags (backup files are no more generated)
and am inclined to also remove --rm-translations.
These options do more harm than good, and I would much prefer if
people do not run po4a to clean up generated files.  Also your
man/Rules.man file contains
  distclean-hook:
        @if [ "x$(PO4A_LINGUA)" = xyes ]; then \
                -rm -rf man1 man5 man8; \
        fi
Thus I wonder why you need to remove files generated by po4a, aren't
they already removed by 'debian/rules clean'?

Denis



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to