xbps icon indicating copy to clipboard operation
xbps copied to clipboard

sort various outputs of xbps-query

Open yopito opened this issue 5 years ago • 5 comments

like list of run_depends, shlib-requires and co: it might help to compare package info while packaging

yopito avatar Jun 25 '20 09:06 yopito

At least for run_depends, the input order is important as and I'm not sure if its really useful to sort them otherwise as the information would be lost and you can just sort them afterwards.

The reason the order of run_depends is important is that it influences how xbps solves ambiguous dependencies. As example in base-system, there is a dependency on runit-void which has a dependency on awk. awk is a virtual package provided by gawk, nawk and mawk. The base-system package also depends on the default awk provider which is gawk, by listing the gawk before the runit-void dependency. This is important because otherwise if there is not already a awk provider in the transaction, xbps would choose the alphabetically first provider in the repositories, which is in most cases not really acceptable.

Duncaen avatar Jun 25 '20 09:06 Duncaen

Sorry for this naive request, I wasn't aware for run_depends.
Others can be considered ? mainly shlib-requires for me.

yopito avatar Jun 25 '20 10:06 yopito

$ xbps-query -p shlib-requires coreutils | sort
libacl.so.1
libattr.so.1
libc.so
libcap.so.2
libgmp.so.10

Any reason this isn't enough?

ericonr avatar Jun 25 '20 22:06 ericonr

when diffing builds, it's much more convenient to dump the full output of xbps-query at once.
But I won't fight for such a minor improvement ;)

yopito avatar Jul 03 '20 05:07 yopito

Fair enough. If you want to try and implement it, there's a chance it can be accepted. Or perhaps you can try to make a wrapper for this?

ericonr avatar Jul 03 '20 14:07 ericonr