I am trying to rebuild a Debian package using new upstream sources. I first do a gbp import-dsc on the Debian source package:

% gbp import-dsc heimdal_7.1.0+dfsg-13+deb9u2.dsc
gbp import-dsc heimdal_7.1.0+dfsg-13+deb9u2.dsc
gbp:info: No git repository found, creating one.
gbp:info: Tag upstream/7.1.0+dfsg not found, importing Upstream tarball
gbp:info: Version '7.1.0+dfsg-13+deb9u2' imported under '/srv/scratch/heimdal-work/heimdal'

No problem there. Next, I try to do animport-orig but get an error:

% cd heimdal
% gbp import-orig --verbose ../heimdal-7.5.0.tar.gz -u7.5.0
gbp:warning: Old style config section [git-import-orig] found please rename to [import-orig]
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: ['git', 'rev-parse', '--git-dir']
gbp:debug: ['git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/']
gbp:debug: ['git', 'show-ref', 'refs/heads/upstream']
gbp:debug: ['git', 'status', '--porcelain']
gbp:debug: ['git', 'tag', '-l', 'upstream/7.5.0']
gbp:debug: tar ['-C', '../tmpiUAx3m', '-a', '-xf', '../heimdal-7.5.0.tar.gz'] []
gbp:debug: Unpacked '../heimdal-7.5.0.tar.gz' to '../tmpiUAx3m/heimdal-7.5.0'
gbp:info: Importing '../heimdal-7.5.0.tar.gz' to branch 'upstream'...
gbp:info: Source package is heimdal
gbp:info: Upstream version is 7.5.0
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'heimdal-7.5.0^{}']
gbp:error: Import of ../heimdal-7.5.0.tar.gz failed: revision 'heimdal-7.5.0^{}' not found
gbp:debug: rm ['-rf', '../tmpiUAx3m'] []

Why am I getting this error and how to work around it?

gbp:error: Import of ../heimdal_7.5.0.orig.tar.gz failed: revision 'heimdal-7.5.0^{}' not found

The version of gbp import-orig is


This happens because of the following configuration directive in debian/gbp.conf:


This matches the upstream tags, but fails when you attempt to import the sources using gbp. To fix this, remove the above line.

You could save yourself a lot of time by using the packaged sources for version 7.5.0:

dget -x http://deb.debian.org/debian/pool/main/h/heimdal/heimdal_7.5.0+dfsg-2.dsc


git clone https://salsa.debian.org/debian/heimdal.git

It turns out that I needed to be on the upstream branch before running gbp import-orig. I am pretty sure that in earlier releases of import-dsc and import-orig that was not necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.