forked from Mirror/pmbootstrap
pmb.helpers.pmaports: search apkbuild path only if package exists (!1896)
This commit is contained in:
parent
0c179a5cf9
commit
20de238ff6
1 changed files with 20 additions and 17 deletions
|
@ -44,6 +44,7 @@ def guess_main_dev(args, subpkgname):
|
|||
:returns: full path to the pmaport or None
|
||||
"""
|
||||
pkgname = subpkgname[:-4]
|
||||
if pkgname in get_list(args):
|
||||
paths = _glob_apkbuilds(args, pkgname)
|
||||
if paths:
|
||||
logging.debug(subpkgname + ": guessed to be a subpackage of " +
|
||||
|
@ -86,6 +87,7 @@ def guess_main(args, subpkgname):
|
|||
pkgname = "-".join(words)
|
||||
|
||||
# Look in pmaports
|
||||
if pkgname in get_list(args):
|
||||
paths = _glob_apkbuilds(args, pkgname)
|
||||
if paths:
|
||||
logging.debug(subpkgname + ": guessed to be a subpackage of " +
|
||||
|
@ -112,6 +114,7 @@ def find(args, package, must_exist=True):
|
|||
raise RuntimeError("Invalid pkgname: " + package)
|
||||
|
||||
# Search in packages
|
||||
if package in get_list(args):
|
||||
paths = _glob_apkbuilds(args, package)
|
||||
if len(paths) > 1:
|
||||
raise RuntimeError("Package " + package + " found in multiple"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue