Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 557962 - sys-apps/portage: Manifest.write(): produce stable/predictable Manifest mtime for rsync
Summary: sys-apps/portage: Manifest.write(): produce stable/predictable Manifest mtime...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All All
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 567920
Blocks: 549914
  Show dependency tree
 
Reported: 2015-08-16 21:12 UTC by Zac Medico
Modified: 2015-12-10 15:51 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2015-08-16 21:12:32 UTC
In Manifest.write(), if the mtime is set to the max of all involved files (including the existing Manifest), then conversion of thin manifests to thick manifests will result in Manifest files with stable/predictable mtime for rsync (bug 557192).
Comment 1 Zac Medico gentoo-dev 2015-08-17 03:13:30 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_557962

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/eb907a3b724bfecfca4de2b80c99c624
Comment 2 Zac Medico gentoo-dev 2015-08-17 03:41:53 UTC
This is in the master branch now:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=6dacd0ed9f6dc206f4932d42bbb36300f56e71f7
Comment 3 Fabian Groffen gentoo-dev 2015-08-22 08:06:58 UTC
Alternative is to take the mtime of the parent dir, and retain that, including the dir itself, such as in:

http://hg.code.sf.net/p/gentooprefixtree/code/rev/0679eab6c25f

In any case, make sure you retain the mtime of the dir, else it will cause it to be rsync-ed every time as well, which is unnecessary.
Comment 4 Zac Medico gentoo-dev 2015-08-22 17:15:46 UTC
(In reply to Fabian Groffen from comment #3)
> In any case, make sure you retain the mtime of the dir, else it will cause
> it to be rsync-ed every time as well, which is unnecessary.

The dir mtime should be irrelevant, since we added --omit-dir-times to PORTAGE_RSYNC_OPTS a couple of years ago:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=367bbdfdab866c00c0d826732d4672ed3863fa09
Comment 5 Brian Dolbec (RETIRED) gentoo-dev 2015-09-22 01:32:42 UTC
/etc/portage/repo.postsync.d/example
Comment 6 Brian Dolbec (RETIRED) gentoo-dev 2015-09-22 01:37:46 UTC
correction: Released in portage-2.2.21