From 74b01db66bb9734926aedb8fcde1a72c40e3eb04 Mon Sep 17 00:00:00 2001 From: lxnay Date: Tue, 7 Aug 2007 16:17:39 +0000 Subject: [PATCH] do not use a different portdir anymore git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@408 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- client/equoTools.py | 2 +- libraries/entropyConstants.py | 8 ++++---- libraries/portageTools.py | 26 ++++++++++++++------------ 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/client/equoTools.py b/client/equoTools.py index 7ff6f74b9..88f9ef04f 100644 --- a/client/equoTools.py +++ b/client/equoTools.py @@ -458,7 +458,7 @@ def atomMatchInRepository(atom, dbconn, caseSensitive = True): #print newerPackage[1] return newerPackage[0],0 - elif (direction.find(">") != -1) or (direction.find("<") != -1): # any revision within the version specified + elif (direction.find(">") != -1) or (direction.find("<") != -1): # FIXME: add slot scopes #print direction+" direction" # remove revision (-r0 if none) diff --git a/libraries/entropyConstants.py b/libraries/entropyConstants.py index 17f5b4d87..e2bfe0ac1 100644 --- a/libraries/entropyConstants.py +++ b/libraries/entropyConstants.py @@ -221,7 +221,7 @@ ETP_TMPDIR = "/tmp" ETP_RANDOM = str(random.random())[2:7] ETP_TMPFILE = "/.random-"+ETP_RANDOM+".tmp" ETP_REPODIR = "/packages/"+ETP_ARCH_CONST -ETP_PORTDIR = "/portage" +ETP_PORTDIR = "/usr/portage" ETP_DISTFILESDIR = "/distfiles" ETP_DBDIR = "/database/"+ETP_ARCH_CONST ETP_DBFILE = "packages.db" @@ -254,9 +254,9 @@ etpConst = { 'smartappsdir': ETP_DIR+ETP_SMARTAPPSDIR, # etpConst['smartappsdir'] location where smart apps files are places 'packagesstoredir': ETP_DIR+ETP_STOREDIR, # etpConst['packagesstoredir'] --> directory where .tbz2 files are stored waiting for being processed by reagent 'packagessuploaddir': ETP_DIR+ETP_UPLOADDIR, # etpConst['packagessuploaddir'] --> directory where .tbz2 files are stored waiting for being uploaded to our main mirror - 'portagetreedir': ETP_DIR+ETP_PORTDIR, # directory where is stored our local portage tree - 'distfilesdir': ETP_DIR+ETP_PORTDIR+ETP_DISTFILESDIR, # directory where our sources are downloaded - 'overlaysdir': ETP_DIR+ETP_PORTDIR+"/local/layman", # directory where overlays are stored + 'portagetreedir': ETP_PORTDIR, # directory where is stored our local portage tree + 'distfilesdir': ETP_PORTDIR+ETP_DISTFILESDIR, # directory where our sources are downloaded + 'overlaysdir': ETP_PORTDIR+"/local/layman", # directory where overlays are stored 'overlays': "", # variable PORTDIR_OVERLAY 'overlaysconffile': ETP_CONF_DIR+"/layman.cfg", # layman configuration file 'confdir': ETP_CONF_DIR, # directory where entropy stores its configuration diff --git a/libraries/portageTools.py b/libraries/portageTools.py index d5e890c4c..4827a0c2b 100644 --- a/libraries/portageTools.py +++ b/libraries/portageTools.py @@ -28,6 +28,7 @@ # Portage initialization ##################################################################################### +''' def initializePortageTree(): portage.settings.unlock() portage.settings['PORTDIR'] = etpConst['portagetreedir'] @@ -35,18 +36,19 @@ def initializePortageTree(): portage.settings['PORTDIR_OVERLAY'] = etpConst['overlays'] portage.settings.lock() portage.portdb.__init__(etpConst['portagetreedir']) +''' # Fix for wrong cache entries - DO NOT REMOVE import os from entropyConstants import * -os.environ['PORTDIR'] = etpConst['portagetreedir'] -os.environ['PORTDIR_OVERLAY'] = etpConst['overlays'] -os.environ['DISTDIR'] = etpConst['distfilesdir'] +#os.environ['PORTDIR'] = etpConst['portagetreedir'] +#os.environ['PORTDIR_OVERLAY'] = etpConst['overlays'] +#os.environ['DISTDIR'] = etpConst['distfilesdir'] import portage import portage_const from portage_dep import isvalidatom, isspecific, isjustname, dep_getkey, dep_getcpv #FIXME: Use the ones from entropyTools #from serverConstants import * -initializePortageTree() +#initializePortageTree() # colours support from outputTools import * @@ -363,21 +365,21 @@ def emerge(atom, options, outfile = None, redirect = "&>", simulate = False): entropyTools.spawnCommand("rm -rf "+outfile) # Get specified USE flags - useflags = " " + useflags = " USE='" useflags += getUSEFlags() - useflags += " " + useflags += "' " # Get specified MAKEOPTS - makeopts = " " + makeopts = " MAKEOPTS='" makeopts += getMAKEOPTS() - makeopts += " " + makeopts += "' " # Get specified CFLAGS - cflags = " " + cflags = " CFLAGS='" cflags += getCFLAGS() - cflags += " " + cflags += "' " # Get specified LDFLAGS - ldflags = " " + ldflags = " LDFLAGS='" ldflags += getLDFLAGS() - ldflags += " " + ldflags += "' " portageLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_VERBOSE,"emerge: USE: "+useflags+" | CFLAGS: "+cflags+" | MAKEOPTS: "+makeopts+" | LDFLAGS: "+ldflags)