summaryrefslogtreecommitdiff
path: root/debian/apt.auto-removal.sh
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2017-03-13 11:02:49 +0100
committerJulian Andres Klode <jak@debian.org>2017-03-13 16:31:38 +0100
commita9b56a0101628ac04aad0d4e50363b9c18566832 (patch)
tree43d589ec5c07514297cdc511fe545eb206e8a849 /debian/apt.auto-removal.sh
parent5094697fe4b2459ff6f706a22006d3028369f3fa (diff)
auto-removal: Ignore running kernel if attempting a reproducible build
If one is attempting to create a reproducible ISO image we do not want to include the build system's kernel version, not only due to it breaking reproducibility, but it could be somewhat misleading and/or the wrong thing to put in this file anyway. Closes: #857632
Diffstat (limited to 'debian/apt.auto-removal.sh')
-rw-r--r--debian/apt.auto-removal.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/debian/apt.auto-removal.sh b/debian/apt.auto-removal.sh
index df9048cd6..2c32b0c9d 100644
--- a/debian/apt.auto-removal.sh
+++ b/debian/apt.auto-removal.sh
@@ -29,6 +29,11 @@ unamer="$(uname -r | tr '[A-Z]' '[a-z]')"
if [ -n "$unamer" ]; then
running_version="$(echo "$list" | awk "\$1 == \"$unamer\" { print \$2;exit; }")"
fi
+# ignore the currently running version if attempting a reproducible build
+if [ -n "${SOURCE_DATE_EPOCH}" ]; then
+ unamer=""
+ running_version=""
+fi
latest_version="$(echo "$debverlist" | sed -n 1p)"
previous_version="$(echo "$debverlist" | sed -n 2p)"
@@ -62,7 +67,7 @@ $list
# list of different kernel versions:
$debverlist
# Installing kernel: $installed_version ($1)
-# Running kernel: $running_version ($unamer)
+# Running kernel: ${running_version:-ignored} (${unamer:-ignored})
# Last kernel: $latest_version
# Previous kernel: $previous_version
# Kernel versions list to keep: