[Pkgutil-users] patch to support non-standard VERSION entries
Status: Beta
Brought to you by:
bonivart
|
From: <ma...@pr...> - 2010-07-23 10:55:46
|
BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }Can
I suggest that the following patch is accepted into the next release
of pkgutil?
*** 2.1b1/pkgutil Sat Jul 17 15:44:53 2010
--- pkgutil-2.1b1-edited Fri Jul 23 11:00:14 2010
***************
*** 1776,1781 ****
--- 1776,1783 ----
@p2list = split(/./,$p2tmp);
for (my $i = 0; $i < scalar(@p1list); $i++) {
+ $p1list[$i] =~ s/[^0-9]//g;
+ $p2list[$i] =~ s/[^0-9]//g;
if (! $p2list[$i]) {
$update = 1;
last;
The reason we need this is we are using pkgutil against our own
internal repository, and we have in-house developed packages and
third party packages with non-standard VERSION parameters, such as:
VERSION=2.0p1,REV=16_sun
or
VERSION=5.0,REV=5.0A55_sol
pkgutil currently splits the REV component by dots and then performs
a numerical comparison on each element in order to determine which
package is more current. This works for us just fine, except that
the components are not entirely numerical so we get the following
errors:
Argument "16_sun" isn't numeric in numeric ne (!=) at
/opt/csw/bin/pkgutil line 1783.
Argument "18_sun" isn't numeric in numeric ne (!=) at
/opt/csw/bin/pkgutil line 1783.
The patch above fixes this issue by stripping all non-digits from an
element before performing the comparison.
Thanks & regards,
Mark.
|