Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564988 - sys-apps/portage: skip metadata-transfer when sync fails or server timestamp has not changed
Summary: sys-apps/portage: skip metadata-transfer when sync fails or server timestamp ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 240187 565172
  Show dependency tree
 
Reported: 2015-11-06 07:32 UTC by Zac Medico
Modified: 2016-02-03 14:15 UTC (History)
1 user (show)

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-11-06 07:32:26 UTC
The metadata transfer and hooks can be relatively time consuming, so they should be skipped when sync fails or the server timestamp has not changed.
Comment 1 Zac Medico gentoo-dev 2015-11-06 07:52:01 UTC
There's a patch in the following branch:

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

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/341e483d8597cbbab383758a368fa79c
Comment 2 Zac Medico gentoo-dev 2015-11-06 20:31:37 UTC
Some people might be working under the assumption that emerge --sync will *always* call their hook, in order to trigger some system administration tasks that have little or nothing to do with the sync operation itself. It's impossible to speculate how many people might be relying on this sort of behavior.

So, I'll think about exposing an environment variable to the hooks which will allow them to decide if anything relevant has changed.
Comment 3 Zac Medico gentoo-dev 2015-11-07 04:28:17 UTC
It should be safe enough to just skip the metadata transfer.
Comment 6 Zac Medico gentoo-dev 2015-11-07 20:51:10 UTC
I've posted a patch for GitSync:

https://archives.gentoo.org/gentoo-portage-dev/message/b2929c6895056d147311efcb41c53f44
Comment 7 Zac Medico gentoo-dev 2015-11-07 21:29:48 UTC
This git patch is in master branch:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=9921cfeb51ab8d9dc128aa5e927d29fc675b28b4
Comment 8 Alexander Berntsen (RETIRED) gentoo-dev 2016-02-03 14:15:22 UTC
Released in 2.2.25.