From 0c8cc66117f2f966870f78e9db78f264b1948a86 Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Mon, 1 Feb 2021 23:01:50 -0800 Subject: 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 --- tools/make_apt.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3