From 4d6fcb1dddd5654e7ba8bfa2705bbb4f2c4a6884 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 20 Mar 2022 11:48:43 +0100 Subject: dselect: Pass available file from stdin to dpkg --update-avail The dpkg --update-avail command has supported reading from stdin since dpkg 1.17.7. This removes a temporary file which can be very big nowadays. --- dselect/update | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dselect/update') diff --git a/dselect/update b/dselect/update index 0ab317ee4..057e26e65 100755 --- a/dselect/update +++ b/dselect/update @@ -28,10 +28,11 @@ STATUS=1 if $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" update then echo $"Merging available information" + # XXX: Make sure we remove an old intermediate file that we used to feed + # to dpkg, until enough time has passed that we have some guarantee it + # is no longer left over in the cache directory (since apt 2.9.x). rm -f $CACHEDIR/available - $APTCACHE dumpavail > $CACHEDIR/available - $DPKG "$DPKG_OPTS" --update-avail $CACHEDIR/available - rm -f $CACHEDIR/available + $APTCACHE dumpavail | $DPKG "$DPKG_OPTS" --update-avail case "$CLEAN" in Pre-Auto|PreAuto|pre-auto) -- cgit v1.2.3-70-g09d2