1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-14 20:09:49 +03:00

repo_missing: return pkgnames, not subpkgnames (!1757)

"breeze-icons" depends on "qt5-qtbase-dev", but
"pmbootstrap repo_missing" should return "qt5-qtbase" instead.

This patch fixes it, as one can see with:
$ pmbootstrap repo_missing --built breeze-icons --overview
This commit is contained in:
Oliver Smith 2019-02-15 15:32:39 +01:00
parent 5dd53a3e0a
commit f3ba0de360
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 34 additions and 18 deletions

View file

@ -101,10 +101,10 @@ def test_helpers_package_depends_recurse(args):
""" Test pmb.helpers.package.depends_recurse() """
# Put fake data into the pmb.helpers.package.get() cache
cache = {"a": {"depends": ["b", "c"]},
"b": {"depends": []},
"c": {"depends": ["d"]},
"d": {"depends": ["b"]}}
cache = {"a": {False: {"pkgname": "a", "depends": ["b", "c"]}},
"b": {False: {"pkgname": "b", "depends": []}},
"c": {False: {"pkgname": "c", "depends": ["d"]}},
"d": {False: {"pkgname": "d", "depends": ["b"]}}}
args.cache["pmb.helpers.package.get"]["armhf"] = cache
# Normal runs
@ -121,22 +121,22 @@ def test_helpers_package_check_arch_package(args):
""" Test pmb.helpers.package.check_arch(): binary = True """
# Put fake data into the pmb.helpers.package.get() cache
func = pmb.helpers.package.check_arch
cache = {"a": {"arch": []}}
cache = {"a": {False: {"arch": []}}}
args.cache["pmb.helpers.package.get"]["armhf"] = cache
cache["a"]["arch"] = ["all !armhf"]
cache["a"][False]["arch"] = ["all !armhf"]
assert func(args, "a", "armhf") is False
cache["a"]["arch"] = ["all"]
cache["a"][False]["arch"] = ["all"]
assert func(args, "a", "armhf") is True
cache["a"]["arch"] = ["noarch"]
cache["a"][False]["arch"] = ["noarch"]
assert func(args, "a", "armhf") is True
cache["a"]["arch"] = ["armhf"]
cache["a"][False]["arch"] = ["armhf"]
assert func(args, "a", "armhf") is True
cache["a"]["arch"] = ["aarch64"]
cache["a"][False]["arch"] = ["aarch64"]
assert func(args, "a", "armhf") is False