A (git) workflow for Debian packaging
martin f krafft
madduck at debian.org
Tue Oct 9 09:57:38 UTC 2007
also sprach martin f krafft <madduck at debian.org> [2007.10.05.1408 +0100]:
> … when a new upstream version comes around
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It turns out that I oversimplified the picture of feature branches
and how (octopus) merging works.
> That was easy, since I could evade the conflict. But what if upstream made
> a change to ``Makefile``, which got in the way with my configuration file
> location change? Then I'd have to merge ``upstream`` into
> ``deb/conffile-location``, resolve the conflicts, and commit the change::
>
> $ git checkout deb/conffile-location
> $ git merge upstream
> CONFLICT!
> $ git-mergetool
> $ git commit
>
> When all conflicts have been resolved, I can prepare a new release, as
> before::
>
> $ git checkout master
> $ dch
> $ dpkg-parsechangelog | sed -ne 's,Version: ,,p'
> mdadm-2.6.3+200709292116+4450e59-3
>
> $ poor-mans-gitbuild
This doesn't work, since octopus merging (which is what
poor-mans-gitbuild does: git-merge with multiple branches as
arguments) isn't as smart as I thought:
http://marc.info/?l=git&m=119188993817723&w=2
If I try to octopus-merge the three into build, which I branched off
the new upstream.
lapse:..pkg/mdadm/retry/mdadm> git merge master deb/conffile-location deb/docs
Trying simple merge with 257481d036a3a0f4f77546d0774f2cea874efadc
Trying simple merge with a6c070e839a7ceb88f03a02fd4f4ada8aecce011
Simple merge did not work, trying automatic merge.
Added debian/FAQ in both, but differently.
ERROR: Merge conflict in debian/FAQ
[...]
The reasons are outlined in the above thread. Basically it's because
I cannot use the octopus merge strategy as it is if any of the
branches modified files that are known to the other branches, and
I modified files like .gitignore or debian/postinst in master, but
obviously not in deb/*.
If I first merge master, then deb/*, it works, simply because then
git gets to use its infinitely smarter recursive merge strategy.
If I merge master into deb/* before the octopus, it should also
work.
But I fear that this gets a little complicated and requires too much
brain power from the operator.
I shall thus try to figure out a better way to automate this. Good
thing I haven't published the text yet to the wider audience.
Comments welcome,
--
.''`. martin f. krafft <madduck at debian.org>
: :' : proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck - http://debiansystem.info
`- Debian - when you have better things to do than fixing systems
this space intentionally left blank.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/vcs-pkg-discuss/attachments/20071009/f86bd6f1/attachment.pgp
More information about the vcs-pkg-discuss
mailing list