jannet: Add command rpmnew

This commit is contained in:
Jan Lindemann 2012-02-06 10:31:47 +00:00 committed by Jan Lindemann
commit 1745f72eb6

View file

@ -28,6 +28,8 @@ cat << EOT
restore: restore a previous jannet software version state restore: restore a previous jannet software version state
info: query information about installed software info: query information about installed software
checklog: update the installation log file if necessary checklog: update the installation log file if necessary
rpmnew: remove superfluous rpmnew files and show conflicts
for others
EOT EOT
if [ "$1" ]; then if [ "$1" ]; then
@ -79,6 +81,31 @@ list_all_packages()
sort -u sort -u
} }
cmd_rpmnew()
{
local file
jannet info |
list_all_packages |
xargs rpm -ql |
while read file; do
if [ -e "$file.rpmnew" ]; then
if diff -q $file $file.rpmnew; then
if [ -l "$file" ]; then
echo ========== skipping link $file
continue
fi
echo mv $file.rpmnew $file
sudo mv $file.rpmnew $file
else
echo =========== $file
diff $file.rpmnew $file
fi
fi
done
}
cmd="$1" cmd="$1"
shift shift
get_opts $* get_opts $*
@ -138,6 +165,9 @@ cpp-glib)
ftp://dspadm@ftp.jannet.de/pub/packages/linux/suse/10.1/inst-source/rpm/i586/glib2-2.8.5-19.i586.rpm ftp://dspadm@ftp.jannet.de/pub/packages/linux/suse/10.1/inst-source/rpm/i586/glib2-2.8.5-19.i586.rpm
check_ldconfig check_ldconfig
;; ;;
rpmnew)
cmd_rpmnew $@
;;
help) help)
usage 0 usage 0
;; ;;