Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output directive will cause invalid initial push to salsa-project #107

Closed
suntong opened this issue Dec 2, 2018 · 1 comment
Closed

Comments

@suntong
Copy link

suntong commented Dec 2, 2018

(Converted to issue from https://lists.debian.org/debian-go/2018/12/msg00001.html)

Summary: the output of dh-make-golang that gives instructions on what do next will cause invalid initial push to salsa-project.

Here is what I'm trying to follow (The whole log is at http://paste.debian.net/1053985/)

$ dh-make-golang github.com/danverbraganza/varcaser
2018/11/25 09:07:42 To create the packaging git repository on salsa, use:
2018/11/25 09:07:42     dh-make-golang create-salsa-project
golang-github-danverbraganza-varcaser
2018/11/25 09:07:42
2018/11/25 09:07:42 Once you are happy with your packaging, push it to
salsa using:
2018/11/25 09:07:42     git remote set-url origin
git@salsa.debian.org:go-team/packages/golang-github-danverbraganza-varcaser.git
2018/11/25 09:07:42     gbp push
                        ^^^^^^^^

Here is my work log:

$ git branch -v
* master       9078e4c - [+] Initial packaging
  pristine-tar fbba72a pristine-tar data for
golang-github-danverbraganza-varcaser_0.0~git20151108.ce61ec4.orig.tar.xz
  upstream     88a5d5c New upstream version 0.0~git20151108.ce61ec4

$ gbp push --dry-run --verbose
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', 'symbolic-ref', 'HEAD']
gbp:debug: ['git', 'show-ref', 'refs/heads/master']
gbp:debug: ['git', 'config', 'branch.master.remote']
gbp:debug: ['git', 'tag', '-l', 'debian/0.0_git20151108.ce61ec4-1']
gbp:debug: ['git', 'tag', '-l', 'upstream/0.0_git20151108.ce61ec4']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify',
'upstream/0.0_git20151108.ce61ec4^{commit}']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'refs/heads/upstream']
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
gbp:debug: ['git', 'log', '--pretty=format:%H', '--no-merges',
'--grep=pristine-tar .*
golang-github-danverbraganza-varcaser_0.0~git20151108.ce61ec4.orig.tar.*',
'pristine-tar', '--']
gbp:debug: Found pristine-tar commit at
'31cf4b66f3eb7b7391cd90ddba762acb37ee6ea9'
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify',
'31cf4b66f3eb7b7391cd90ddba762acb37ee6ea9^{commit}']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify',
'refs/heads/pristine-tar']
gbp:info: Dry-run: Pushing upstream/0.0_git20151108.ce61ec4 to origin
gbp:debug: ['git', 'push', 'origin', 'tag',
'upstream/0.0_git20151108.ce61ec4', '--dry-run']
gbp:info: Dry-run: Pushing refs/heads/pristine-tar to
origin:refs/heads/pristine-tar
gbp:debug: ['git', 'push', 'origin', '--dry-run',
'refs/heads/pristine-tar:refs/heads/pristine-tar']
gbp:info: Dry-run: Pushing refs/heads/upstream to origin:refs/heads/upstream
gbp:debug: ['git', 'push', 'origin', '--dry-run',
'refs/heads/upstream:refs/heads/upstream']

I.e., when it is actually run, the first branch being pushed is upstream, making golang-github-danverbraganza-varcaser's default branch to be upstream. Moreover, my default master branch is not being pushed at all.

This is incorrect.

Either gbp push behavior is changed or the above instructional comment should be changed, so the next newcomers will not fall into the same pitiful again.

Thx

$ apt-cache policy git-buildpackage
git-buildpackage:
  Installed: 0.9.10+nmu1
  Candidate: 0.9.10+nmu1
  Version table:
 *** 0.9.10+nmu1 100
         50 http://cdn-fastly.deb.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status
     0.8.12.2 500
        500 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages
@stapelberg
Copy link
Collaborator

I think this is a consequence of git-buildpackage: cannot use gbp push without tagging a release.

After tagging a release, gbp push --dry-run --verbose includes the debian branch.

Is there a good git-buildpackage documentation page we can reference in the output for this? I’ll also send a mail to that bug report to make Guido aware this change caused more fallout.

elboulangero added a commit to elboulangero/dh-make-golang that referenced this issue Jan 19, 2021
As mentiond in Debian#107, running 'gbp push' when there's no debian tag is
not the right thing to do,  as it will only push the upstream branch.
Consequences are:

1. The default gitlab branch is set to the upstream branch instead of
   the debian branch.
2. The debian branch is not pushed and needs to be pushed manually
   anyway.

I believer the best is just to run 'git push origin <debian-branch>'
first, and then run gbp push.

Closes: Debian#107
elboulangero added a commit to elboulangero/dh-make-golang that referenced this issue Jan 19, 2021
As mentiond in Debian#107, running 'gbp push' when there's no debian tag is
not the right thing to do,  as it will only push the upstream branch.
Consequences are:

1. The default gitlab branch is set to the upstream branch instead of
   the debian branch.
2. The debian branch is not pushed and needs to be pushed manually
   anyway.

I believer the best is just to run 'git push origin <debian-branch>'
first, and then run gbp push.

Closes: Debian#107
@elboulangero elboulangero mentioned this issue Jan 19, 2021
elboulangero added a commit to elboulangero/dh-make-golang that referenced this issue Aug 3, 2021
As mentiond in Debian#107, running 'gbp push' when there's no debian tag is
not the right thing to do,  as it will only push the upstream branch.
Consequences are:

1. The default gitlab branch is set to the upstream branch instead of
   the debian branch.
2. The debian branch is not pushed and needs to be pushed manually
   anyway.

I believe that the best thing to do instead is just to run 'git push
origin <debian-branch>' first, and then run 'gbp push'.

Closes: Debian#107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants