Another quilt use case
Barry Warsaw
barry at ubuntu.com
Mon Nov 7 22:37:32 UTC 2011
Here's another quilt use case that I'm working with today. I'm not entirely
sure I'm doing things the right (or even the best) way, so suggestions are
welcome.
Task: Upstream claws-mail maintains an official PPA with the latest upstream
release plus some critical patches. Precise has the latest upstream release
but is missing four of those patches. I want to add these patches to the
Precise version.
This would normally be pretty easy, but of course quilt+udd makes things more
complicated.
As far as I know, the upstream code from which the PPA is populated is not
available, so I had to start by `bzr import-dsc <dsc>` where `<dsc>` is the
URL to the PPA .dsc file, e.g.
https://launchpad.net/~claws-mail/+archive/ppa/+files/claws-mail_3.7.10-1ubuntu1ppa1ubuntu6.dsc
which I got from:
https://launchpad.net/~claws-mail/+archive/ppa/+packages
I did not try to merge this dsc imported branch with the ubuntu:claws-mail
branch. Instead, went through each of the four missing patches, e.g.:
3.7.10cvs55.patch
3.7.10cvs57.patch
3.7.10cvs75.patch
3.7.10cvs76.patch
and `quilt import`ed them into the Precise branch. After each import, I
rummaged around the upstream CVS tracker to find the url to the patchset and
the description of the change, and added DEP 3 headers to each patch.
Fortunately, the way upstream named the patches in their PPA made this really
easy, because the patch names exactly matched entries in the CVS tracker.
(One patch differed slightly between what was in the branch and in the
tracker, but afaict, only by some inconsequential whitespace changes, so I
simply kept the patch from the PPA instead of the patch from CVS.)
After making each patch file look good, I `quilt push`d it and `bzr add`ed the
debian/patches/*.patch file.
Once I imported all four patches, which all fortunately applied cleanly, I
`dch -i` to get a changelog entry. So far so good.
Here's where quilt+udd makes life difficult. When I `bzr stat`d the
directory, I see the following:
added:
debian/patches/3.7.10cvs55.patch
debian/patches/3.7.10cvs57.patch
debian/patches/3.7.10cvs75.patch
debian/patches/3.7.10cvs76.patch
modified:
.pc/applied-patches
debian/changelog
debian/patches/series
src/addr_compl.c
src/alertpanel.c
src/mainwindow.c
unknown:
.pc/.quilt_patches
.pc/.quilt_series
.pc/3.7.10cvs55.patch/
.pc/3.7.10cvs57.patch/
.pc/3.7.10cvs75.patch/
.pc/3.7.10cvs76.patch/
I want to keep all the debian/* changes, and I'd like to debcommit at this
point (to get the auto-insertion of the commit message), but I can't do that.
I've learned from previous experience that those changes in src/ will cause
problems, because it will look like the changes are applied twice, once in the
source tree (via a debian-diff) *and* via debian/patches. I think I ran into
this before and it causes the quilt part of the binary package build to fail.
Anyway, we definitely do not want both the changes to src/ *and* the new
debian/patches in the source branch. So my next step was to `bzr revert src`
which again, I'm not sure is correct. I also wasn't comfortable with the
.pc/applied-patches diff, so I revert that too.
Now I have a branch that contains only the debian/* changes. I debcommit
those, and do a test build of the package locally. Since this looks pretty
good, I `dch -r` and dpush like normal.
I'm a little leery about `bzr push`ing my branch though, since I don't know
how badly, if at all, I've confused the importer. I think for this package I
*won't* push the branch, so I can see what the importer does with it, and can
compare it against my local branch.
(Aside: when I started working on this package today, I did a `bzr pull` fully
expecting no differences. I was surprised to see that a no-change merge was
required to bring my local package in sync with the importer branch. But this
could have been because of that same funky situation with libvigraimpex that
we discovered at UDS.)
Again, it seems like the fact that patches are applied, the versioning of the
.pc directory, and the uncertain interaction between quilt and bzr is what
causes the pain.
Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-distributed-devel/attachments/20111107/6886691f/attachment.pgp>
More information about the ubuntu-distributed-devel
mailing list