tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_summary(5) ordering



* On 2019-08-29 at 13:45 CEST, Joerg Sonnenberger wrote:

> On Thu, Aug 29, 2019 at 01:43:08PM +0200, Joerg Sonnenberger wrote:
> > On Thu, Aug 29, 2019 at 11:26:29AM +0100, Ottavio Caruso wrote:
> > > On Thu, 29 Aug 2019 at 08:26, Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
> > > >
> > > > Hi all,
> > > >
> > > > Is anyone aware of any utilities that depend on the rather ad-hoc (and
> > > > not guaranteed, e.g. CONFLICTS can come before PKGNAME depending on
> > > > plist order) ordering of pkg_summary(5) entries?
> > > 
> > > If I understand your question correctly, pkgin does. The ordering is
> > > done by `pkg_info -X *gz | bzip2 > pkg_summary.bz2`.
> > 
> > PKGNAME is required to be the first field, everything else can be in any
> > order. Programs that depend on more are broken.
> 
> Scratch that. Yes, the order is undefined. Entries are separated by
> empty line and that's the only constraint.

Right, CONFLICTS will often come before PKGNAME.

Basically, anything that does try to depend upon the current attempt
at ordering by pkg_info is likely broken, but I just wanted to clarify
that there weren't at least attempts to rely on the ordering of
BUILD_INFO vars or something.

It might be worth adding a sentence to pkg_summary(5) to make it clear
that the ordering is not guaranteed (except for DESCRIPTION, obvs).

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index