Bug 54386 - --print-variables outputs consecutive package variables in reverse order
--print-variables outputs consecutive package variables in reverse order
Status: RESOLVED FIXED
Product: pkg-config
Classification: Unclassified
Component: src
unspecified
Other All
: medium normal
Assigned To: Tollef Fog Heen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-02 11:11 UTC by Michał Górny
Modified: 2012-12-11 19:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny 2012-09-02 11:11:19 UTC
When multiple packages are passed to --print-variables, the output is printed in reverse order which is confusing to the user, e.g.:

$ pkg-config --print-variables udev systemd
systemdsystemconfdir
exec_prefix
systemduserconfdir
systemdsystemunitdir
systemdutildir
systemdsystemunitpath
prefix
systemduserunitpath
systemduserunitdir

udevdir

I believe that the module list should be re-reversed before printing variables, or iterated from the end.
Comment 1 Dan Nicholson 2012-12-11 19:40:49 UTC
I didn't notice at the time, but this is also fixed by commit d6a1448, which moved the handling after the package list was reversed to the correct orientation.

I'm not sure how useful it is to print the variables from multiple packages, but I don't see a reason to remove that behavior right now.