mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
jannet: Add command rpmnew
This commit is contained in:
parent
99a9e190d3
commit
1745f72eb6
1 changed files with 30 additions and 0 deletions
|
|
@ -28,6 +28,8 @@ cat << EOT
|
|||
restore: restore a previous jannet software version state
|
||||
info: query information about installed software
|
||||
checklog: update the installation log file if necessary
|
||||
rpmnew: remove superfluous rpmnew files and show conflicts
|
||||
for others
|
||||
|
||||
EOT
|
||||
if [ "$1" ]; then
|
||||
|
|
@ -79,6 +81,31 @@ list_all_packages()
|
|||
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"
|
||||
shift
|
||||
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
|
||||
check_ldconfig
|
||||
;;
|
||||
rpmnew)
|
||||
cmd_rpmnew $@
|
||||
;;
|
||||
help)
|
||||
usage 0
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue