Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] update a (exported) portage tree which is in use
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3920
Location: Hamburg

PostPosted: Sat Jan 19, 2013 10:02 am    Post subject: [solved] update a (exported) portage tree which is in use Reply with quote

Am I allowed to sync a portage tree while that (exported) tree is used by another system where a emerge is currently running ?
As long as portage itself isn't updated, the (remote) emerge shouldn't be affected, or ?


Last edited by toralf on Sat Jan 19, 2013 8:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Sat Jan 19, 2013 4:16 pm    Post subject: Reply with quote

It's better to not sync while emerge is running. The reason being an ebuild could be deleted which is scheduled to be merged in the other running emerge. There are some other reasons too, but you get the gist of it ;)
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3920
Location: Hamburg

PostPosted: Sat Jan 19, 2013 7:41 pm    Post subject: Reply with quote

dol-sen wrote:
The reason being an ebuild could be deleted which is scheduled to be merged in the other running emerge.
Ah, so the ebuild is read (again) if the package is in turn ?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9507
Location: beyond the rim

PostPosted: Sat Jan 19, 2013 8:39 pm    Post subject: Reply with quote

Yes and no, the ebuild itself isn't actually read during dependency calculation, only when the actual build starts (well, under normal circumstances). Same for eclasses, patch files and some other stuff.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3920
Location: Hamburg

PostPosted: Sat Jan 19, 2013 8:57 pm    Post subject: Reply with quote

understood - thx.
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Sat Jan 19, 2013 10:42 pm    Post subject: Reply with quote

If you want non-blocking updating, there are other methods of sharing the tree. Namely using it as a local rsync mirror of which there are several forum threads, probably a wiki article or two about it. But then you have multiple copies of it locally. The alternative is to just pay attention to when you do the sync and when you have emerge running on systems. It could even be possible to wrap emerge with code that sets a lock that stops emerge from performing one action (sync) when the other is running (merge) and vice-versa.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3920
Location: Hamburg

PostPosted: Sun Jan 20, 2013 10:09 am    Post subject: Reply with quote

dol-sen wrote:
IIt could even be possible to wrap emerge with code that sets a lock that stops emerge from performing one action (sync) when the other is running (merge) and vice-versa.
Probably that's my choice, I don't want duplicate the tree.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sun Jan 20, 2013 10:20 am    Post subject: Reply with quote

they are seriously too conservative toralf, as soon as emerge is emerging something, all work is done on your PORTAGE_TMPDIR
so except the next emerge that may fail because the ebuild has been removed, it won't distrub your current emerge program and stop it, so yes, your openoffice build won't be stop even if you empty the tree, you just risk your emerge -u world been stopped.

Now it just depend how "buggy" it is for you to have emerge system|world been stopped.
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Sun Jan 20, 2013 7:10 pm    Post subject: Reply with quote

While I haven't done it myself since I don't have the need...

It's been recommended that using sqaushfs for the tree (generate the image on the server) and sharing that image to be downloaded by the clients is much better. The sqaushfs images are an order of magnitude smaller than an expanded tree. And since each client has it's own copy, it will not encounter any problems like above. Then each client just RCU updates to the new image as it's available.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum