Bug #16167
closedmake-snapshot does not work from fresh checkout
Description
So far, I was using this sequence to get Ruby snapshot:
git clone https://github.com/ruby/ruby ~/ruby
cd ~/ruby && tool/make-snapshot -packages=xz -git=https://github.com/ruby/ruby tmp
But that does not work anymore. It seems I am not supposed to use the -git option anymore. So lets drop it:
$ tool/make-snapshot -packages=xz ./tmp
Exporting @98f919ed47a136c9a51c7ab5fa39ffb4965a1687
Cloning into '/tmp/ruby-snapshot20190913-95-1lk1fkq/ruby'...
done.
fatal: couldn't find remote ref refs/notes/commits
fatal: the remote end hung up unexpectedly
Traceback (most recent call last):
6: from tool/make-snapshot:578:in `<main>'
5: from tool/make-snapshot:578:in `collect'
4: from tool/make-snapshot:578:in `block in <main>'
3: from tool/make-snapshot:285:in `package'
2: from /builddir/ruby/tool/lib/vcs.rb:587:in `export'
1: from /builddir/ruby/tool/lib/vcs.rb:115:in `system'
/builddir/ruby/tool/lib/vcs.rb:115:in `system': Command failed with exit 128: git (RuntimeError)
So something is broken.
When I added -exported=.
option, finally I've got something:
$ tool/make-snapshot -packages=xz -exported=. tmp
Traceback (most recent call last):
6: from tool/make-snapshot:578:in `<main>'
5: from tool/make-snapshot:578:in `collect'
4: from tool/make-snapshot:578:in `block in <main>'
3: from tool/make-snapshot:360:in `package'
2: from tool/make-snapshot:360:in `chdir'
1: from tool/make-snapshot:362:in `block in package'
/builddir/ruby/tool/lib/vcs.rb:614:in `export_changelog': need notes/commits tree; run `git fetch origin refs/notes/commits:refs/notes/commits` in the repository (RuntimeError)
Running this command, it helped, but that appears to be less than ideal UX.
Updated by nobu (Nobuyoshi Nakada) over 4 years ago
- Status changed from Open to Closed
Applied in changeset git|e9c7fc7ca9bc15a9f84bdc356f7b6fac12988ccb.
Continue to export even if no notes/commits
Just exporting may not imply exporting ChangeLog which needs
notes/commits. [Bug #16167]
Updated by nobu (Nobuyoshi Nakada) over 4 years ago
I'm going to deprecate -exported
option because it can't make stable-checksum tarballs.
Updated by vo.x (Vit Ondruch) over 4 years ago
- Status changed from Closed to Assigned
nobu (Nobuyoshi Nakada) wrote:
I'm going to deprecate
-exported
option because it can't make stable-checksum tarballs.
I used -exported
just because I was struggling to get the make-snapshot work, so deprecating the option is fine by me.
However, this is the latest version output:
# tool/make-snapshot -packages=xz tmp
Exporting @395e5f510cb3788dd2b57f1f9fa9be8980564af8
Cloning into '/tmp/ruby-snapshot20190914-42-fwocoa/ruby'...
done.
fatal: couldn't find remote ref refs/notes/commits
fatal: the remote end hung up unexpectedly
No notes/commits tree
Traceback (most recent call last):
6: from tool/make-snapshot:573:in `<main>'
5: from tool/make-snapshot:573:in `collect'
4: from tool/make-snapshot:573:in `block in <main>'
3: from tool/make-snapshot:355:in `package'
2: from tool/make-snapshot:355:in `chdir'
1: from tool/make-snapshot:357:in `block in package'
/builddir/ruby/tool/lib/vcs.rb:616:in `export_changelog': need notes/commits tree; run `git fetch origin refs/notes/commits:refs/notes/commits` in the repository (RuntimeError)
So this is in line with the changes referred here, but I somehow fail to see why the refs/notes/commits are not fetched automatically? Why should I do this myself? Previously, the make-snapshot did not need any additional actions.
So my initial problem, i.e. "make-snapshot does not work from fresh checkout" is not resolved.
Updated by nobu (Nobuyoshi Nakada) over 4 years ago
vo.x (Vit Ondruch) wrote:
So this is in line with the changes referred here, but I somehow fail to see why the refs/notes/commits are not fetched automatically? Why should I do this myself? Previously, the make-snapshot did not need any additional actions.
I wanted to get rid of modifying the source tree.
Updated by nobu (Nobuyoshi Nakada) over 4 years ago
- Status changed from Assigned to Closed
Applied in changeset git|6cad0644248d5acbaf3a2e8de4ff6d88b3dd2cb4.
Try to fetch commits notes to the source tree automatically
[Bug #16167]