mirror of
https://github.com/sbopkg/sbopkg
synced 2024-12-29 10:24:11 +01:00
add the ability to uninstall SBo packages from the dialog interface that
lists installed packages; thanks to pokipoki08 for the suggestion. Thanks to Chess and Mauro for code review and suggestions.
This commit is contained in:
parent
df07ea151f
commit
e346c03c16
2 changed files with 22 additions and 9 deletions
|
@ -11,4 +11,6 @@ enhancements:
|
||||||
this issue again.
|
this issue again.
|
||||||
* Fix an issue with the build options dialog menu where selecting 'None'
|
* Fix an issue with the build options dialog menu where selecting 'None'
|
||||||
would not work; thanks to happyslacker for the bug report.
|
would not work; thanks to happyslacker for the bug report.
|
||||||
|
* Add the ability to uninstall SBo packages from the dialog interface that
|
||||||
|
lists installed packages. Thanks to pokipoki08 for the suggestion.
|
||||||
+--------------------------+
|
+--------------------------+
|
||||||
|
|
|
@ -407,19 +407,29 @@ EOF
|
||||||
get_sbo_packages() {
|
get_sbo_packages() {
|
||||||
# Get a list of SBo packages.
|
# Get a list of SBo packages.
|
||||||
|
|
||||||
local PKGS FILE
|
|
||||||
local SBOPKGLIST=$SBOPKGTMP/sbopkg_pkglist
|
local SBOPKGLIST=$SBOPKGTMP/sbopkg_pkglist
|
||||||
|
local REMOVELIST=$SBOPKGTMP/sbopkg_removelist
|
||||||
|
local CONFIRMLIST=$SBOPKGTMP/sbopkg_confirmlist
|
||||||
|
|
||||||
rm -f $SBOPKGLIST
|
rm -f $SBOPKGLIST
|
||||||
cd /var/log/packages
|
find /var/log/packages -type f -name "*$REPO_TAG" \
|
||||||
PKGS=$(ls *$REPO_TAG* 2> /dev/null)
|
-printf "%P\n" | sort > $SBOPKGLIST
|
||||||
for FILE in $PKGS; do
|
|
||||||
echo $FILE >> $SBOPKGLIST
|
|
||||||
done
|
|
||||||
if [[ -f $SBOPKGLIST ]]; then
|
if [[ -f $SBOPKGLIST ]]; then
|
||||||
if [[ $DIAG ]]; then
|
if [[ $DIAG ]]; then
|
||||||
dialog --title "Installed $REPO_NAME Packages" --textbox \
|
sed -i 's/$/ "" OFF/' $SBOPKGLIST
|
||||||
$SBOPKGLIST 20 65
|
dialog --separate-output --title "Installed $REPO_NAME Packages" --checklist \
|
||||||
|
"Check any packages you wish to uninstall" 20 65 13 \
|
||||||
|
--file $SBOPKGLIST 2> $REMOVELIST
|
||||||
|
if [[ -s $REMOVELIST ]]; then
|
||||||
|
sed 's/$/ "" ON/' $REMOVELIST > $CONFIRMLIST
|
||||||
|
dialog --defaultno --title "Removepkg confirmation" \
|
||||||
|
--checklist "Remove the following packages?" 20 65 13 \
|
||||||
|
--file $CONFIRMLIST 2> $REMOVELIST
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
removepkg $(tr -d \" < $REMOVELIST)
|
||||||
|
read -n1 -p "Press any key to continue."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
$PAGER $SBOPKGLIST
|
$PAGER $SBOPKGLIST
|
||||||
fi
|
fi
|
||||||
|
@ -430,6 +440,7 @@ get_sbo_packages() {
|
||||||
installed.")" 8 40
|
installed.")" 8 40
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
rm -f $SBOPKGLIST $REMOVELIST $CONFIRMLIST
|
||||||
}
|
}
|
||||||
|
|
||||||
progressbar_cli() {
|
progressbar_cli() {
|
||||||
|
@ -3999,7 +4010,7 @@ main_menu() {
|
||||||
17 69 8 \
|
17 69 8 \
|
||||||
"Sync" "Sync with the remote repository" \
|
"Sync" "Sync with the remote repository" \
|
||||||
"ChangeLog" "View the ChangeLog" \
|
"ChangeLog" "View the ChangeLog" \
|
||||||
"Packages" "List installed $REPO_NAME packages" \
|
"Packages" "List/uninstall installed $REPO_NAME packages" \
|
||||||
"Updates" "List potential updates to installed $REPO_NAME packages" \
|
"Updates" "List potential updates to installed $REPO_NAME packages" \
|
||||||
"Browse" "Browse the active repository" \
|
"Browse" "Browse the active repository" \
|
||||||
"Search" "Search the active repository" \
|
"Search" "Search the active repository" \
|
||||||
|
|
Loading…
Reference in a new issue