Lines 1262-1279
def action_info(settings, trees, myopts, myfiles):
Link Here
|
1262 |
|
1262 |
|
1263 |
for x in myvars: |
1263 |
for x in myvars: |
1264 |
if portage.isvalidatom(x): |
1264 |
if portage.isvalidatom(x): |
1265 |
pkg_matches = trees["/"]["vartree"].dbapi.match(x) |
1265 |
vardb = trees["/"]["vartree"].dbapi |
1266 |
pkg_matches = [portage.catpkgsplit(cpv)[1:] for cpv in pkg_matches] |
1266 |
pkg_matches = vardb.match(x) |
1267 |
pkg_matches.sort(key=cmp_sort_key(portage.pkgcmp)) |
1267 |
|
1268 |
pkgs = [] |
1268 |
versions = [] |
1269 |
for pn, ver, rev in pkg_matches: |
1269 |
for cpv in pkg_matches: |
1270 |
if rev != "r0": |
1270 |
ver = portage.versions.cpv_getversion(cpv) |
1271 |
pkgs.append(ver + "-" + rev) |
1271 |
repo = vardb.aux_get(cpv, ["repository"])[0] |
|
|
1272 |
if repo != "gentoo": |
1273 |
versions.append(ver + "::" + repo) |
1272 |
else: |
1274 |
else: |
1273 |
pkgs.append(ver) |
1275 |
versions.append(ver) |
1274 |
if pkgs: |
1276 |
|
1275 |
pkgs = ", ".join(pkgs) |
1277 |
versions.sort(cmp=lambda a,b: portage.versions.vercmp(a.split("::")[0], b.split("::")[0])) |
1276 |
print("%-20s %s" % (x+":", pkgs)) |
1278 |
|
|
|
1279 |
if versions: |
1280 |
versions = ", ".join(versions) |
1281 |
print("%-20s %s" % (x+":", versions)) |
1277 |
else: |
1282 |
else: |
1278 |
print("%-20s %s" % (x+":", "[NOT VALID]")) |
1283 |
print("%-20s %s" % (x+":", "[NOT VALID]")) |
1279 |
|
1284 |
|
1280 |
- |
|
|