Welcome to CRUX bug tracking.
FS#1843 - Please make the output of prt-get --test more common
Attached to Project:
CRUX
Opened by Feodor Petrov (teodor) - Saturday, 09 January 2021, 11:02 GMT
Last edited by Tim Biermann (tb) - Saturday, 12 March 2022, 09:03 GMT
Opened by Feodor Petrov (teodor) - Saturday, 09 January 2021, 11:02 GMT
Last edited by Tim Biermann (tb) - Saturday, 12 March 2022, 09:03 GMT
|
DetailsCould you please make the output of prt-get --test to common style for better parsing:
1) prt-get install <some_installed_port> --test and prt-get install <some_installed_port1> <some_installed_port2> --test these give 2 different styles of output 2) prt-get update <not_existing_port> --test and prt-get update <not_existing_port1> <not_existing_port2> --test these give 2 different styles of output 3) prt-get depinst <some_installed_port1> <some_installed_port2> --test and prt-get depinst <not_installed_port> <some_installed_port> --test and prt-get depinst <not_installed_port> <not_existing_port> --test these don't show information about already installed and not existing ports! |
This task depends upon
Closed by Tim Biermann (tb)
Saturday, 12 March 2022, 09:03 GMT
Reason for closing: Won't implement
Additional comments about closing: Doesn't look like anybody wants to implement this, closed
Saturday, 12 March 2022, 09:03 GMT
Reason for closing: Won't implement
Additional comments about closing: Doesn't look like anybody wants to implement this, closed
I use
#!/bin/sh -
if [ $# -eq 0 ]; then
echo New versions available for
news=`prt-get printf '%n %i\n' | grep -E 'diff$' | cut -f 1 -d ' '`
echo '=> '$news
else
news="$@"
fi
echo
echo Upgrading
ups=
for p in $news; do
if prt-get listlocked | grep -Eq "^$p\$"; then
echo Locked, skipping $p
else
[ -n "$ups" ] && ups="$ups "
ups="$ups$p"
fi
done
echo '=> '$ups
echo
deps=`prt-get quickdep $ups`
echo Dependency list
echo '=> '$deps
echo
echo 'Ok to continue (^C or else)'
read i
echo
echo Group installing what is new
prt-get grpinst $deps #|| exit $?
echo
echo Performing upgrade
xups=
for p in $deps $ups; do
if echo "$ups" | grep -Eqe "(^|[[:space:]])$p([[:space:]]|\$)"; then
if prt-get listlocked | grep -Eq "^$p\$"; then
echo Locked, skipping $p
else
if [ -n "$xups" ]; then
if echo "$xups" | grep -Eqe \
"(^|[[:space:]])$p([[:space:]]|\$)"
then
continue
fi
xups="$xups "
fi
xups="$xups$p"
fi
fi
done
prt-get update $xups
echo
echo rejmerge
rejmerge
-- The following ports were not fount/already installed:
...
*** ...
as for 1 and as for several missing ports
But now it shows in two different styles when not found/already installed ports when for SINGLE and for SEVERAL missing ports.
Also need to fix prt-get depinst <several ports> because it doesn't show full information when trying to install more than one already installed/not installed/missing ports.