Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df8381b

Browse files
author
Dev Random
committed
Merge pull request #90 from gurnec/grub-pc
prevent upgrade of grub-pc which can fail in lxc
2 parents 81bf5d7 + 04ab7c1 commit df8381b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

target-bin/grab-packages.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -e
77
cd /var/cache/apt/archives
88

99
# make sure all packages with installed versions are downloaded
10-
dpkg-query -W -f '${Package}=${Version}\n' | xargs -n 50 apt-get install -q --reinstall -y -d > /tmp/download.log
10+
# (except for held packages, which may not be available for download)
11+
dpkg-query -W -f '${Status}\t${Package}=${Version}\n' | grep -v ^hold | cut -f2- | xargs -n 50 apt-get install -q --reinstall -y -d > /tmp/download.log
1112
grep "cannot be downloaded" /tmp/download.log && { echo Could not download some packages, please run gbuild --upgrade 1>&2 ; exit 1 ; }
1213
sha256sum *.deb | sort --key 2

target-bin/upgrade-system.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ mkdir -p /var/cache/gitian
99
# remove obsolete grub, it causes package dependency issues
1010
apt-get -q -y purge grub > /dev/null 2>&1 || true
1111

12+
# prevent upgrade of grub-pc, it fails to find a boot drive in lxc containers
13+
echo grub-pc hold | dpkg --set-selections || true
14+
1215
# upgrade packages
1316
DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade > /dev/null > /var/cache/gitian/upgrade.log 2>&1
1417

0 commit comments

Comments
 (0)