Re: [PATCH] spec: Let translations be properly updated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 06, 2014 at 06:20:37 -0700, Eric Blake wrote:
> On 03/06/2014 04:06 AM, Jiri Denemark wrote:
> > Libvirt tarball contains po/stamp-po file which prevents any po/*.gmo
> > file to be regenerated even if a corresponding po/*.po file is newer. By
> > removing the stamp-po file, all *.gmo files are properly updated if
> > required. This allows downstreams to provide patches that update
> > translations.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> > ---
> >  libvirt.spec.in | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/libvirt.spec.in b/libvirt.spec.in
> > index 014fe5d..23374e7 100644
> > --- a/libvirt.spec.in
> > +++ b/libvirt.spec.in
> > @@ -1421,6 +1421,7 @@ driver
> >   autoreconf -if
> >  %endif
> 
> I think you need to guard this:
> 
> >  
> %if 0%{?enable_autotools}
> > +rm -f po/stamp-po
> %endif

I don't think so.

> 
> >  %configure %{?_without_xen} \
> >             %{?_without_qemu} \
> >             %{?_without_openvz} \
> > 
> 
> since regeneration of .po files only occurs if autotools are re-run.

If additional patches just update *.po and other source files without
touching Makefile.am and configure.ac, there's no need to re-run
autotools while we still want to regenerate gmo files from the updated
po files.

> When building an rpm from a stock tarball, you do NOT want to require
> gettext to be present - it is only when you are applying downstream
> patches that a .po file will ever be newer to require the regeneration
> of translations.

gettext is an unconditional BuildRequires in libvirt.spec so we always
require it to be present (unlike gettext-devel which is only required if
enable_autotools is 1). And msgfmt used for generating gmo files from po
files is present in gettext package.

And the Makefile from gettext is clever enough not to regenerate gmo
files if their corresponding po files were not updated even if stamp-po
is missing. That said, I don't really understand why stamp-po exists at
all :-)

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]