diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-03-11 00:28:12 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-03-11 00:28:12 +0000 |
commit | 20219aa0ff7e8eed28c20e46686cfd01de320faa (patch) | |
tree | 673c276ec5eb9e1ee18d0854d5fcfe28e193b2c9 | |
parent | 5cbad62bf29d1c9bc85d0f7ce87d29a90a9388e4 (diff) | |
download | portage-20219aa0ff7e8eed28c20e46686cfd01de320faa.tar.gz portage-20219aa0ff7e8eed28c20e46686cfd01de320faa.tar.bz2 portage-20219aa0ff7e8eed28c20e46686cfd01de320faa.zip |
Consolidate duplicate "myebuild" logic in the dblink.treewalk() method.
svn path=/main/trunk/; revision=2842
-rw-r--r-- | pym/portage.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/pym/portage.py b/pym/portage.py index 1b8b020af..af446927e 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5974,12 +5974,9 @@ class dblink: writemsg_stdout(">>> Merging %s %s %s\n" % (self.mycpv,"to",destroot)) # run preinst script - if myebuild: - # if we are merging a new ebuild, use *its* pre/postinst rather than using the one in /var/db/pkg - # (if any). - a=doebuild(myebuild,"preinst",root,self.settings,cleanup=cleanup,use_cache=0,tree=self.treetype) - else: - a=doebuild(inforoot+"/"+self.pkg+".ebuild","preinst",root,self.settings,cleanup=cleanup,use_cache=0,tree=self.treetype) + if myebuild is None: + myebuild = os.path.join(inforoot, self.pkg + ".ebuild") + a = doebuild(myebuild, "preinst", root, self.settings, cleanup=cleanup, use_cache=0, tree=self.treetype) # XXX: Decide how to handle failures here. if a != 0: @@ -6078,12 +6075,7 @@ class dblink: portage_locks.unlockfile(mylock) #do postinst script - if myebuild: - # if we are merging a new ebuild, use *its* pre/postinst rather than using the one in /var/db/pkg - # (if any). - a=doebuild(myebuild,"postinst",root,self.settings,use_cache=0,tree=self.treetype) - else: - a=doebuild(inforoot+"/"+self.pkg+".ebuild","postinst",root,self.settings,use_cache=0,tree=self.treetype) + a = doebuild(myebuild, "postinst", root, self.settings, use_cache=0, tree=self.treetype) # XXX: Decide how to handle failures here. if a != 0: |