From 1008d941e5edcf9aa85e6a5ff91c3affab5bb131 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Sun, 12 Aug 2007 09:13:42 +0000 Subject: [PATCH] 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 --- client/equoTools.py | 16 ++++++---------- libraries/activatorTools.py | 9 ++++----- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/client/equoTools.py b/client/equoTools.py index b91af275e..83ca2f2da 100644 --- a/client/equoTools.py +++ b/client/equoTools.py @@ -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) diff --git a/libraries/activatorTools.py b/libraries/activatorTools.py index 88c2df961..5ad7c3993 100644 --- a/libraries/activatorTools.py +++ b/libraries/activatorTools.py @@ -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))