Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489362 - =app-arch/xz-utils-5.0.5-r1 stabilization request (was: /usr/bin/xzless: line 49: test: 457 (PCRE regular expressions): integer expression expected)
Summary: =app-arch/xz-utils-5.0.5-r1 stabilization request (was: /usr/bin/xzless: line...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Keywording and Stabilization (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: STABLEREQ
Depends on:
Blocks:
 
Reported: 2013-10-25 12:28 UTC by Zoltán Halassy
Modified: 2021-06-04 12:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltán Halassy 2013-10-25 12:28:16 UTC
Invoking xzless throws the following warning:

/usr/bin/xzless: line 49: test: 457 (PCRE regular expressions): integer expression expected

=app-arch/xz-utils-5.0.4-r1 and =sys-apps/less is installed at the same time.
xzless itself is a bash script on the line 49 the following expression can be found:

if test "$(less -V | { read ver && echo ${ver#less }; })" -ge 429; then

here,

less -V | { read ver && echo ${ver#less }; }

should give back the version number of less only, but it also gives back extra information:

457 (PCRE regular expressions)

checking the installable sys-apps/less versions, the smallest is 436. My proposal would be to make xz-utils depend on >=less-429 and remove the condition and the else branch alltogether with a patch.

The other would be to tell upstream about it and fix the test above.

A working soultion would be

less -V | { read less ver extra && echo $ver; }
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-10-30 07:27:28 UTC
This was already fixed upstream and is available in xz-utils-5.0.5 (which is not marked stable yet).

http://git.tukaani.org/?p=xz.git;a=blobdiff;f=src/scripts/xzless.in;h=288dd871e4c48b3f098d9ba066af767c5e697c84;hp=9bc9706b511f3c9dd159d16400dbb26679bb5829;hb=HEAD;hpb=db5c1817fabf7cbb9e4087b1576eb26f0747338e
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-10-30 08:56:18 UTC
Arches please test and mark stable =app-arch/xz-utils-5.0.5-r1

Target keywords are:
alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~arm-linux ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris
Comment 3 Elijah "Armageddon" El Lazkani (amd64 AT) 2013-10-30 15:22:32 UTC
amd64: pass

Note: repoman complains.
  ebuild.minorsyn 
   app-arch/xz-utils/xz-utils-5.0.5-r1.ebuild: Ebuild calls deprecated preserve_old_lib on line: 68
   app-arch/xz-utils/xz-utils-5.0.5-r1.ebuild: Ebuild calls deprecated preserve_old_lib on line: 72
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-31 14:27:39 UTC
Stable for HPPA.
Comment 5 Agostino Sarubbo gentoo-dev 2013-11-01 13:36:18 UTC
amd64 stable
Comment 6 Agostino Sarubbo gentoo-dev 2013-11-01 13:36:46 UTC
x86 stable
Comment 7 Matt Turner gentoo-dev 2013-11-04 01:57:49 UTC
alpha stable.
Comment 8 Markus Meier gentoo-dev 2013-11-29 17:13:03 UTC
arm stable
Comment 9 Agostino Sarubbo gentoo-dev 2013-12-21 19:00:39 UTC
ppc stable
Comment 10 Agostino Sarubbo gentoo-dev 2013-12-22 12:46:01 UTC
ppc64 stable
Comment 11 Agostino Sarubbo gentoo-dev 2013-12-23 15:31:55 UTC
sparc stable
Comment 12 Akinori Hattori gentoo-dev 2013-12-27 12:32:11 UTC
ia64 stable, closing
Comment 13 Nikita Zlobin 2021-06-04 12:11:42 UTC
Problem is still here, with xz-utils-5.2.5.
Problem is that bash takes only integers, but current less returns two-field version, separated by point. This may be fixed in xzless.in:

- if test "$(less -V | { read _ ver _ && echo ${ver}; })" -ge 429; then
+ if test "$(less -V | { IFS=' .' && read _ ver _ && echo ${ver}; })" -ge 429; then

(interpreting version field separator as separator too)