index: add DESCRIPTION file to APKINDEX.tar.gz (!1822)

This file is used by the package browser frontend build by the alpine
developers. It uses the contents of the DESCRIPTION file to validate the
cache in the database.
This commit is contained in:
Martijn Braam 2019-10-06 14:38:19 +02:00
parent 925c56febe
commit 68aa37637a
No known key found for this signature in database
GPG Key ID: C4280ACB000B060F
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import glob
import logging
import os
import shlex
import datetime
import pmb.chroot
import pmb.helpers.file
@ -111,9 +112,11 @@ def index_repo(args, arch=None):
path_arch = os.path.basename(path)
path_repo_chroot = "/home/pmos/packages/pmos/" + path_arch
logging.debug("(native) index " + path_arch + " repository")
description = str(datetime.datetime.now())
commands = [
# Wrap the index command with sh so we can use '*.apk'
["sh", "-c", "apk -q index --output APKINDEX.tar.gz_"
" --description " + shlex.quote(description) + ""
" --rewrite-arch " + shlex.quote(path_arch) + " *.apk"],
["abuild-sign", "APKINDEX.tar.gz_"],
["mv", "APKINDEX.tar.gz_", "APKINDEX.tar.gz"]