Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 32074 Details for
Bug 52045
Less than optimal logic in snapshot_target.py
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
preliminary code for keeping the portdir
catalyst-portdirkeep.diff (text/plain), 1.59 KB, created by
Brandon Hale (RETIRED)
on 2004-05-26 08:22:26 UTC
(
hide
)
Description:
preliminary code for keeping the portdir
Filename:
MIME Type:
Creator:
Brandon Hale (RETIRED)
Created:
2004-05-26 08:22:26 UTC
Size:
1.59 KB
patch
obsolete
>diff -ruN /usr/lib/catalyst/catalyst catalyst/catalyst >--- /usr/lib/catalyst/catalyst 2004-05-26 11:18:41.000000000 -0400 >+++ catalyst/catalyst 2004-05-26 10:52:51.406808000 -0400 >@@ -95,6 +95,10 @@ > print "Distcc support enabled." > myspec["DISTCC"]="1" > >+if "portdirkeep" in string.split(myspec["options"]): >+ print "Portdir saving enabled." >+ myspec["PORTDIRKEEP"]="1" >+ > if myconf.has_key("envscript"): > print "Envscript support enabled." > myspec["ENVSCRIPT"]=myconf["envscript"] >diff -ruN /usr/lib/catalyst/modules/snapshot_target.py catalyst/modules/snapshot_target.py >--- /usr/lib/catalyst/modules/snapshot_target.py 2004-05-26 11:18:41.000000000 -0400 >+++ catalyst/modules/snapshot_target.py 2004-05-26 11:16:55.715240000 -0400 >@@ -31,13 +31,15 @@ > self.setup() > print "Creating Portage tree snapshot "+self.settings["version_stamp"]+" from "+self.settings["portdir"]+"..." > mytmp=self.settings["tmp_path"] >- if os.path.exists(mytmp): >+ if os.path.exists(mytmp) and not self.settings["PORTDIRKEEP"]=="1": > cmd("rm -rf "+mytmp,"Could not remove existing directory: "+mytmp) >- os.makedirs(mytmp) >+ os.makedirs(mytmp) > cmd("rsync -a --exclude /packages/ --exclude /distfiles/ --exclude CVS/ "+self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure") > print "Compressing Portage snapshot tarball..." > cmd("tar cjf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage","Snapshot creation failure") >- self.cleanup() >+ print self.settings["options"] >+ if not self.settings["PORTDIRKEEP"]=="1": >+ self.cleanup() > > def cleanup(self): > print "Cleaning up temporary snapshot directory..."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 52045
: 32074