[equo] use etpConst['spmetprev'] and etpConst['spmdbid']

This commit is contained in:
Fabio Erculiani
2012-04-16 22:41:35 +02:00
parent 753195d15d
commit d0f86c3e8d
3 changed files with 11 additions and 10 deletions

View File

@@ -568,7 +568,7 @@ def _database_spmsync(entropy_client):
if oldidpackages:
oldidpackage = oldidpackages[-1]
mydata['revision'] = 9999 # can't do much more
mydata['revision'] = etpConst['spmetprev'] # can't do much more
if oldidpackage:
mydata['revision'] = \
entropy_client.installed_repository().retrieveRevision(
@@ -579,7 +579,7 @@ def _database_spmsync(entropy_client):
idpk = entropy_client.installed_repository().handlePackage(mydata,
forcedRevision = mydata['revision'])
entropy_client.installed_repository().storeInstalledPackage(idpk,
"spm-db")
etpConst['spmdbid'])
os.remove(temp_pkg_path)
print_info(brown(" @@ ") + \
@@ -692,7 +692,7 @@ def _database_generate(entropy_client):
continue
# Try to see if it's possible to use the revision of a possible old db
mydata['revision'] = 9999
mydata['revision'] = etpConst['spmetprev']
# create atom string
myatom = entropy.dep.create_package_atom_string(mydata['category'],
mydata['name'], mydata['version'], mydata['versiontag'])
@@ -712,7 +712,7 @@ def _database_generate(entropy_client):
idpk = entropy_client.installed_repository().addPackage(mydata,
revision = mydata['revision'], do_commit = False)
entropy_client.installed_repository().storeInstalledPackage(idpk,
"spm-db")
etpConst['spmdbid'])
os.remove(temp_pkg_path)
print_info(red(" %s." % (_("All the Source Package Manager packages have been injected into Entropy database"),) ))

View File

@@ -236,9 +236,9 @@ def inflate_handler(entropy_client, mytbz2s, savedir):
back = True
)
# append arbitrary revision
mydata['revision'] = 9999
mydata['revision'] = etpConst['spmetprev']
mydata['download'] = mydata['download'][:-len(etpConst['packagesext'])] + \
"~9999" + etpConst['packagesext']
"~" + str(etpConst['spmetprev']) + etpConst['packagesext']
# migrate to the proper format
final_tbz2path = os.path.join(os.path.dirname(etptbz2path),
os.path.basename(mydata['download']))

View File

@@ -449,14 +449,15 @@ def upgrade_packages(entropy_client, onlyfetch = False, replay = False,
remove.sort()
manual_removal.sort()
print_info(red(" @@ ") + \
blue("%s." % (
if manual_removal or remove:
print_info(red(" @@ ") + \
blue("%s." % (
_("On the system there are packages that are not available anymore in the online repositories"),
)
)
)
print_info(red(" @@ ")+blue(
_("Even if they are usually harmless, it is suggested (after proper verification) to remove them.")))
print_info(red(" @@ ")+blue(
_("Even if they are usually harmless, it is suggested (after proper verification) to remove them.")))
if manual_removal:
_show_package_removal_info(