[Git-dpm-user] git-dpm thinks it is working with old upstream.

Bernhard R. Link brlink at debian.org
Sat Apr 7 10:05:21 UTC 2012


* Paul Elliott <pelliott at blackpatchpanel.com> [120407 10:43]:
> My upstream released a new tar ball.
> I did a git-dpm import-new-upstream --ptc new-tarball.
> on this tarball.
> Followed by
> git-dpm dch -- -i
>
> I edited the changelog to indicate correct version.

> I really do not understand this from the man page:
> man> git-dpm dch -v newupstream-1 "new upstream version"

Oh, there is a -- missing before -v in the manpage.

It should be
git-dpm dch -- -v newupstream-1 "new upstream version"

Everything after the -- is passed to dch (and is described in dch's
manpage)

-i
tells dch to create a new changelog item with the new version being the
old version incremented.

-v version
tell dch to create a new changelog item with the new version as given.

Anything not being an option given to dch is taken as changelog message.
Only if no changelog message is given, it spawns an editor.

So 'dch -v blabla "some text"' is the same like running 'dch -i',
replacing the version in the first line with 'blabla' moving to the
new line with '*' generated and appending 'some text' there.

> I find it easier to edit the version
> as part of editing the changelog.

One is as good as the other. git-dpm just calls dch with the arguments
you gave it and looks what debian/changelog looks like when that
returns. It does not matter how the contents are generated.

> Then I saw a debian change that needed to be made
> requireing a minor (debian only) new version.
>
> I edited and git added debian/control (only), and tried to do
> a git-dpm dch  -- -i

That's how it is supposed to work.

> Never made it to the editor. Instead I got
> > $ git-dpm dch -- -i
> > git-dpm: ERROR: debian branch contains non-debian changes:
> >  libreoffice-converter.spec
> libreoffice-converter.spec is a file the upstream modified
> in the last upstream release. (That I already pushed).
>
> What did I do wrong?

That should only happen if that file has modifications not from
the patched branch (including the upstream branch).

It's also strange that the first git-dpm dch did not show the first
message.

Some reasons I can think of:

 - switching to the new upstream was not complete. i.e. there were
   patches recorded that still need a git-dpm rebase-patched and
   git-dpm update-patches.
   (Though I do not understand why the first git-dpm dch has worked
    then).

 - the file has actually non-upstream changes. Did you perhaps try
   a build between the two git-dpm calls and the build is modifying
   that file? (in that case you might need to clean that up in
   debian/rules clean).

 - something else got corrupted.
   In case of libreoffice-converter, the history of the master branch
   does not look like something git-dpm would create, but rather
   something you might get with a git rebase mixing the upstream and
   the master branch together. You have

   the commit 72c2d2ea75d56c21b602b0def0cb12761b445c90 in the upstream
   branch, which looks like the original.

   the commit 93cb3d76d5d546cdc5394d3220addd2a1e307e97 in the master
   branch, which looks like a cherry-pick or rebase of the first.

   the commit 24d249845e9b37676e0dd7e48fab9bb7ecdec020 still recorded
   as upstream in debian/.git-dpm, which is the previous upstream.

   That looks like there was a rebase done in master linearizing all
   commits including the upstream branch.
   This made it no longer contain your upstream branch and lost the
   debian/.git-dpm changes (as those are changes in a merge rebase
   loses them, but as the rebase also loses the commits its refer to
   that does not matter that much).

   There are three ways to fix that:
   - Go back to before the rebase, assuming you still have them in git's log
   and you not care if the published branch moves non-forward.

   - Re-register and merge the correct upstream branch:
   git-dpm new-upstream --allow-changes-in-debian-branch ../libreoffice-converter_3.3.32.1+ds.orig.tar.gz
   (Note that this is new-upstream and not import-new-upstream as it is
   only about recording your current 'upstream' branch and not creating
   it. Note that you need --allow-changed-in-debian-branch and you will
   get a warning about them because git-dpm only sees changes in your
   debian-branch (from the rebased new upstream) and does not know that
   those changes it will discard are exactly the changes it will merge
   in from the upstream branch again).

   - manually fix it (only more error prone than the 2nd way I'd guess):
   git merge upstream
   sed -i -e "s/$(git rev-parse upstream^1)/$(git rev-parse upstream)/" debian/.git-dpm
   git add debian/.git-dpm
   git commit --amend

Hope that helps,
        Bernhard R. Link



More information about the Git-dpm-user mailing list