|
|
@ -3,7 +3,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: bin/sde-reschedule-package |
|
|
|
# Copyright (C) 2008 - 2010 The OpenSDE Project |
|
|
|
# Copyright (C) 2008 - 2013 The OpenSDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
@ -87,6 +87,27 @@ done |
|
|
|
. "$SDEROOT/lib/sde-config.in" |
|
|
|
. "$SDEROOT/lib/sde-package.in" |
|
|
|
|
|
|
|
remove_package() { |
|
|
|
local root="$1" pkg="$2" |
|
|
|
local flist="$root/var/adm/flists/$pkg" |
|
|
|
local tag=f= |
|
|
|
|
|
|
|
sort -r "$flist" | while read tag f; do |
|
|
|
f="$root/$f" |
|
|
|
if [ "$tag" != "$pkg:" ]; then |
|
|
|
echo_warning "$pkg: invalid tag '$tag' in $flist" |
|
|
|
elif [ -z "$f" ]; then |
|
|
|
echo_warning "$pkg: missing filename in $flist" |
|
|
|
elif [ -L "$f" ]; then |
|
|
|
rm -f "$f" |
|
|
|
elif [ -d "$f" ]; then |
|
|
|
rmdir "$f" |
|
|
|
else |
|
|
|
rm -f "$f" |
|
|
|
fi |
|
|
|
done |
|
|
|
} |
|
|
|
|
|
|
|
reschedule_package() |
|
|
|
{ |
|
|
|
local config="$1" pkg= sandbox= |
|
|
@ -105,9 +126,7 @@ reschedule_package() |
|
|
|
echo "$config: Removing $pkg..." |
|
|
|
|
|
|
|
if [ "$reschedule_dry" != "yes" ]; then |
|
|
|
if [ "$reschedule_soft" != "yes" ]; then |
|
|
|
mine -rf -R "$sandbox" "$pkg" |
|
|
|
fi |
|
|
|
[ "$reschedule_soft" = "yes" ] || remove_package "$sandbox" "$pkg" |
|
|
|
|
|
|
|
# in the case $SDEROOT includes spaces |
|
|
|
echo "$logs" | while read log; do |
|
|
|