handle files sync better and continuing to work on removePackages()

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@448 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2007-08-12 09:13:42 +00:00
parent 43d709cc67
commit 1008d941e5
2 changed files with 10 additions and 15 deletions
+6 -10
View File
@@ -2600,18 +2600,14 @@ def removePackages(packages, ask = False, pretend = False, verbose = False, deps
atomscounter += 1
rematom = clientDbconn.retrieveAtom(idpackage)
installedfrom = clientDbconn.retrievePackageFromInstalledTable(idpackage)
# get needed info
pkgver = clientDbconn.retrieveVersion(idpackage)
pkgtag = clientDbconn.retrieveVersionTag(idpackage)
if not pkgtag:
pkgtag = "NoTag"
pkgrev = clientDbconn.retrieveRevision(idpackage)
print_info(" # "+red("(")+bold(str(atomscounter))+"/"+blue(str(totalatoms))+red(")")+" "+bold(rematom)+" | Installed from: "+red(installedfrom))
print_info("\t"+red("Versioning:\t")+" "+red(pkgver)+" / "+blue(pkgtag)+" / "+(str(pkgrev)))
repositoryInfo = bold("[")+red("from: ")+brown(installedfrom)+bold("]")
stratomscounter = str(atomscounter)
while len(stratomscounter) < len(totalatoms):
stratomscounter = " "+stratomscounter
print_info(" # "+red("(")+bold(stratomscounter)+"/"+blue(str(totalatoms))+red(")")+repositoryInfo+" "+blue(rematom))
if (ask):
rc = askquestion(" Would you like to add these packages to your removal queue?")
rc = askquestion(" Would you like to add these packages to the removal queue?")
if rc != "No":
for x in choosenRemovalQueue:
removalQueue.append(x)
+4 -5
View File
@@ -100,17 +100,16 @@ def sync(options, justTidy = False):
found = True
break
if (not found):
if (not repoBin.endswith(etpConst['packageshashfileext'])): # filter hash files
# then remove
removeList.append(repoBin)
# then remove
removeList.append(repoBin)
if (removeList == []):
if (not removeList):
activatorLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"sync: no packages to remove from the lirrors.")
print_info(green(" * ")+red("No packages to remove from the mirrors."))
print_info(green(" * ")+red("Syncronization across mirrors completed."))
return
print_info(green(" * ")+red("This is the list of the packages that would be removed from the mirrors: "))
print_info(green(" * ")+red("This is the list of files that would be removed from the mirrors: "))
for file in removeList:
print_info(green("\t* ")+yellow(file))