From 1e7fccdeae88ff8dd143dd1c38083f8c5fcce67b Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Thu, 9 Feb 2012 10:11:54 +0100 Subject: [PATCH] Cleanup dpkg available file. --- src/actions/main.queue | 1 + src/functions.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/actions/main.queue b/src/actions/main.queue index c087301..12aea51 100644 --- a/src/actions/main.queue +++ b/src/actions/main.queue @@ -17,6 +17,7 @@ pkg slapd backup_slapd_db true backup_etc_dir # etc i drugo true create_sources_list true apt_update +true cleanup_available true check_archives_space true check_kernel_space true apt_download # skini pakete diff --git a/src/functions.sh b/src/functions.sh index fa0406b..83fc87d 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -128,6 +128,21 @@ apt_autoremove () { } } +# remove stale package information from available +# warning, in file '/var/lib/dpkg/available' +# near line 58185 package 'vim-cn': missing architecture +cleanup_available () { + log "Cleaning dpkg available file" + + available=$(mktemp /var/lib/carnet-upgrade/available.XXXXXX) + apt-cache dumpavail > $available + + dpkg --clear-avail + dpkg --update-avail $available + + rm -f $available +} + remove_x() { LC_MESSAGES=hr_HR dialog --backtitle "$title" --yesno "$msg_remove_x" 18 75 if [ $? -eq 0 ]; then -- 1.7.10.4