X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=5ea115de791635ee26667157ca8dce870b79862b;hb=2c023c2132b166ffc24941cd2a7c35f182c2468e;hp=79c2bfded0ea2916b3847bb2e08cbac77c2df91b;hpb=aedd23b3aa1a52574a2cb53ff47b89a8830eeba9;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index 79c2bfd..5ea115d 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -159,6 +159,14 @@ dist_upgrade () { } } +apt_autoremove () { + log "Running autoremove ..." + apt-get -y$s --purge autoremove || { + dpkg --configure -a + apt-get -yf install + } +} + remove_x() { LC_MESSAGES=hr_HR dialog --backtitle "$title" --yesno "$msg_remove_x" 18 75 if [ $? -eq 0 ]; then @@ -971,6 +979,8 @@ is_orphaned () { remove_orphaned () { local package + apt_autoremove + for package in $orphaned_packages; do if is_orphaned $package; then pkgrm $package