Browse Source

- Make apt-setup idempotent by removing workfile on back up

- Allow back up from use network mirror question
- Make apt-setup-verify responsible for blank lines between sources lines from different generators

r39750
tags/0.14
Frans Pop 15 years ago
parent
commit
e1a710233a
4 changed files with 20 additions and 4 deletions
  1. +1
    -2
      apt-setup
  2. +9
    -1
      apt-setup-verify
  3. +9
    -0
      debian/changelog
  4. +1
    -1
      generators/50mirror

+ 1
- 2
apt-setup View File

@@ -37,7 +37,6 @@ for generator in $gendir/*; do
fi
tmp=$($chroot $ROOT tempfile)
echo > $ROOT$tmp

code=0
$generator $ROOT$tmp || code=$?
@@ -54,7 +53,7 @@ for generator in $gendir/*; do
10)
# TODO handle backup better
log "$generator backed up"
rm -f $ROOT$tmp
rm -f $ROOT$tmp $ROOT/etc/apt/sources.list.new
db_progress STOP
exit 10
;;


+ 9
- 1
apt-setup-verify View File

@@ -50,6 +50,11 @@ for line in $(sed 's/^/:/' $file); do
line="${line#:}"
if expr "$line" : '.*[^ ].*' >/dev/null && [ "$(expr "$line" : "#")" != 1 ]; then
items=$(expr "$items" + 1)
# Write blank line between generators
if [ $items = 1 ] && [ -f "$saveto" ]; then
saveline ""
fi

if [ -z "$NOTEST" ] && valid "$line"; then
gooditems=$(expr "$gooditems" + 1)
saveline "$line"
@@ -58,7 +63,10 @@ for line in $(sed 's/^/:/' $file); do
saveline "#$line"
fi
else
saveline "$line"
# Ignore leading empty lines
if [ $items != 0 ] || [ "$line" ]; then
saveline "$line"
fi
fi
done



+ 9
- 0
debian/changelog View File

@@ -1,3 +1,12 @@
apt-setup (1:0.14) UNRELEASED; urgency=low

* Make apt-setup idempotent by removing workfile on back up.
* Allow back up from use network mirror question.
* Make apt-setup-verify responsible for blank lines between sources lines
from different generators.

-- Frans Pop <fjp@debian.org> Sun, 13 Aug 2006 00:26:54 +0200

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

[ Colin Watson ]


+ 1
- 1
generators/50mirror View File

@@ -16,7 +16,7 @@ warning() {
if [ -e /cdrom/.disk/base_installable ]; then
if search-path choose-mirror; then
db_input high apt-setup/use_mirror || [ $? -eq 30 ]
db_go # or exit 10
db_go || exit 10
else
warning "choose-mirror is not available; cannot offer network mirror"
exit 1


Loading…
Cancel
Save