Fix incorrect handling of .inactive ports files during upgrade

This commit is contained in:
Matt Housh 2014-07-16 15:40:23 -05:00
parent aa51bb6436
commit 4bc00673a0
2 changed files with 11 additions and 10 deletions

View File

@ -306,7 +306,17 @@ main() {
(/usr/bin/setup-helper $ROOT &> $helperlogfile) | do_dialog \
--title " Please wait [3.0 -> 3.1 check]" --gauge "" 8 60 0
fi
install_packages
install_packages
# one-time fix for .inactive ports files
if [ -f $ROOT/etc/ports/contrib.rsync.inactive -a -f $ROOT/etc/ports/contrib.rsync ]; then
mkdir -p $ROOT/var/lib/pkg/rejected/etc/ports
mv -f $ROOT/etc/ports/contrib.rsync.inactive $ROOT/var/lib/pkg/rejected/etc/ports/contrib.rsync
fi
if [ -f $ROOT/etc/ports/compat-32.rsync.inactive -a -f $ROOT/etc/ports/compat-32.rsync ]; then
mkdir -p $ROOT/var/lib/pkg/rejected/etc/ports
mv -f $ROOT/etc/ports/compat-32.rsync.inactive $ROOT/var/lib/pkg/rejected/etc/ports/compat-32.rsync
fi
cat $helperlogfile 2> /dev/null
}

View File

@ -138,12 +138,3 @@ inject_packages eudev
remove_packages net-tools traceroute
inject_packages inetutils
# update the contrib and compat-32 rsync files if they're active
if [ -f $ROOT/etc/ports/contrib.rsync ]; then
mv -f $ROOT/etc/ports/contrib.rsync{.inactive,}
fi
if [ -f $ROOT/etc/ports/compat-32.rsync ]; then
mv -f $ROOT/etc/ports/compat-32.rsync{.inactive,}
fi