pmbootstrap index: ignore files (e.g. README.html) in packages dir (#1078)

The repo has a README.html in ~/.local/var/pmbootstrap/packages/,
and because of that "pmbootstrap index" is currently failing.
This commit is contained in:
Oliver Smith 2018-01-04 16:26:03 +00:00 committed by GitHub
parent 7750c1dd40
commit a765968f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -246,7 +246,7 @@ def index_repo(args, arch=None):
paths = glob.glob(args.work + "/packages/*") paths = glob.glob(args.work + "/packages/*")
for path in paths: for path in paths:
if os.path.exists(path): if os.path.isdir(path):
path_arch = os.path.basename(path) path_arch = os.path.basename(path)
path_repo_chroot = "/home/pmos/packages/pmos/" + path_arch path_repo_chroot = "/home/pmos/packages/pmos/" + path_arch
logging.debug("(native) index " + path_arch + " repository") logging.debug("(native) index " + path_arch + " repository")
@ -259,8 +259,7 @@ def index_repo(args, arch=None):
for command in commands: for command in commands:
pmb.chroot.user(args, command, working_dir=path_repo_chroot) pmb.chroot.user(args, command, working_dir=path_repo_chroot)
else: else:
logging.debug("NOTE: Can't build index for non-existing path: " + logging.debug("NOTE: Can't build index for: " + path)
path)
pmb.parse.apkindex.clear_cache(args, path + "/APKINDEX.tar.gz") pmb.parse.apkindex.clear_cache(args, path + "/APKINDEX.tar.gz")