[bin] add --keyslot support to bump_kernel_tag_mods*
This commit is contained in:
parent
d476b1d242
commit
bdf9cf7734
@ -12,9 +12,12 @@ if only_injected:
|
|||||||
do_spm_repo = "--no-spm-repo" not in args
|
do_spm_repo = "--no-spm-repo" not in args
|
||||||
if not do_spm_repo:
|
if not do_spm_repo:
|
||||||
args.remove("--no-spm-repo")
|
args.remove("--no-spm-repo")
|
||||||
|
keyslot = "--keyslot" in args
|
||||||
|
if keyslot:
|
||||||
|
args.remove("--keyslot")
|
||||||
|
|
||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
print("bump_kernel_tag_mods <query tag> <compile tag> <source (query) repo> <destination entropy repo> [--only-injected] [--no-spm-repo]")
|
print("bump_kernel_tag_mods <query tag> <compile tag> <source (query) repo> <destination entropy repo> [--only-injected] [--no-spm-repo] [--keyslot]")
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
kernel_tag = args.pop(0)
|
kernel_tag = args.pop(0)
|
||||||
@ -48,6 +51,9 @@ try:
|
|||||||
injected_atoms = []
|
injected_atoms = []
|
||||||
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:
|
||||||
|
atom_str = repo.retrieveKeySlotAggregated(pkg_id)
|
||||||
|
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)
|
||||||
|
@ -8,9 +8,12 @@ args = sys.argv[1:]
|
|||||||
do_spm_repo = "--no-spm-repo" not in args
|
do_spm_repo = "--no-spm-repo" not in args
|
||||||
if not do_spm_repo:
|
if not do_spm_repo:
|
||||||
args.remove("--no-spm-repo")
|
args.remove("--no-spm-repo")
|
||||||
|
keyslot = "--keyslot" in args
|
||||||
|
if keyslot:
|
||||||
|
args.remove("--keyslot")
|
||||||
|
|
||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
print("bump_kernel_tag_mods <query tag> <compile tag> <source (query) repo> <destination entropy repo> [--no-spm-repo]")
|
print("bump_kernel_tag_mods <query tag> <compile tag> <source (query) repo> <destination entropy repo> [--no-spm-repo] [--keyslot]")
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
kernel_tag = args.pop(0)
|
kernel_tag = args.pop(0)
|
||||||
@ -40,6 +43,9 @@ try:
|
|||||||
if spm_repo is not None:
|
if spm_repo is not None:
|
||||||
atom_str += "::" + spm_repo
|
atom_str += "::" + spm_repo
|
||||||
injected_atoms.append(atom_str)
|
injected_atoms.append(atom_str)
|
||||||
|
if keyslot:
|
||||||
|
injected_atoms = [repo.retrieveKeySlotAggregated(pkg_id) for pkg_id in pkg_ids]
|
||||||
|
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()
|
||||||
|
Loading…
Reference in New Issue
Block a user