fix another USE flag handling bug

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@403 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2007-08-07 11:49:03 +00:00
parent 1e31dadbc7
commit 8a8b1bfb7b
2 changed files with 14 additions and 14 deletions

View File

@@ -1031,11 +1031,11 @@ def generateDependencyTree(atomInfo, emptydeps = False):
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
return treeview,1
return treeview,-2
newtree = {} # tree list
if (tree):
@@ -1112,7 +1112,7 @@ def getRequiredPackages(foundAtoms, emptydeps = False):
x += 1
del deptree
return newdeptree,True
return newdeptree,0
'''
@@ -1663,6 +1663,7 @@ def printPackageInfo(idpackage,dbconn, clientSearch = False, strictOutput = Fals
pkgdigest = dbconn.retrieveDigest(idpackage)
pkgcreatedate = convertUnixTimeToHumanTime(int(dbconn.retrieveDateCreation(idpackage)))
pkgsize = bytesIntoHuman(pkgsize)
pkgdeps = dbconn.retrieveDependencies(idpackage)
pkghome = dbconn.retrieveHomepage(idpackage)
pkgslot = dbconn.retrieveSlot(idpackage)
@@ -1710,6 +1711,10 @@ def printPackageInfo(idpackage,dbconn, clientSearch = False, strictOutput = Fals
print_info(darkgreen(" Size:\t\t\t")+blue(str(pkgsize)))
print_info(darkgreen(" Download:\t\t")+brown(str(pkgbin)))
print_info(darkgreen(" Checksum:\t\t")+brown(str(pkgdigest)))
if (pkgdeps):
print_info(darkred(" ##")+darkgreen(" Dependencies:"))
for pdep in pkgdeps:
print_info(darkred(" ## \t\t\t")+brown(pdep))
print_info(darkgreen(" Homepage:\t\t")+red(pkghome))
print_info(darkgreen(" Description:\t\t")+pkgdesc)
if (not strictOutput):
@@ -2104,8 +2109,7 @@ def installPackages(packages, ask = False, pretend = False, verbose = False, dep
if (deps):
treepackages, result = getRequiredPackages(foundAtoms, emptydeps)
# add dependencies, explode them
if (result == 1):
if (result == -2):
print_error(red(" @@ ")+blue("Cannot find needed dependencies: ")+str(treepackages))
return 130, -1
elif (result == -1): # no database connection

View File

@@ -399,19 +399,18 @@ def extractPkgData(package, etpBranch = "unstable", structuredLayout = False):
etpData['useflags'] = []
f = open(tbz2TmpDir+dbUSE,"r")
tmpUSE = f.readline().strip()
for x in tmpUSE.split():
if (x):
etpData['useflags'].append(x)
f.close()
'''
try:
f = open(tbz2TmpDir+dbIUSE,"r")
tmpIUSE = f.readline().strip().split()
f.close()
except IOError:
tmpIUSE = []
for i in tmpIUSE:
if tmpUSE.find(" "+i+" ") != -1:
etpData['useflags'].append(i)
else:
etpData['useflags'].append("-"+i)
'''
print_info(yellow(" * ")+red("Getting package provide content..."),back = True)
# Fill Provide
@@ -427,9 +426,6 @@ def extractPkgData(package, etpBranch = "unstable", structuredLayout = False):
except:
pass
# cleanup
etpData['useflags'] = filterDuplicatedEntries(etpData['useflags'])
print_info(yellow(" * ")+red("Getting package sources information..."),back = True)
# Fill sources
etpData['sources'] = []