one more fix
git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@387 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
+8
-6
@@ -941,7 +941,7 @@ def generateDependencyTree(unsatisfiedDeps):
|
||||
|
||||
if (dependenciesNotFound):
|
||||
# Houston, we've got a problem
|
||||
print "error! DEPS NOT FOUND -> "+str(dependenciesNotFound)
|
||||
#print "error! DEPS NOT FOUND -> "+str(dependenciesNotFound)
|
||||
treeview = {}
|
||||
treeview[0] = {}
|
||||
treeview[0][0] = dependenciesNotFound
|
||||
@@ -1184,9 +1184,6 @@ def installFile(package, infoDict = None):
|
||||
tofile = fromfile[len(imageDir):]
|
||||
#print "copying file "+fromfile+" to "+tofile
|
||||
|
||||
user = os.stat(fromfile)[4]
|
||||
group = os.stat(fromfile)[5]
|
||||
|
||||
if os.access(tofile,os.F_OK):
|
||||
try:
|
||||
os.remove(tofile)
|
||||
@@ -1200,8 +1197,13 @@ def installFile(package, infoDict = None):
|
||||
rc = os.system("/bin/cp "+fromfile+" "+tofile)
|
||||
if (rc != 0):
|
||||
return 4
|
||||
os.chown(tofile,user,group)
|
||||
shutil.copystat(fromfile,tofile)
|
||||
try:
|
||||
user = os.stat(fromfile)[4]
|
||||
group = os.stat(fromfile)[5]
|
||||
os.chown(tofile,user,group)
|
||||
shutil.copystat(fromfile,tofile)
|
||||
except:
|
||||
pass # sometimes, gentoo packages are fucked up and contain broken symlinks
|
||||
|
||||
os.system("rm -rf "+imageDir)
|
||||
|
||||
|
||||
+18
-15
@@ -595,7 +595,7 @@ def getPackageDependencyList(atom):
|
||||
depcache = {}
|
||||
def getPackageRuntimeDependencies(NEEDED):
|
||||
|
||||
portageLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_VERBOSE,"getPackageRuntimeDependencies: called. ")
|
||||
portageLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_VERBOSE,"getPackageRuntimeDependencies: called.")
|
||||
|
||||
if not os.path.isfile(NEEDED):
|
||||
return [],[] # all empty
|
||||
@@ -683,7 +683,15 @@ def synthetizeRoughDependencies(roughDependencies, useflags = None):
|
||||
useflags = useflags.split()
|
||||
for atom in roughDependencies:
|
||||
|
||||
if atom.endswith("?"):
|
||||
if atom.startswith("("):
|
||||
if (openOr):
|
||||
openParenthesisFromOr += 1 # 1
|
||||
openParenthesis += 1 # 1
|
||||
|
||||
elif atom.endswith("?"):
|
||||
|
||||
if (useFlagQuestion) and (not useMatch): # if we're already in a question and the question is not accepted, skip the cycle
|
||||
continue
|
||||
# we need to see if that useflag is enabled
|
||||
useFlag = atom.split("?")[0]
|
||||
useFlagQuestion = True # V
|
||||
@@ -693,21 +701,16 @@ def synthetizeRoughDependencies(roughDependencies, useflags = None):
|
||||
useflags.index(checkFlag)
|
||||
useMatch = True
|
||||
except:
|
||||
useMatch = False
|
||||
useMatch = False # V
|
||||
else:
|
||||
try:
|
||||
useflags.index(useFlag)
|
||||
useMatch = True # V
|
||||
useMatch = True
|
||||
except:
|
||||
useMatch = False
|
||||
useMatch = False # V
|
||||
|
||||
|
||||
if atom.startswith("("):
|
||||
if (openOr):
|
||||
openParenthesisFromOr += 1 # 1
|
||||
openParenthesis += 1 # 1 | 2
|
||||
|
||||
if atom.startswith(")"):
|
||||
elif atom.startswith(")"):
|
||||
if (openOr):
|
||||
# remove last "_or_" from dependencies
|
||||
if (openParenthesisFromOr == 1):
|
||||
@@ -725,12 +728,12 @@ def synthetizeRoughDependencies(roughDependencies, useflags = None):
|
||||
useFlagQuestion = False
|
||||
useMatch = False
|
||||
|
||||
if atom.startswith("||"):
|
||||
elif atom.startswith("||"):
|
||||
openOr = True # V
|
||||
|
||||
if (atom.find("/") != -1) and (not atom.startswith("!")) and (not atom.endswith("?")):
|
||||
elif (atom.find("/") != -1) and (not atom.startswith("!")) and (not atom.endswith("?")):
|
||||
# it's a package name <pkgcat>/<pkgname>-???
|
||||
if ((useFlagQuestion) and (useMatch)) or ((not useFlagQuestion) and (not useMatch)):
|
||||
if ((useFlagQuestion == True) and (useMatch == True)) or ((useFlagQuestion == False) and (useMatch == False)):
|
||||
# check if there's an OR
|
||||
if (openOr):
|
||||
dependencies += atom
|
||||
@@ -743,7 +746,7 @@ def synthetizeRoughDependencies(roughDependencies, useflags = None):
|
||||
dependencies += atom
|
||||
dependencies += " "
|
||||
|
||||
if atom.startswith("!") and (not atom.endswith("?")):
|
||||
elif atom.startswith("!") and (not atom.endswith("?")):
|
||||
if ((useFlagQuestion) and (useMatch)) or ((not useFlagQuestion) and (not useMatch)):
|
||||
conflicts += atom
|
||||
if (openOr):
|
||||
|
||||
Reference in New Issue
Block a user