update rescueTools to work with chroots
git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@820 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -1303,7 +1303,7 @@ def removePackageFromGentooDatabase(atom):
|
||||
@input package: dictionary containing information collected by installPackages (important are atom, slot, category, name, version)
|
||||
@output: 0 = all fine, >0 = error!
|
||||
'''
|
||||
def installPackageIntoGentooDatabase(infoDict,packageFile, newidpackage = -1):
|
||||
def installPackageIntoGentooDatabase(infoDict, packageFile, newidpackage = -1):
|
||||
|
||||
# handle gentoo-compat
|
||||
_portage_avail = False
|
||||
@@ -1327,7 +1327,7 @@ def installPackageIntoGentooDatabase(infoDict,packageFile, newidpackage = -1):
|
||||
# atomsfound = _portage_getInstalledAtoms(key) too slow!
|
||||
|
||||
### REMOVE
|
||||
# parse slot and match and remove)
|
||||
# parse slot and match and remove
|
||||
if atomsfound:
|
||||
pkgToRemove = ''
|
||||
for atom in atomsfound:
|
||||
|
||||
@@ -199,7 +199,7 @@ def database(options):
|
||||
# spawn process
|
||||
if os.path.isfile(etpConst['packagestmpfile']):
|
||||
os.remove(etpConst['packagestmpfile'])
|
||||
os.system("find / -mount 1> "+etpConst['packagestmpfile'])
|
||||
os.system("find "+etpConst['systemroot']+"/ -mount 1> "+etpConst['packagestmpfile'])
|
||||
if not os.path.isfile(etpConst['packagestmpfile']):
|
||||
print_error(darkred("Attention: ")+red("find couldn't generate an output file."))
|
||||
return
|
||||
@@ -232,10 +232,10 @@ def database(options):
|
||||
# content
|
||||
content = dbconn.retrieveContent(idpackage)
|
||||
for file in content:
|
||||
if file in filelist:
|
||||
if etpConst['systemroot']+file in filelist:
|
||||
pkgsfound.add((idpackage,repo))
|
||||
atoms[(idpackage,repo)] = idpackageatom
|
||||
filelist.difference_update(set(content))
|
||||
filelist.difference_update(set([etpConst['systemroot']+x for x in content]))
|
||||
break
|
||||
dbconn.closeDB()
|
||||
|
||||
@@ -450,6 +450,8 @@ def getinfo(dict = False):
|
||||
info['Equo pidfile'] = etpConst['pidfile']
|
||||
info['Entropy database tag'] = etpConst['databasestarttag']
|
||||
info['Repositories'] = etpRepositories
|
||||
info['System Config'] = etpSys
|
||||
info['UI Config'] = etpUi
|
||||
|
||||
# client database info
|
||||
conn = False
|
||||
|
||||
@@ -1225,6 +1225,8 @@ class etpDatabase:
|
||||
raise Exception, "I tried to insert a needed library but then, fetching it returned -1. There's something broken."
|
||||
|
||||
def addLicense(self,license):
|
||||
if not license:
|
||||
license = ' ' # workaround for broken license entries
|
||||
dbLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_VERBOSE,"addLicense: adding License -> "+str(license))
|
||||
self.cursor.execute(
|
||||
'INSERT into licenses VALUES '
|
||||
|
||||
Reference in New Issue
Block a user