- fix PID handling, especially when calling const_setupEntropyPid() directly


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2163 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2008-06-20 08:46:55 +00:00
parent ae577f7ed1
commit be57888cd5
2 changed files with 5 additions and 11 deletions
-9
View File
@@ -12197,16 +12197,7 @@ class PortageInterface:
def _portage_doebuild(self, myebuild, mydo, tree, cpv, portage_tmpdir = None, licenses = []):
# myebuild = path/to/ebuild.ebuild with a valid unpacked xpak metadata
# tree = "bintree"
# tree = "bintree"
# cpv = atom
'''
# This is a demonstration that Sabayon team love Gentoo so much
[01:46] <zmedico> if you want something to stay in mysettings
[01:46] <zmedico> do mysettings.backup_changes("CFLAGS") for example
[01:46] <zmedico> otherwise your change can get lost inside doebuild()
[01:47] <zmedico> because it calls mysettings.reset()
# ^^^ this is DA MAN!
'''
# mydbapi = portage.fakedbapi(settings=portage.settings)
# vartree = portage.vartree(root=myroot)
+5 -2
View File
@@ -477,8 +477,7 @@ def initConfig_entropyConstants(rootdir):
const_defaultSettings(rootdir)
const_readEntropyRelease()
const_createWorkingDirectories()
if not "--no-pid-handling" in sys.argv:
const_setupEntropyPid()
const_setupEntropyPid()
const_readEntropySettings()
const_readRepositoriesSettings()
const_readSocketSettings()
@@ -1106,6 +1105,10 @@ def const_readEquoSettings():
etpConst['configprotectskip'].append(etpConst['systemroot']+x)
def const_setupEntropyPid():
if "--no-pid-handling" in sys.argv:
return
# PID creation
pid = os.getpid()
if os.path.isfile(etpConst['pidfile']):