kiss: Inform the user of any repository orphans.

During updates the package manager will now tell you if a package
has been dropped from repositories - ie, the only place the package
exists is in /var/db/kiss/installed.
This commit is contained in:
Dylan Araps 2021-07-13 10:29:21 +03:00
parent c2fbc4193f
commit f8078d884a
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 11 additions and 0 deletions

11
kiss
View File

@ -1477,6 +1477,12 @@ pkg_update() {
pkg_find_version "${pkg##*/}"
# Detect repository orphans (installed packages with no
# associated repository).
case $repo_dir in */var/db/kiss/installed/*)
_repo_orp="$_repo_orp ${pkg##*/}"
esac
# Compare installed packages to repository packages.
[ "$db_ver-$db_rel" = "$repo_ver-$repo_rel" ] || {
printf '%s\n' "${pkg##*/} $db_ver-$db_rel ==> $repo_ver-$repo_rel"
@ -1484,6 +1490,11 @@ pkg_update() {
}
done
log "Checking for orphaned repository packages"
case $_repo_orp in *?*)
war "Packages without repository:$_repo_orp"
esac
set -f
case " $* " in