Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52045 - Less than optimal logic in snapshot_target.py
Summary: Less than optimal logic in snapshot_target.py
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All All
: High normal
Assignee: John Davis (zhen) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-25 14:26 UTC by Brandon Hale (RETIRED)
Modified: 2004-06-01 23:22 UTC (History)
1 user (show)

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


Attachments
preliminary code for keeping the portdir (catalyst-portdirkeep.diff,1.59 KB, patch)
2004-05-26 08:22 UTC, Brandon Hale (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brandon Hale (RETIRED) gentoo-dev 2004-05-25 14:26:42 UTC
I've been editing alot of stuff in my Portage snapshots for preliminary hardened + embedded stages. This means I have to edit, remake snapshot, rinse, repeat quite a few times on some occassions, and the process in Catalyst is less than optimal and really takes awhile on my IDE disk. Catalyst creates a new temp dir, and uses rsync to copy my /usr/portage, less packages + distfiles here, then compresses with tar. Good deal. Anyway, the next time I recreate a snapshot, it starts by wiping this dir and copying all over... ouch.
By leaving the tree in place and using rsync properly, it would be fairly easy to sync /usr/portage and this second tree with much less overhead, saving me tons of time recreating snapshots. It is also possible to tell tar to exlude dirs or maybe regexs, so the tar could be taken of the tree in place without even bothering with a copy.
Comment 1 Brandon Hale (RETIRED) gentoo-dev 2004-05-26 08:22:26 UTC
Created attachment 32074 [details, diff]
preliminary code for keeping the portdir

My first time using Python, a little rough... this adds an
options="portdirkeep" that will stop the snapshot target from cleaning the
snapshot dir before creating a new snapshot.
It fails if portdirkeep is not set because the PORTDIRKEEP isnt in the settings
array.. not sure how to fix, but you get the basic idea here.
Comment 2 Brandon Hale (RETIRED) gentoo-dev 2004-05-26 08:24:04 UTC
The rsync command also needs a --delete, shouldnt hurt to have it in the default case as well.
Comment 3 John Davis (zhen) (RETIRED) gentoo-dev 2004-06-01 23:22:48 UTC
actually, I don't see a reason to delete the tmpdir at all ;) I changed the snapshot behavior so that it automatically uses the more efficient way. Should be fixed in CVS.