Skip to content

Commit

Permalink
fix: fail on missing package imports
Browse files Browse the repository at this point in the history
  • Loading branch information
nkraetzschmar committed Mar 25, 2024
1 parent f20b3fb commit f4655be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions download_pkgs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ done
rm -rf download
sort -o pkgs -u pkgs

cat "$import_list" >> depends
sed 's/^#'"$(dpkg --print-architecture)"' //;/^#/d' < "$import_list" | grep syslinux > arch_import_list
cat arch_import_list >> depends
aptitude search '?priority(required)|?priority(important)' -F '%p' -q | cut -d : -f 1 >> depends

sort -o depends -u depends
join -v 1 depends pkgs > needed

xargs apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances < needed | grep '^\w' | cut -d : -f 1 | sort | uniq > recursive_depends
join -v 1 recursive_depends pkgs | { grep -v -x -f "$exclude_patterns" || true; } > recursive_needed
join -v 1 <(cat arch_import_list recursive_depends | sort | uniq) pkgs | { grep -v -x -f "$exclude_patterns" || true; } > recursive_needed

mkdir apt_download
(cd apt_download && xargs apt-get download) < recursive_needed
Expand Down

0 comments on commit f4655be

Please sign in to comment.