Package: git-buildpackage Version: 0.8.12.2 Severity: normal I just ran gbp import-orig to update a package, and somehow the merge fails. The subsequent rollback also reports an error, but looking at the repository state the master, upstream and pristine-tar branches are unmodified (probably because the merge to master never happened, so there is no need to abort it?).
Looking more closely at the original merge failure, it aborts because there are untracked files that would be overwritten by the merge (which likely means it never starts the merge, instead of starting and failing later). Perhaps git merge returns different exit codes for these situations? Gr. Matthijs $ gbp import-orig --uscan --verbose 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:info: Launching uscan... uscan: Newest version of openttd on remote site is 1.7.0, local version is 1.6.1 uscan: => Newer package available from http://binaries.openttd.org/releases/1.7.0/openttd-1.7.0-source.tar.xz uscan warn: Skipping ./os/debian/watch as this package has already been scanned successfully gbp:info: using ../openttd_1.7.0.orig.tar.xz What is the upstream version? [1.7.0] gbp:debug: ['git', 'tag', '-l', 'upstream/1.7.0'] gbp:debug: tar ['-C', '../tmpaBKUpQ', '-a', '-xf', '../openttd_1.7.0.orig.tar.xz'] [] gbp:debug: Unpacked '../openttd_1.7.0.orig.tar.xz' to '../tmpaBKUpQ/openttd-1.7.0' gbp:info: Importing '../openttd_1.7.0.orig.tar.xz' to branch 'upstream'... gbp:info: Source package is openttd gbp:info: Upstream version is 1.7.0 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', '79ac9215a213d3a3e8b76957dfb68375804bdabb', '-p', '8cb8348b46ec8ccb0ad236f6815504e3a392a625'] gbp:debug: ['git', 'update-ref', '-m', 'gbp: New upstream release 1.7.0.', 'refs/heads/upstream', '3fbd15d80f1f282a83c1bd700483a96148dbc317', '8cb8348b46ec8ccb0ad236f6815504e3a392a625'] gbp:debug: ['git', 'show-ref', 'refs/heads/pristine-tar'] gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'pristine-tar'] gbp:debug: ['git', 'ls-tree', '-z', 'upstream', '--'] gbp:debug: ['git', 'mktree', '-z'] gbp:debug: /usr/bin/pristine-tar [] ['commit', '../openttd_1.7.0.orig.tar.xz', '79ac9215a213d3a3e8b76957dfb68375804bdabb'] gbp:debug: ['git', 'tag', '-m', 'Upstream version 1.7.0', '-s', '-u', 'A1565658', 'upstream/1.7.0', '3fbd15d80f1f282a83c1bd700483a96148dbc317'] gbp:debug: ['git', 'show-ref', 'refs/heads/master'] gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'master'] gbp:info: Merging to 'master' gbp:debug: ['git', 'symbolic-ref', 'HEAD'] gbp:debug: ['git', 'show-ref', 'refs/heads/master'] gbp:debug: ['git', 'symbolic-ref', 'HEAD'] gbp:debug: ['git', 'show-ref', 'refs/heads/master'] gbp:debug: ['git', 'help', 'merge', '-m'] gbp:debug: ['git', 'merge', '--no-summary', '--no-edit', 'upstream/1.7.0'] gbp:error: Automatic merge failed. gbp:error: Error detected, Will roll back changes. gbp:info: Rolling back branch upstream by resetting it to 8cb8348b46ec8ccb0ad236f6815504e3a392a625 gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of upstream', 'refs/heads/upstream', '8cb8348b46ec8ccb0ad236f6815504e3a392a625'] gbp:info: Rolling back branch pristine-tar by resetting it to 9f75dd82a683b03662ca736f68f415e6f7fa6dfe gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of pristine-tar', 'refs/heads/pristine-tar', '9f75dd82a683b03662ca736f68f415e6f7fa6dfe'] gbp:info: Rolling back tag upstream/1.7.0 by deleting it gbp:debug: ['git', 'tag', '-l', 'upstream/1.7.0'] gbp:debug: ['git', 'tag', '-d', 'upstream/1.7.0'] gbp:info: Rolling back branch master by resetting it to 704027decfff0924ffb363c40924cff947f38750 gbp:debug: ['git', 'update-ref', '-m', 'gbp import-orig: failure rollback of master', 'refs/heads/master', '704027decfff0924ffb363c40924cff947f38750'] gbp:info: Rolling back failed merge of upstream/1.7.0 gbp:debug: ['git', 'merge', '--abort'] gbp:error: Automatic rollback failed [('upstream/1.7.0', '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/1.7.0', 'commit', 'abortmerge', None, GitRepositoryError('Error running git merge: fatal: There is no merge to abort (MERGE_HEAD missing).\n',))] gbp:debug: rm ['-rf', '../tmpaBKUpQ'] [] -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (500, 'stable'), (50, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.8.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages git-buildpackage depends on: ii devscripts 2.16.8 ii git 1:2.10.2-2 ii man-db 2.7.5-1 ii python-dateutil 2.5.3-2 ii python-pkg-resources 28.7.1-1 ii python-six 1.10.0-3 pn python:any <none> Versions of packages git-buildpackage recommends: ii cowbuilder 0.81 ii pbuilder 0.226.1 ii pristine-tar 1.37 ii python-requests 2.11.1-1 Versions of packages git-buildpackage suggests: ii python-notify 0.1.1-4 ii sudo 1.8.17p1-2 ii unzip 6.0-20 -- no debconf information