Browse Source

prevent upgrade of grub-pc which can fail in lxc

fixes #86
tags/0.2^2
Christopher Gurnee 5 years ago
parent
commit
04ab7c1218
2 changed files with 5 additions and 1 deletions
  1. 2
    1
      target-bin/grab-packages.sh
  2. 3
    0
      target-bin/upgrade-system.sh

+ 2
- 1
target-bin/grab-packages.sh View File

@@ -7,6 +7,7 @@ set -e
cd /var/cache/apt/archives

# make sure all packages with installed versions are downloaded
dpkg-query -W -f '${Package}=${Version}\n' | xargs -n 50 apt-get install -q --reinstall -y -d > /tmp/download.log
# (except for held packages, which may not be available for download)
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
grep "cannot be downloaded" /tmp/download.log && { echo Could not download some packages, please run gbuild --upgrade 1>&2 ; exit 1 ; }
sha256sum *.deb | sort --key 2

+ 3
- 0
target-bin/upgrade-system.sh View File

@@ -9,6 +9,9 @@ mkdir -p /var/cache/gitian
# remove obsolete grub, it causes package dependency issues
apt-get -q -y purge grub > /dev/null 2>&1 || true

# prevent upgrade of grub-pc, it fails to find a boot drive in lxc containers
echo grub-pc hold | dpkg --set-selections || true

# upgrade packages
DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade > /dev/null > /var/cache/gitian/upgrade.log 2>&1


Loading…
Cancel
Save