[MacPorts] #57003: port info order of fields is unexpected
MacPorts
noreply at macports.org
Mon Aug 20 09:30:12 UTC 2018
#57003: port info order of fields is unexpected
------------------------+--------------------
Reporter: ryandesign | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.5.99
Keywords: | Port:
------------------------+--------------------
The order in which `port info` outputs fields is consistent, for a
particular set of flags, but is unexpected. The output order does not
match the order of the flags, yet it changes if I change the order of the
flags:
{{{
$ port info --name --epoch --revision --version py35-tkinter
version: 3.5.6
revision: 0
epoch: 20170810
name: py35-tkinter
}}}
{{{
$ port info --name --revision --version --epoch py35-tkinter
version: 3.5.6
epoch: 20170810
revision: 0
name: py35-tkinter
}}}
What's going on here? Are the flags perhaps being stored in an unordered
collection, and the order in which we process them depends on the order in
which Tcl happens to store them?
We should either make the output the same regardless of the order in which
the flags are specified (alphabetical order, for example), or (my
preference) output the fields in the order in which the flags were
specified on the command line. (As an addendum, this might mean we want to
add the ability to output the same field more than once: `port info --name
--name` currently outputs the name only once.)
Either change may break scripts that relied on the current peculiar order
of output, so we should probably not make the change in a bugfix release
of MacPorts, but in a feature release.
--
Ticket URL: <https://trac.macports.org/ticket/57003>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list