Welcome to CRUX bug tracking.
FS#849 - Implement a depupdate command
Attached to Project:
CRUX
Opened by Johannes Winkelmann (jw) - Sunday, 16 September 2012, 19:20 GMT
Last edited by Tim Biermann (tb) - Saturday, 07 May 2022, 12:24 GMT
Opened by Johannes Winkelmann (jw) - Sunday, 16 September 2012, 19:20 GMT
Last edited by Tim Biermann (tb) - Saturday, 07 May 2022, 12:24 GMT
|
DetailsImplement a depupdate command as described here: http://thread.gmane.org/gmane.linux.distributions.crux.devel/2266
|
This task depends upon
I think it's a good idea.
Meanwhile, I put my workaround here, in case someone else (new to CRUX) needs an workaround:
* prt-get isinst $(prt-get quickdep $(prt-get quickdiff)) | awk '$0 ~ /not installed/ {print $2}'
or a more clear alternative:
* prt-get quickdiff | xargs -r prt-get quickdep | xargs -r prt-get isinst | awk '$0 ~ /not installed/ {print $2}'
revdep is always recommended after "prt-get sysup", so a little "sysup" script is still needed to avoid forgetting revdep. Adding the workaround to that script shouldn't be a problem.
The "prt-get quickdep" shows recursive dependencies and could be changed to:
* tr ' ' '\n' | xargs -r -n1 -I{} prt-get printf '%e\n' --filter={} | tr ',' '\n'
And because "prt-get isinst" returns non-zero exit code when a port is not installed, the tail could be changed to:
* tr ' ' '\n' | xargs -r -n1 -I{} prt-get printf '%n %i\n' --filter={} | awk '$2 == "no" {print $1}'
See https://serverfault.com/questions/289094/prevent-xargs-from-quitting-on-error
My favorite: "xargs echo prt-get isinst | bash"
Instead of changing prt-get itself, maybe a better target would be the documentation, where all this insider knowledge could be assembled for easy reference. As beerman writes in FS#1410, one reason new users might leave is that they are not helped properly. I added some of this knowledge to the prt-get manpage and posted a revised version here: https://git.sdf.org/jmq/Documentation/src/branch/master/man8
Feel free to follow up with suggestions or degrading criticism.