Browse Source

* Use log-output for commands that produce output if run in the installer.

r44606
tags/0.17
Frans Pop 14 years ago
parent
commit
cc0cd28db5
6 changed files with 29 additions and 13 deletions
  1. +8
    -0
      apt-setup
  2. +8
    -4
      apt-setup-verify
  3. +1
    -1
      debian/apt-setup-udeb.postinst
  4. +2
    -1
      debian/changelog
  5. +8
    -4
      generators/50cdrom
  6. +2
    -3
      generators/60local

+ 8
- 0
apt-setup View File

@@ -6,6 +6,14 @@ db_capb backup

gendir=/usr/lib/apt-setup/generators

if [ "$1" = --log-output ] && type log-output >/dev/null 2>&1; then
CATCHLOG=1
shift
else
CATCHLOG=
fi
export CATCHLOG

if [ "$1" ]; then
ROOT="$1"
chroot=chroot


+ 8
- 4
apt-setup-verify View File

@@ -11,10 +11,14 @@ fi
file="$1"
saveto="$2"

if [ -n "$ROOT" ]; then
logoutput=""
if [ "$CATCHLOG" ]; then
logoutput=log-output
fi

chroot=
if [ "$ROOT" ]; then
chroot=chroot
else
chroot=
fi

saveline () {
@@ -29,7 +33,7 @@ valid () {
tmp=$($chroot $ROOT tempfile)
echo "$line" > $ROOT$tmp
if $chroot $ROOT apt-get -o APT::Get::List-Cleanup=false \
if $logoutput $chroot $ROOT apt-get -o APT::Get::List-Cleanup=false \
-o Dir::Etc::sourcelist=$tmp update
then
rm -f $ROOT$tmp


+ 1
- 1
debian/apt-setup-udeb.postinst View File

@@ -1,3 +1,3 @@
#!/bin/sh
set -e
apt-setup /target
apt-setup --log-output /target

+ 2
- 1
debian/changelog View File

@@ -6,8 +6,9 @@ apt-setup (1:0.17) UNRELEASED; urgency=low
[ Frans Pop ]
* Make wget respect proxy servers defined for local sources. Based on a
patch suggested by John Morrissey, for which thanks. Closes: #408297.
* Use log-output for commands that produce output if run in the installer.

-- Frans Pop <fjp@debian.org> Wed, 24 Jan 2007 19:33:52 +0100
-- Frans Pop <fjp@debian.org> Mon, 29 Jan 2007 09:34:18 +0100

apt-setup (1:0.16) unstable; urgency=low



+ 8
- 4
generators/50cdrom View File

@@ -5,15 +5,19 @@ set -e

file="$1"

if [ -n "$ROOT" ]; then
logoutput=""
if [ "$CATCHLOG" ]; then
logoutput=log-output
fi

chroot=
if [ "$ROOT" ]; then
chroot=chroot
else
chroot=
fi

tmp=$($chroot $ROOT tempfile)
# apt-cdrom can be interactive, avoid that
$chroot $ROOT apt-cdrom add \
$logoutput $chroot $ROOT apt-cdrom add \
-o Dir::Etc::SourceList=$tmp \
</dev/null
cat $ROOT$tmp >> $file


+ 2
- 3
generators/60local View File

@@ -5,10 +5,9 @@ set -e

file="$1"

if [ -n "$ROOT" ]; then
chroot=
if [ "$ROOT" ]; then
chroot=chroot
else
chroot=
fi

i=0


Loading…
Cancel
Save