From a73081516f075f9cb0b3eae8f6f0eae68aa84bfc Mon Sep 17 00:00:00 2001 From: lxnay Date: Tue, 22 Apr 2008 01:01:45 +0000 Subject: [PATCH] Entropy/ServerInterface: - fix broken packages removal Entropy/EquoInterface: - add env ACCEPT_LICENSE support git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1828 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- client/text_ui.py | 7 +++++++ libraries/databaseTools.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/client/text_ui.py b/client/text_ui.py index 27251c392..3b5b9dc18 100644 --- a/client/text_ui.py +++ b/client/text_ui.py @@ -636,6 +636,13 @@ def installPackages(packages = [], atomsdata = [], deps = True, emptydeps = Fals ### Before even starting the fetch, make sure that the user accepts their licenses licenses = Equo.get_licenses_to_accept(runQueue) + # is there ACCEPT_LICENSE in ENV? + myaccept_license = os.getenv("ACCEPT_LICENSE") + if myaccept_license: + myaccept_license = myaccept_license.split() + for mylic in myaccept_license: + if mylic in licenses: + licenses.pop(mylic) if licenses: print_info(red(" @@ ")+blue("You need to accept the licenses below:")) keys = licenses.keys() diff --git a/libraries/databaseTools.py b/libraries/databaseTools.py index 98901e325..be10d7a78 100644 --- a/libraries/databaseTools.py +++ b/libraries/databaseTools.py @@ -672,7 +672,7 @@ class etpDatabase: mypath = self.ServiceInterface.quickpkg(myatom,mydest) except: # remove broken bin before raising - mypath = os.path.join(mydest,myatom+etpConst['packagesext']) + mypath = os.path.join(mydest,os.path.basename(myatom)+etpConst['packagesext']) if os.path.isfile(mypath): os.remove(mypath) import traceback