pkgsrc-Users archive

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

Re: Sorting problem with pkg_chk -b



Alan Barrett <apb%cequrux.com@localhost> écrit :
> On Sat, 16 Aug 2014, Marc Baudoin wrote:
> >Marc Baudoin <babafou%babafou.eu.org@localhost> écrit :
> >>When two versions of a binary packages are available, say package-XXnb9
> >>and packageXXnb10 or later (same package, same version, only nb version
> >>differs and the newest one is greater or equal to 10), pkg_chk -b
> >>installs nb9 and not the newest version.  It looks like it's using
> >>lexicographic order instead of numeric.
> 
> The problem appears to be in the ${SORT} invocation on line 77 of pkg_chk:
> 
> 76             # Sort so highest matching package picked first
> 77             PKGNAMES="$(echo $PKGNAMES | tr ' ' '\n' | ${SORT} -r)"
> 
> I'd suggest fixing it by adding a "sort" sub-command to pkg_admin(8), to
> sort a list of version numbers, but perhaps somebody else can see how to use
> some existing pkg_admin sub-commands to achieve the desired result.
> 
> Anyway, please report this problem via send-pr, so it can be assigned a
> tracking number.

Done: pkg/49152.


Home | Main Index | Thread Index | Old Index