Browse Source

Make sure to disable interactivity in “apt-cdrom ident” calls.

Achieve that by adding “< /dev/null” as done in some “apt-cdrom add”
calls. This command became interactive in some apt versions (See:
tags/0.86
Cyril Brulebois 7 years ago
parent
commit
852eac9822
4 changed files with 9 additions and 3 deletions
  1. +6
    -0
      debian/changelog
  2. +1
    -1
      generators/40cdrom
  3. +1
    -1
      generators/41cdset
  4. +1
    -1
      load-install-cd

+ 6
- 0
debian/changelog View File

@@ -4,6 +4,12 @@ apt-setup (1:0.86) UNRELEASED; urgency=low
* Handle proxy and timeout configuration appropriately when installing
over HTTPS (LP: #1135163).

[ Cyril Brulebois ]
* Make sure to disable interactivity in “apt-cdrom ident” calls, by adding
“< /dev/null” as done in some “apt-cdrom add” calls. This command became
interactive in some apt versions (See: #740673), so be explicit about
what we want, which should avoid hanging.

[ Updated translations ]
* Belarusian (be.po) by Viktar Siarheichyk
* Bosnian (bs.po) by Amila Valjevčić


+ 1
- 1
generators/40cdrom View File

@@ -85,7 +85,7 @@ bail_out() {
save_label() {
local ident

if ! ident="$(LC_ALL=C $logoutput_pass $chroot $ROOT apt-cdrom ident)"; then
if ! ident="$(LC_ALL=C $logoutput_pass $chroot $ROOT apt-cdrom ident < /dev/null)"; then
bail_out
fi
echo "$ident" | grep "^Identifying" | head -n1 | cut -d" " -f2 \


+ 1
- 1
generators/41cdset View File

@@ -46,7 +46,7 @@ fi

get_label() {
LC_ALL=C $logoutput --pass-stdout $chroot $ROOT \
apt-cdrom ident | grep "^Stored label:" | head -n1 | \
apt-cdrom ident < /dev/null | grep "^Stored label:" | head -n1 | \
sed "s/^[^:]*: //"
}



+ 1
- 1
load-install-cd View File

@@ -12,7 +12,7 @@ logoutput="log-output -t load-install-cd"

check_id() {
cd_ids=$(LC_ALL=C $logoutput --pass-stdout chroot $ROOT \
apt-cdrom ident | grep "^Identifying" | cut -d" " -f2)
apt-cdrom ident < /dev/null | grep "^Identifying" | cut -d" " -f2)

for cd_id in $cd_ids; do
if [ "$cd_id" = "$(head -n1 /var/lib/install-cd.id)" ]; then


Loading…
Cancel
Save