This situation appears to also arise when running the command on a branch that needs a force-push (e.g. after applying changes from an MP review). And Robie's proposed solution sounds like it will address this use case as well.
Example output:
merges-jammy+22.04:~/pkg/Apache2/merge-v2.4.52-1/apache2-gu$ debuild -S -sa -uc -us $(git ubuntu prepare-upload args)
To ssh://git.launchpad.net/~bryce/ubuntu/+source/apache2
! [rejected] merge-v2.4.52-1-jammy -> merge-v2.4.52-1-jammy (non-fast-forward)
error: failed to push some refs to 'ssh://<email address hidden>/~bryce/ubuntu/+source/apache2'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
02/04/2022 18:30:35 - ERROR:Command exited 1: git push bryce refs/heads/merge-v2.4.52-1-jammy:refs/heads/merge-v2.4.52-1-jammy
02/04/2022 18:30:35 - ERROR:stdout: [Not captured]
This situation appears to also arise when running the command on a branch that needs a force-push (e.g. after applying changes from an MP review). And Robie's proposed solution sounds like it will address this use case as well.
Example output:
merges- jammy+22. 04:~/pkg/ Apache2/ merge-v2. 4.52-1/ apache2- gu$ debuild -S -sa -uc -us $(git ubuntu prepare-upload args) launchpad. net/~bryce/ ubuntu/ +source/ apache2 4.52-1- jammy -> merge-v2. 4.52-1- jammy (non-fast-forward) /~bryce/ ubuntu/ +source/ apache2' merge-v2. 4.52-1- jammy:refs/ heads/merge- v2.4.52- 1-jammy
To ssh://git.
! [rejected] merge-v2.
error: failed to push some refs to 'ssh://<email address hidden>
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
02/04/2022 18:30:35 - ERROR:Command exited 1: git push bryce refs/heads/
02/04/2022 18:30:35 - ERROR:stdout: [Not captured]
02/04/2022 18:30:35 - ERROR:stderr: [Not captured]
Traceback (most recent call last): git-ubuntu/ 773/usr/ bin/git- ubuntu" , line 11, in <module> entry_point( 'gitubuntu= =1.0', 'console_scripts', 'git-ubuntu')() git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ __main_ _.py", line 270, in main exit(args. func(args) ) git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ prepare_ upload. py", line 170, in cli_printargs git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ prepare_ upload. py", line 125, in push git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ git_repository. py", line 1802, in git_run git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ git_repository. py", line 267, in git_run git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ run.py" , line 87, in run git-ubuntu/ 773/usr/ lib/python3/ dist-packages/ gitubuntu/ run.py" , line 64, in run git-ubuntu/ 773/usr/ lib/python3. 8/subprocess. py", line 516, in run ror(retcode, process.args, CalledProcessEr ror: Command '['git', 'push', 'bryce', 'refs/heads/ merge-v2. 4.52-1- jammy:refs/ heads/merge- v2.4.52- 1-jammy' ]' returned non-zero exit status 1. 2.4.52. orig.tar. gz patches/ series md/data/ store_migrate/ 1.0/sample1/ challenges md/data/ store_migrate/ 1.0/sample1/ staging md/data/ store_migrate/ 1.0/sample1/ tmp style/xsl style/xsl/ util style/lang 2.4.52- 1ubuntu1. debian. tar.xz 2.4.52- 1ubuntu1. dsc 2.4.52- 1ubuntu1_ source. buildinfo 2.4.52- 1ubuntu1_ source. changes builds. diff custom. patch apxs.patch CVE-2007- 1742.patch PATH.patch patch 2.4.52- 1ubuntu1_ source. changes ... style/scripts/ prettify. js style/scripts/ prettify. js .* line-length- in-source- file test/modules/ http2/htdocs/ test1/* missing- upstream- signature apache2_ 2.4.52. orig.tar. gz
File "/snap/
load_
File "/snap/
sys.
File "/snap/
headers = push(
File "/snap/
repo.git_run(
File "/snap/
return git_run(
File "/snap/
return run(['git'] + list(args), env=env, **kwargs)
File "/snap/
raise e
File "/snap/
cp = subprocess.run(
File "/snap/
raise CalledProcessEr
subprocess.
dpkg-buildpackage -us -uc -ui -i -I.bzr -I.svn -I.git -S -sa
dpkg-buildpackage: info: source package apache2
dpkg-buildpackage: info: source version 2.4.52-1ubuntu1
dpkg-buildpackage: info: source distribution jammy
dpkg-buildpackage: info: source changed by Bryce Harrington <email address hidden>
dpkg-source -i -I.bzr -I.svn -I.git --before-build .
fakeroot debian/rules clean
dh clean
dh_clean
dpkg-source -i -I.bzr -I.svn -I.git -b .
dpkg-source: warning: upstream signing key but no upstream tarball signature
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building apache2 using existing ./apache2_
dpkg-source: info: using patch list from debian/
dpkg-source: warning: ignoring deletion of directory changes-entries
dpkg-source: warning: ignoring deletion of directory test/modules/
dpkg-source: warning: ignoring deletion of directory test/modules/
dpkg-source: warning: ignoring deletion of directory test/modules/
dpkg-source: warning: ignoring deletion of directory docs/manual/
dpkg-source: warning: ignoring deletion of directory docs/manual/
dpkg-source: warning: ignoring deletion of directory docs/manual/
dpkg-source: info: building apache2 in apache2_
dpkg-source: info: building apache2 in apache2_
dpkg-genbuildinfo --build=source -O../apache2_
dpkg-genchanges -sa --build=source -O../apache2_
dpkg-genchanges: info: including full source code in upload
dpkg-source -i -I.bzr -I.svn -I.git --after-build .
dpkg-source: info: unapplying fix-macro.patch
dpkg-source: info: unapplying reproducible_
dpkg-source: info: unapplying build_suexec-
dpkg-source: info: unapplying customize_
dpkg-source: info: unapplying suexec-
dpkg-source: info: unapplying no_LD_LIBRARY_
dpkg-source: info: unapplying fhs_compliance.
dpkg-buildpackage: info: source-only upload (original source is included)
Now running lintian apache2_
E: apache2 source: source-is-missing docs/manual/
W: apache2 source: mismatched-override source-is-missing docs/manual/
W: apache2 source: mismatched-override very-long-
W: apache2 source: orig-tarball-
N: 7 hints overridden (6 warnings, 1 info); 3 unused overrides
Finished running lintian.