summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2021-02-01 23:01:50 -0800
committergVisor bot <gvisor-bot@google.com>2021-02-01 23:03:58 -0800
commit0c8cc66117f2f966870f78e9db78f264b1948a86 (patch)
tree237a0f58f541746a3f26cda632e11d093506644c /tools
parentaae4803808dc7358492db3fa787e8dd8f4a0e97a (diff)
Fix empty Packages file for APT repository.
This change also adds an extra sanity check to the make_apt.sh script, in order to ensure that this simple mistake does not occur again. PiperOrigin-RevId: 355101754
Diffstat (limited to 'tools')
-rwxr-xr-xtools/make_apt.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/make_apt.sh b/tools/make_apt.sh
index 302ed8aa3..68f6973ec 100755
--- a/tools/make_apt.sh
+++ b/tools/make_apt.sh
@@ -119,7 +119,11 @@ for dir in "${root}"/pool/*/binary-*; do
arches+=("${arch}")
repo_packages="${release}"/main/"${name}"
mkdir -p "${repo_packages}"
- (cd "${root}" && apt-ftparchive --arch "${arch}" packages pool > "${repo_packages}"/Packages)
+ (cd "${root}" && apt-ftparchive packages "${dir##${root}/}" > "${repo_packages}"/Packages)
+ if ! [[ -s "${repo_packages}"/Packages ]]; then
+ echo "Packages file is size zero." >&2
+ exit 1
+ fi
(cd "${repo_packages}" && cat Packages | gzip > Packages.gz)
(cd "${repo_packages}" && cat Packages | xz > Packages.xz)
done