Commit bcd4d994 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-check: improve for yum

parent 7cb877bc
#!/bin/sh
#
# Copyright (C) 2012 Etersoft
# Copyright (C) 2012 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012-2013 Etersoft
# Copyright (C) 2012-2013 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
......@@ -33,10 +33,19 @@ case $PMTYPE in
;;
yum-rpm)
docmd yum check
docmd package-cleanup --leaves
sudocmd yum remove $(package-cleanup --leaves)
docmd package-cleanup --problems
#docmd package-cleanup --dupes
sudocmd package-cleanup --cleandupes
# cleanup orphanes?
while true ; do
docmd package-cleanup --leaves
# FIXME: package-cleanup have to use stderr for errors
local PKGLIST=$(package-cleanup --leaves | grep -v "Loaded plugins" | grep -v "Unable to")
[ -n "$PKGLIST" ] || break
sudocmd yum remove $PKGLIST
done
;;
urpm-rpm)
sudocmd urpme --auto-orphans
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment