FS#849 - Implement a depupdate command
Implement a depupdate command as described here: http://thread.gmane.org/gmane.linux.distributions.crux.devel/2266
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
This would be a first for me but I don't approve of this, it's not hard to watch the mailing list/irc and even if you get missing files in the footprint you can do prt-get deptree foo to see what is missing and install those manually. Crux is for experienced users, surely if we remove a dependency or not install one it's because we want it that way. If not we add it manually.
But we usually do get a fair amount of complaints when a new dep is added. "<package xzy> failed to build, help!" is not uncommon.
I think it's a good idea.
We've had a couple of updates recently that would make this feature useful, such as: harfbuzz (icu), samba (libaio, popt)
I've been biten by this several times, so +1 from me.
It would be good if prt-get prints some warning messages when updating packages with changed dependencies, like comparing /var/lib/pkg/prt-get.cache with the port tree, to find out if there are any dependency changes. This operation doesn't need to be recursive, so it won't hurt much performance.
I'm curious who will step in to change prt-get, and when.
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}'
Btw, there are funnier alternatives to workaround dying "xargs prt-get isinst".
See https://serverfault.com/questions/289094/prevent-xargs-from-quitting-on-error
My favorite: "xargs echo prt-get isinst | bash"
> I'm curious who will step in to change prt-get, and when.
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.