[bin] force ::repo on portage atoms by default for bump_kernel_tag_mods*
This commit is contained in:
parent
0fe549a9d5
commit
7cba9e8014
@ -9,9 +9,12 @@ args = sys.argv[1:]
|
||||
only_injected = "--only-injected" in args
|
||||
if only_injected:
|
||||
args.remove("--only-injected")
|
||||
do_spm_repo = "--no-spm-repo" not in args
|
||||
if not do_spm_repo:
|
||||
args.remove("--no-spm-repo")
|
||||
|
||||
if len(args) < 3:
|
||||
print("bump_kernel_tag_mods <query tag> <compile tag> <source (query) repo> <destination entropy repo>")
|
||||
print("bump_kernel_tag_mods <query tag> <compile tag> <source (query) repo> <destination entropy repo> [--only-injected] [--no-spm-repo]")
|
||||
raise SystemExit(1)
|
||||
|
||||
kernel_tag = args.pop(0)
|
||||
@ -41,8 +44,16 @@ try:
|
||||
else:
|
||||
normal_pkgs.append(pkg_id)
|
||||
|
||||
normal_atoms = [entropy.dep.remove_tag(repo.retrieveAtom(pkg_id)) for pkg_id in normal_pkgs]
|
||||
injected_atoms = [entropy.dep.remove_tag(repo.retrieveAtom(pkg_id)) for pkg_id in injected_pkgs]
|
||||
normal_atoms = []
|
||||
injected_atoms = []
|
||||
for lst in (normal_pkgs, injected_pkgs):
|
||||
for pkg_id in lst:
|
||||
atom_str = entropy.dep.remove_tag(repo.retrieveAtom(pkg_id))
|
||||
if do_spm_repo:
|
||||
spm_repo = repo.retrieveSpmRepository(pkg_id)
|
||||
if spm_repo is not None:
|
||||
atom_str += "::" + spm_repo
|
||||
lst.append(atom_str)
|
||||
finally:
|
||||
srv.shutdown()
|
||||
|
||||
|
@ -5,9 +5,12 @@ import os
|
||||
import tempfile
|
||||
|
||||
args = sys.argv[1:]
|
||||
do_spm_repo = "--no-spm-repo" not in args
|
||||
if not do_spm_repo:
|
||||
args.remove("--no-spm-repo")
|
||||
|
||||
if len(args) < 3:
|
||||
print("bump_kernel_tag_mods <query tag> <compile tag> <source (query) repo> <destination entropy repo>")
|
||||
print("bump_kernel_tag_mods <query tag> <compile tag> <source (query) repo> <destination entropy repo> [--no-spm-repo]")
|
||||
raise SystemExit(1)
|
||||
|
||||
kernel_tag = args.pop(0)
|
||||
@ -29,6 +32,14 @@ try:
|
||||
if not pkg_ids:
|
||||
print("!!! no packages for kernel_tag")
|
||||
|
||||
injected_atoms = []
|
||||
for pkg_id in injected_atoms:
|
||||
atom_str = entropy.dep.remove_tag(repo.retrieveAtom(pkg_id))
|
||||
if do_spm_repo:
|
||||
spm_repo = repo.retrieveSpmRepository(pkg_id)
|
||||
if spm_repo is not None:
|
||||
atom_str += "::" + spm_repo
|
||||
injected_atoms.append(atom_str)
|
||||
injected_atoms = [entropy.dep.remove_tag(repo.retrieveAtom(pkg_id)) for pkg_id in pkg_ids]
|
||||
finally:
|
||||
srv.shutdown()
|
||||
|
Loading…
Reference in New Issue
Block a user