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.
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.
The rsync command also needs a --delete, shouldnt hurt to have it in the default case as well.
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.