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

Re: git-dpm: ERROR: 'upstream' does not contain previously recorded revision





2015-10-24 1:02 GMT+02:00 Brian May <bam@debian.org>:
Ludovic Rousseau <ludovic.rousseau@gmail.com> writes:

> I tried to update my package pykcs11 since the repository moved from SVN to
> git.
> http://anonscm.debian.org/cgit/python-modules/packages/pykcs11.git/
>
> I imported a new upstream .orig.tar.gz version as descibed in
> https://wiki.debian.org/Python/GitPackaging#New_upstream_release
> and could build and upload the package without problem.
>
> Now the command "git-dpm status" fails with:
> $ git-dpm status
> git-dpm: ERROR: 'upstream' does not contain previously recorded revision
> '8234fc2de2b89d65661233b357f922494590b5aa'!

At a guess, it looks like you didn't push the upstream or the
prestine-tar branches to git.debian.org. git-dpm requires all branches
to be pushed, not just master.

git push --all

Ah.
Maybe this should be added in the documentation https://wiki.debian.org/Python/GitPackaging
 
i.e. pykcs11_1.3.0.orig.tar.gz isn't in prestine-tar, and the upstream
branch should point to the latest upstream import
'8234fc2de2b89d65661233b357f922494590b5aa' but doesn't.

pykcs11_1.3.0.orig.tar.gz is in pristine-tar but the new version 1.3.1 is/was not.

However this shouldn't have caused you errors with your working
directory unless you deleted your working directory and cloned again
from git.debian.org.

I cloned again the repo from  git.debian.org :-(

I now just did:
$ git-dpm import-new-upstream --ptc --rebase-patched ../pykcs11_1.3.1.orig.tar.gz
git-dpm: ERROR: Cowardly refusing to run as 'upstream' differs from recorded '8234fc2de2b89d65661233b357f922494590b5aa'!.
Use --ignore-unclean-branches to delete/ignore it.
Or if you manually modified that branch to contain more history and want to incorporate that (and only then) use --use-strange-upstream-branch.

And then I forced the command:
$ git-dpm import-new-upstream --ptc --rebase-patched --ignore-unclean-branches ../pykcs11_1.3.1.orig.tar.gz
git-dpm: WARNING: upstream was out of date, deleting first...
Branche upstream supprimée (précédemment 171ade5).
Created upstream with contents of pykcs11_1.3.1.orig.tar.gz and parents 8234fc2de2b89d65661233b357f922494590b5aa
There were no patches recorded, so merging the new state directly (no git-dpm rebase-patched needed).
git-dpm: WARNING: No parent commit specified.
This means the upstream branch was created from the .orig.tar with only theold upstream branch as parent (but not any possible upstream git history).
Use 'git config dpm.importWithoutParent true' to no longer show this warning.
or 'git config dpm.importWithoutParent false' to make this an hard error.
calling pristine-tar commit '../pykcs11_1.3.1.orig.tar.gz' '4cf2e546ad26235a581cb9b6cfa9bbea0b415b80'...
pristine-tar: committed pykcs11_1.3.1.orig.tar.gz.delta to branch pristine-tar

I now have commits in upstream and pristine-tar branches.
And also a new (duplicate) commit in master "record new upstream branch created by importing pykcs11_1.3.1.orig.tar.gz and merge it"

The good news:
$ git-dpm status
git-dpm: everything up to date


> and also
> $ git-dpm tag
> git-dpm: ERROR: 'upstream' differs from recorded one!

This is a known bug with git-dpm. See
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801548.

Until it is fixed, the best work around seems to be to create the tags
manually, at least until you import a new upstream version. Then the
problem will go away.

With my changes above I now have:
$ git-dpm tag
Creating new tag 'upstream/1.3.1'...
Creating new tag 'patched/1.3.1-1'...
Creating new tag 'debian/1.3.1-1'...

I looks like the repo is back in order.
I will see if I have problems the next time I update the package.

Thanks

--
 Dr. Ludovic Rousseau

Reply to: