[entropy.const] drop yet another global variable, this time: etpConst['smartpackagesdir']
This commit is contained in:
@@ -17,7 +17,7 @@ else:
|
||||
from commands import getoutput
|
||||
import shutil
|
||||
|
||||
from entropy.const import etpConst, etpUi
|
||||
from entropy.const import etpConst, etpSys, etpUi
|
||||
from entropy.output import red, darkred, darkgreen, brown, bold, \
|
||||
print_info, print_error, print_warning
|
||||
from entropy.i18n import _
|
||||
@@ -405,14 +405,16 @@ def smartpackagegenerator(entropy_client, matched_pkgs):
|
||||
print_error(darkred(" * ")+red("%s." % (_("Unpack failed due to unknown reasons"),)))
|
||||
return rc
|
||||
|
||||
if not os.path.isdir(etpConst['smartpackagesdir']):
|
||||
os.makedirs(etpConst['smartpackagesdir'])
|
||||
smartpackages_dir = os.path.join(
|
||||
etpConst['entropyworkdir'], "smartpackages", etpSys['arch'])
|
||||
if not os.path.isdir(smartpackages_dir):
|
||||
os.makedirs(smartpackages_dir)
|
||||
print_info(darkgreen(" * ")+red(_("Compressing smart package")))
|
||||
atoms = []
|
||||
for x in matchedAtoms:
|
||||
atoms.append(matchedAtoms[x]['atom'].split(os.path.sep)[1])
|
||||
atoms = '+'.join(atoms)
|
||||
smart_package_path = etpConst['smartpackagesdir'] + os.path.sep + atoms + \
|
||||
smart_package_path = smartpackages_dir + os.path.sep + atoms + \
|
||||
".app"
|
||||
rc = entropy.tools.compress_tar_bz2(smart_package_path, unpackdir+"/content")
|
||||
if rc != 0:
|
||||
|
||||
@@ -190,7 +190,6 @@ def const_default_settings(rootdir):
|
||||
default_etp_dbfile = "packages.db"
|
||||
default_etp_dbclientfile = "equo.db"
|
||||
default_etp_client_repodir = "/client"
|
||||
default_etp_smartpackagesdir = "/smartpackages/"+ETP_ARCH_CONST
|
||||
default_etp_cachesdir = "/caches/"
|
||||
default_etp_securitydir = "/glsa/"
|
||||
default_etp_setsdirname = "sets"
|
||||
@@ -216,9 +215,6 @@ def const_default_settings(rootdir):
|
||||
'installdir': '/usr/lib/entropy',
|
||||
# etpConst['packagestmpdir'] --> temp directory
|
||||
'packagestmpdir': default_etp_dir+default_etp_tmpdir,
|
||||
# etpConst['smartpackagesdir'] location where
|
||||
# smart packages files are places
|
||||
'smartpackagesdir': default_etp_dir+default_etp_smartpackagesdir,
|
||||
|
||||
# directory where entropy stores its configuration
|
||||
'confdir': default_etp_confdir,
|
||||
|
||||
Reference in New Issue
Block a user