detect xz/lzma support in rpm5 #37

Merged
merged 1 commit into from Jan 21, 2013

2 participants

@JonnyJD

rpm5 doesn't use PayloadIsLzma, but rather has _lzma in "rpm --showrc".
Same with PayloadIsXz / _xz.

So we check for both with egrep.

The fix was tested with rpm(4) and rpm5 on Arch Linux,
where the "rpm" package is rpm5 and "rpm-org" is rpm(4).

@JonnyJD JonnyJD detect xz/lzma support in rpm5
rpm5 doesn't use PayloadIsLzma, but rather has _lzma in "rpm --showrc".
Same with PayloadIsXz / _xz.

So we check for both with egrep.

The fix was tested with rpm(4) and rpm5 on Arch Linux,
where the "rpm" package is rpm5 and "rpm-org" is rpm(4).
51ce4e6
@JonnyJD

The error message I had with when building was before:

[1/29] preinstalling filesystem...
lzma: (stdin): File format not recognized

because rpm5's rpm2cpio DID decompress the package with lzma already when "lzma -d" was in the pipe.

relevant output of rpm --showrc.

rpm5:

-14: __lzma /usr/bin/lzma
-14: __lzop %{_bindir}/lzop
-14: __xz   /usr/bin/xz

rpm(4):

    rpmlib(PayloadIsLzma) = 4.4.2-1
    rpmlib(PayloadIsXz) = 5.2-1
@JonnyJD

And yes, I am using rpm.org's rpm now and it works.
I patched my obs-build anyways and wanted to share my fix.

I have another unsolved problem with rpm5 rpm5#80 that keeps me from using it with obs-build, but that one is definately on rpm5's side.

@mlschroe mlschroe merged commit a97e185 into openSUSE:master Jan 21, 2013
@JonnyJD JonnyJD deleted the unknown repository branch Jan 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment