can't prepare new upstream releases using gbp

Bug #1649940 reported by Mathieu Trudel-Lapierre on 2016-12-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usd-importer
Medium
Unassigned

Bug Description

I'm trying to prepare a new upstream release of juju-core (for 2.0.2) for zesty.

I've asked for the juju-core package to be imported, and checked out ubuntu/zesty-devel.

When preparing the new upstream release, I use the following commands:

# get an upstream branch to pacify gbp:
$ git checkout -b upstream upstream/2.0.0

# get back to ubuntu/zesty-devel:
$ git checkout ubuntu/zesty-devel

# import-orig a new tarball:
$ gbp import-orig -v --debian-branch=ubuntu/zesty-devel ~u/juju-core_2.0.2.tar.gz
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: ['git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/']
gbp:debug: ['git', 'show-ref', 'refs/heads/upstream']
gbp:debug: ['git', 'status', '--porcelain']
What is the upstream version? [2.0.2]
gbp:debug: ['git', 'tag', '-l', 'upstream/2.0.2']
gbp:debug: tar ['-C', '../tmp2W2NR3', '-a', '-xf', '/home/mtrudel/workspace/ubuntu/juju-core_2.0.2.tar.gz'] []
gbp:debug: Unpacked '/home/mtrudel/workspace/ubuntu/juju-core_2.0.2.tar.gz' to '../tmp2W2NR3/juju-core_2.0.2'
gbp:info: Importing '/home/mtrudel/workspace/ubuntu/juju-core_2.0.2.tar.gz' to branch 'upstream'...
gbp:info: Source package is juju-core
gbp:info: Upstream version is 2.0.2
gbp:debug: ['git', 'show-ref', 'refs/heads/upstream']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
gbp:debug: ['git', 'add', '-f', '.']
gbp:debug: ['git', 'write-tree']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream']
gbp:debug: ['git', 'commit-tree', 'cdfb95317917fef1fe9d81ea0c48ae5b78c12236', '-p', '1cce8507d9d5c508de62b297d94767bb1a1a2026']
gbp:debug: ['git', 'update-ref', 'refs/heads/upstream', '81663f7fa55b31f4a93e96b7038bfcc91be64bb6', '1cce8507d9d5c508de62b297d94767bb1a1a2026']
gbp:debug: ['git', 'tag', '-m', 'Upstream version 2.0.2', 'upstream/2.0.2', '81663f7fa55b31f4a93e96b7038bfcc91be64bb6']
gbp:debug: ['git', 'show-ref', 'refs/heads/ubuntu/zesty-devel']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'ubuntu/zesty-devel']
gbp:info: Merging to 'ubuntu/zesty-devel'
gbp:debug: ['git', 'symbolic-ref', 'HEAD']
gbp:debug: ['git', 'show-ref', 'refs/heads/ubuntu/zesty-devel']
gbp:debug: ['git', 'symbolic-ref', 'HEAD']
gbp:debug: ['git', 'show-ref', 'refs/heads/ubuntu/zesty-devel']
gbp:debug: ['git', 'help', 'merge', '-m']
gbp:debug: ['git', 'merge', '--no-summary', '--no-edit', 'upstream/2.0.2']
gbp:error: Automatic merge failed.
gbp:error: Error detected, Will roll back changes.
gbp:info: Rolling back branch upstream by resetting it to 1cce8507d9d5c508de62b297d94767bb1a1a2026
gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of upstream', 'refs/heads/upstream', '1cce8507d9d5c508de62b297d94767bb1a1a2026']
gbp:info: Rolling back tag upstream/2.0.2 by deleting it
gbp:debug: ['git', 'tag', '-l', 'upstream/2.0.2']
gbp:debug: ['git', 'tag', '-d', 'upstream/2.0.2']
gbp:info: Rolling back branch ubuntu/zesty-devel by resetting it to 72697568810d2331939434bf24ae5fc8f189e92d
gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of ubuntu/zesty-devel', 'refs/heads/ubuntu/zesty-devel', '72697568810d2331939434bf24ae5fc8f189e92d']
gbp:info: Rolling back failed merge of upstream/2.0.2
gbp:debug: ['git', 'merge', '--abort']
gbp:error: Automatic rollback failed [('upstream/2.0.2', 'commit', 'abortmerge', None, GitRepositoryError('Error running git merge: fatal: There is no merge to abort (MERGE_HEAD missing).\n',))]
gbp:error: Clean up manually and please report a bug: [('upstream/2.0.2', 'commit', 'abortmerge', None, GitRepositoryError('Error running git merge: fatal: There is no merge to abort (MERGE_HEAD missing).\n',))]
gbp:debug: rm ['-rf', '../tmp2W2NR3'] []

This fails because there is apparently no ancestry between the ubuntu/zesty-devel and upstream branches. This can be verified:

$ gbp import-orig -v --debian-branch=ubuntu/zesty-devel ~u/juju-core_2.0.2.tar.gz --no-merge
[...]
gbp:info: Successfully imported version 2.0.2 of /home/mtrudel/workspace/ubuntu/juju-core_2.0.2.tar.gz

But trying to reproduce the next step (merging upstream into the ubuntu branch) will fail:

$ git merge --no-summary --no-edit upstream/2.0.2
fatal: refusing to merge unrelated histories

I can't move any farther than that point. I do not know what the ancestry should be exactly, but this may be alleviated by keeping the 'upstream' branch, which I needed to recreate (but I'm not sure it will work better then).

Nish Aravamudan (nacc) on 2016-12-19
Changed in usd-importer:
importance: Undecided → Medium
Robie Basak (racb) wrote :

We agree that this is not possible today, but we're not sure how this fits in to our workflow plans.

tags: added: workflow
Changed in usd-importer:
milestone: none → future
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers