Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 249337

Summary: pre_sync script
Product: Portage Development Reporter: Alexander Sulfrian <alexander>
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: alex_y_xu
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alexander Sulfrian 2008-11-30 02:38:54 UTC
Hi,
it would be nice if there is a possibility to execute a script piror sync, but with 2.2_rc16 it is not possible either with bashrc or as seperate script in bin.

The reason is, that i want to customize emerge with some own portage-bashrc scripts to support overlays in some way and during that scripting i missed it to have the possibility to execute scripts during sync.

Alex

btw. why is it handled different: during normal emerge the different stages execute bashrc with a enviroment variable and after emerge --sync the /etc/portage/bin/post_sync is executet. Why isn't emerge --sync also calling the bashrc with EBUILD_PHASE set to post_sync and add maybe pre_sync.
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2008-11-30 14:45:52 UTC
(In reply to comment #0)
> btw. why is it handled different: during normal emerge the different stages
> execute bashrc with a enviroment variable and after emerge --sync the
> /etc/portage/bin/post_sync is executet. Why isn't emerge --sync also calling
> the bashrc with EBUILD_PHASE set to post_sync and add maybe pre_sync.

Because syncing is not an ebuild phase, it's a conceptually completely different thing. There is a lot more to ebuild phase execution than just setting a single variable, trying to force sync into the same framework would be a real mess.
Comment 2 Alexander Sulfrian 2008-11-30 15:30:01 UTC
(In reply to comment #1)
> [...]  trying to force sync into the same framework would
> be a real mess.

Ah ok. But is it possible to add something similar to the syncprocess? Like pre_sync?

Comment 3 Alex Xu (Hello71) 2015-06-11 16:26:55 UTC
for syncing overlays, if you insist that it should be done in portage (I say wrapper script is better), there seems to be no reason why postsync.d cannot be used.