- support removing packages when more than one slot is found

- grow the polling frequency of the download speed info to 4Hz


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@523 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2007-09-26 11:19:26 +00:00
parent e690fab8c5
commit 4edeff9f30
3 changed files with 24 additions and 7 deletions
+3 -1
View File
@@ -2,7 +2,8 @@ TODO list:
- reagent: complete smartapps section
CLIENT:
- trap elogs in reagent
- add etc-update-alike support
- add etc-update alike support
- add env-update alike support
- add preinst/postinst/prerm/postrm scripts
- centralized management?
- move branches to version naming (3.5, 3.6, 3.7) instead of using stable, unstable...
@@ -23,6 +24,7 @@ TODO list:
- world looks inside the latest (if run with "upgrade")
- world: add --prune option that removes packages not available anymore
- write a dependency reorder function for each level of the dependency tree?
- world upgrade should switch python to 2.5
Project Status:
+20 -5
View File
@@ -1746,9 +1746,14 @@ def worldUpdate(ask = False, pretend = False, verbose = False, onlyfetch = False
print_info(red(" @@ ")+darkred("Packages matching not available:\t\t")+bold(str(len(removedList))))
print_info(red(" @@ ")+blue("Packages matching already up to date:\t")+bold(str(len(fineList))))
print_info(red(" @@ ")+blue("Calculating queue..."))
result = installPackages(atomsdata = updateList, ask = ask, pretend = pretend, verbose = verbose, onlyfetch = onlyfetch, deepdeps = upgrade)
closeClientDatabase(clientDbconn)
if (updateList):
print_info(red(" @@ ")+blue("Calculating queue..."))
result = installPackages(atomsdata = updateList, ask = ask, pretend = pretend, verbose = verbose, onlyfetch = onlyfetch, deepdeps = upgrade)
else:
print_info(red(" @@ ")+blue("All up to date."))
result = 0,0
clientDbconn.closeDB() # I don't need to save cache
return result
def installPackages(packages = [], atomsdata = [], ask = False, pretend = False, verbose = False, deps = True, emptydeps = False, onlyfetch = False, deepdeps = False):
@@ -2128,8 +2133,18 @@ def removePackages(packages, ask = False, pretend = False, verbose = False, deps
installedfrom = clientDbconn.retrievePackageFromInstalledTable(idpackage)
if (systemPackage) and (systemPackagesCheck):
print_warning(darkred(" # !!! ")+red("(")+bold(str(atomscounter))+"/"+blue(str(totalatoms))+red(")")+" "+bold(pkgatom)+red(" is a vital package. Removal forbidden."))
continue
# check if the package is slotted and exist more than one installed first
sysresults = clientDbconn.atomMatch(dep_getkey(pkgatom), multiMatch = True)
slots = set()
if sysresults[1] == 0:
for x in sysresults[0]:
slots.add(clientDbconn.retrieveSlot(x))
if len(slots) < 2:
print_warning(darkred(" # !!! ")+red("(")+bold(str(atomscounter))+"/"+blue(str(totalatoms))+red(")")+" "+bold(pkgatom)+red(" is a vital package. Removal forbidden."))
continue
else:
print_warning(darkred(" # !!! ")+red("(")+bold(str(atomscounter))+"/"+blue(str(totalatoms))+red(")")+" "+bold(pkgatom)+red(" is a vital package. Removal forbidden."))
continue
plainRemovalQueue.append(idpackage)
print_info(" # "+red("(")+bold(str(atomscounter))+"/"+blue(str(totalatoms))+red(")")+" "+bold(pkgatom)+" | Installed from: "+red(installedfrom))
+1 -1
View File
@@ -434,7 +434,7 @@ etpFileTransfer = {
'datatransfer': 0,
'oldgather': 0,
'gather': 0,
'transferpollingtime': float(1)/2 # 0.5secs = 2Hz
'transferpollingtime': float(1)/4 # 0.25secs = 4Hz
}
# Create paths