Bug#771249: Hacking pkg-grub/grub.git to allow po/* updates (Re: Bug#771249: Translation update)

2014-12-14 Thread Ian Campbell
On Sun, 2014-12-07 at 12:22 +, Ian Campbell wrote:
 Colin, since the below has a significant impact on the packaging git
 workflow I won't take it any further without your input...
 
 On Thu, 2014-11-27 at 19:06 -0400, David Prévot wrote:
  Please consider updating translations of grub2, as already provided by
  translators since upstream released 2.02~beta2.
 
 Sadly applying this patch is not as easy as it might seem, due to
 Tedious Packaging VCS Reasons(tm) :-/

I had another idea for how to solve this without messing around with
what the upstream branch contains, which is to create a parallel
po-tp.org and use that for the package build (this isn't too bad since
the po/* in git is basically a stub anyway).

I've pushed this to people/ijc/master-po-tp.org. IMHO this is more hacky
than the other solution but has the overriding benefit of not needing to
mess around with the meaning of upstream in git or the packaging
workflow and of being easily reversible.

I'm considering whether to upload something based on this approach in
-19 along with the updated debconf templates from the new EFI question
added in -18.

Ian.


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#771249: Hacking pkg-grub/grub.git to allow po/* updates (Re: Bug#771249: Translation update)

2014-12-07 Thread Ian Campbell
Colin, since the below has a significant impact on the packaging git
workflow I won't take it any further without your input...

On Thu, 2014-11-27 at 19:06 -0400, David Prévot wrote:
 Please consider updating translations of grub2, as already provided by
 translators since upstream released 2.02~beta2.

Sadly applying this patch is not as easy as it might seem, due to
Tedious Packaging VCS Reasons(tm) :-/

The pkg-grub git tree[0] uses git-dpm on-top of the upstream grub.git
tree, which does not include po/*.po, but those files are included in
the upstream tarball release (i.e. in our orig.tar.xz).

This unfortunately means that it is not possible to update po/* simply
using the normal git-dpm mechanisms.

I've attempted to workaround this as follows:

Create a new upstream-po branch, based on origin/upstream but with the
upstream released po files included (autogenerated stuff is direct from
linguas.sh):

$ git checkout -b upstream-po origin/upstream
$ cp ../grub2-2.02~beta2/po/*.po po/
$ cp ../grub2-2.02~beta2/po/LINGUAS po
$ (
autogenerated=en@quot en@hebrew de@hebrew en@cyrillic en@greek 
en@arabic en@piglatin de_CH
for x in $autogenerated; do
git rm po/$x.po
done
)
# Remove po/*.po and po/LINGUAS from .gitignore
$ git commit -a

Now rebase master onto this:

$ git checkout -b master-po origin/master
$ git-dpm record-new-upstream ../grub2_2.02~beta2.orig.tar.xz 
upstream-po
$ git-dpm rebase-patched
$ git-dpm dch Update git-dpm baseline to include upstream po files.

This results in a source package which differs only in the git-dpm noise
in debian/patches (hash changes) plus the changelog and debian/.git-dpm
as expected.

From here we can using the usual git-dpm checkout-patched/update-patches
routine to add an update-linguas.patch, which contains the result of
running linguas.sh.

I've pushed the results to /people/ijc/{upstream,master}-po in the
packaging git tree.

These branches do not include the followup patch from this bug to force
*.gmo to actually be updated, and I've not actually built binaries based
on it yet.

If we go ahead with this approach I'd suggest that upstream and
upstream-po ought to remain distinct in the packaging git tree, with the
former tracking pristine upstream and the latter adding the po files,
but to have a single master which is based on upstream-po (i.e. what is
currently called people/ijc/master-po).

It's possible this could also be solved with a second subcomponent
orig.tar containing an updated po subdirectory, or by debian/rules
machinery to update po/* from e.g. debian/upstream-po/* or something.
I've not tried either of those approaches, not sure if they are actually
realistic. I'll investigate them if you think it would be better.

Cheers,
Ian.

[0] http://anonscm.debian.org/cgit/pkg-grub/grub.git/


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#771249: Hacking pkg-grub/grub.git to allow po/* updates (Re: Bug#771249: Translation update)

2014-12-07 Thread Ian Campbell
On Sun, 2014-12-07 at 12:22 +, Ian Campbell wrote:
 These branches do not include the followup patch from this bug to force
 *.gmo to actually be updated, and I've not actually built binaries based
 on it yet.

I have now, all which was missing for po/grub.pot needed adding to
upstream-po too. I'm updated people/ijc/{upstream,master}-po.

Ian.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org