[bin] fixup dep string (remove ~ in case of --keyslot and drop tag part of the slot)
This commit is contained in:
parent
bdf9cf7734
commit
f112e078af
@ -52,9 +52,9 @@ try:
|
|||||||
for lst in (normal_pkgs, injected_pkgs):
|
for lst in (normal_pkgs, injected_pkgs):
|
||||||
for pkg_id in lst:
|
for pkg_id in lst:
|
||||||
if keyslot:
|
if keyslot:
|
||||||
atom_str = repo.retrieveKeySlotAggregated(pkg_id)
|
atom_str = entropy.dep.remove_tag_from_slot(repo.retrieveKeySlotAggregated(pkg_id))
|
||||||
else:
|
else:
|
||||||
atom_str = entropy.dep.remove_tag(repo.retrieveAtom(pkg_id))
|
atom_str = "~" + entropy.dep.remove_tag(repo.retrieveAtom(pkg_id))
|
||||||
if do_spm_repo:
|
if do_spm_repo:
|
||||||
spm_repo = repo.retrieveSpmRepository(pkg_id)
|
spm_repo = repo.retrieveSpmRepository(pkg_id)
|
||||||
if spm_repo is not None:
|
if spm_repo is not None:
|
||||||
@ -74,7 +74,7 @@ if not (normal_atoms or injected_atoms):
|
|||||||
raise SystemExit(0)
|
raise SystemExit(0)
|
||||||
|
|
||||||
if normal_atoms and not only_injected:
|
if normal_atoms and not only_injected:
|
||||||
rc = subprocess.call(["emerge", "-av", "--keep-going"] + ["~" + x for x in normal_atoms])
|
rc = subprocess.call(["emerge", "-av", "--keep-going"] + [x for x in normal_atoms])
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
raise SystemExit(rc)
|
raise SystemExit(rc)
|
||||||
subprocess.call(["etc-update"], shell = True)
|
subprocess.call(["etc-update"], shell = True)
|
||||||
@ -86,7 +86,7 @@ if normal_atoms and not only_injected:
|
|||||||
if injected_atoms:
|
if injected_atoms:
|
||||||
tmp_dir = tempfile.mkdtemp()
|
tmp_dir = tempfile.mkdtemp()
|
||||||
os.environ['PKGDIR'] = tmp_dir
|
os.environ['PKGDIR'] = tmp_dir
|
||||||
rc = subprocess.call(["emerge", "-Bav", "--nodeps"] + ["~" + x for x in injected_atoms])
|
rc = subprocess.call(["emerge", "-Bav", "--nodeps"] + [x for x in injected_atoms])
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
raise SystemExit(rc)
|
raise SystemExit(rc)
|
||||||
tbz2s = []
|
tbz2s = []
|
||||||
|
@ -44,9 +44,9 @@ try:
|
|||||||
atom_str += "::" + spm_repo
|
atom_str += "::" + spm_repo
|
||||||
injected_atoms.append(atom_str)
|
injected_atoms.append(atom_str)
|
||||||
if keyslot:
|
if keyslot:
|
||||||
injected_atoms = [repo.retrieveKeySlotAggregated(pkg_id) for pkg_id in pkg_ids]
|
injected_atoms = [entropy.dep.remove_tag_from_slot(repo.retrieveKeySlotAggregated(pkg_id)) for pkg_id in pkg_ids]
|
||||||
else:
|
else:
|
||||||
injected_atoms = [entropy.dep.remove_tag(repo.retrieveAtom(pkg_id)) for pkg_id in pkg_ids]
|
injected_atoms = ["~" + entropy.dep.remove_tag(repo.retrieveAtom(pkg_id)) for pkg_id in pkg_ids]
|
||||||
finally:
|
finally:
|
||||||
srv.shutdown()
|
srv.shutdown()
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ else:
|
|||||||
|
|
||||||
tmp_dir = tempfile.mkdtemp()
|
tmp_dir = tempfile.mkdtemp()
|
||||||
os.environ['PKGDIR'] = tmp_dir
|
os.environ['PKGDIR'] = tmp_dir
|
||||||
rc = subprocess.call(["emerge", "-Bav", "--keep-going"] + ["~" + x for x in injected_atoms])
|
rc = subprocess.call(["emerge", "-Bav", "--keep-going"] + [x for x in injected_atoms])
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
raise SystemExit(rc)
|
raise SystemExit(rc)
|
||||||
tbz2s = []
|
tbz2s = []
|
||||||
|
Loading…
Reference in New Issue
Block a user