Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480972 - sys-apps/portage-2.1.12.2: repoman ci --echangelog y creates invalid manifests
Summary: sys-apps/portage-2.1.12.2: repoman ci --echangelog y creates invalid manifests
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 472632
  Show dependency tree
 
Reported: 2013-08-14 05:38 UTC by Kent Fredric (IRC: kent\n)
Modified: 2013-08-22 04:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
output of emerge --info sys-apps/portage (einfo,5.49 KB, text/plain)
2013-08-14 05:38 UTC, Kent Fredric (IRC: kent\n)
Details
linked github gists & overlay tree bundled (linked_files.tar.xz,3.52 KB, application/x-xz)
2013-08-14 05:46 UTC, Kent Fredric (IRC: kent\n)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) gentoo-dev 2013-08-14 05:38:27 UTC
Created attachment 355938 [details]
output of emerge --info sys-apps/portage

It seems the "manifest" phase of repoman is executed *before* invoking echangelog, and as a result, the commit commits a manifest without the changelog accounted for.

For instance, I made a mock test repo: 

ECHANGELOG_USER="kentnl@cpan.org" repoman ci -m "Test commit" --echangelog y

Output: https://gist.github.com/kentfredric/6228251/raw/2d2c4d7260cb38119d901b2ed23331f7a56b0c13/gistfile1.txt 

However, you look at the Manifest:

https://gist.github.com/kentfredric/6228254/raw/1533350c363703e2eab20645ed39a51b4a8ab05d/gistfile1.txt 

^ No Changelog.

A second commit:

ECHANGELOG_USER="kentnl@cpan.org" repoman ci -m "Test commit 2" --echangelog y

https://gist.github.com/kentfredric/6228259/raw/9c91d898e4567453c9de07f248f0596888c7646d/gistfile1.txt

And now the Changelog is in it

https://gist.github.com/kentfredric/6228262/raw/e9cb52e512a0c47af4b6b7ff3e452d15478f6b17/gistfile1.txt 


However, the size and signature are from *BEFORE* the changelog was updated, so the manifest is now invalid:

repoman full: https://gist.github.com/kentfredric/6228267/raw/55ef6231fa0b6ac464b541453e1b1de096e6e74b/gistfile1.txt

Calling repoman manifest again, and then calling git diff confirms that the manifest was indeed wrong:

https://gist.github.com/kentfredric/6228271/raw/17119a4905572b11c87a42c9a6d02912b146241a/diff.diff

A textual representation of my synthetic overlay used to replicate the problem: 
https://gist.github.com/kentfredric/6228285/raw/97188b639bc1e6c626d6f81263eb1d1eb430f736/gistfile1.txt
Comment 1 Kent Fredric (IRC: kent\n) gentoo-dev 2013-08-14 05:46:39 UTC
Created attachment 355940 [details]
linked github gists & overlay tree bundled

Just attaching these output lines as a tarball as a backup plan if the gists ever go down ( however unlikley it may be )
Comment 2 Agostino Sarubbo gentoo-dev 2013-08-14 09:11:16 UTC
Repoman auto-writes the changelog, so you don't need to pass that option
Comment 3 Kent Fredric (IRC: kent\n) gentoo-dev 2013-08-14 09:23:36 UTC
(In reply to Agostino Sarubbo from comment #2)
> Repoman auto-writes the changelog, so you don't need to pass that option

Only on the main tree, where /metadata/layout.conf says <update-changelog = true>

The point remains, on overlays, where I'm using git, it creates broken manifests.
Comment 4 Kent Fredric (IRC: kent\n) gentoo-dev 2013-08-14 09:28:23 UTC
Just for completeness, I also tried making the test overlay have <update-changelog = true> in the configuration.

This is just a guarantee that the manifest WILL be wrong for *EVERYONE* who uses repoman, instead of just those who pass the parameter.

Maybe its VCS dependent, but its certainly happening for me on Git.
Comment 6 Zac Medico gentoo-dev 2013-08-22 04:50:38 UTC
This is fixed in 2.2.1.