]> sourceware.org Git - libabigail.git/commit
configure: Instead of for rpm 4.15+ version, test actual rpm/zstd support
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 10 Dec 2021 16:52:46 +0000 (17:52 +0100)
committerDodji Seketeli <dodji@redhat.com>
Fri, 17 Dec 2021 20:13:25 +0000 (21:13 +0100)
commit70154559495f1efcaaef2a3012d7e042a0bd597b
treeaa258df94d9d5e6fd331b07bf918d1f2f8dbf8d9
parent0101d472d113e2dbf59d745b32c36aa248d0c47a
configure: Instead of for rpm 4.15+ version, test actual rpm/zstd support

If no 'rpm' is available, we currently get:

    [...]
    checking for rpm... no
    ../git/configure: line 13119: rpm: command not found
    configure: detected rpm version:
    configure: rpm support in abipkgdiff is disabled
    [...]
     Here is the configuration of the package:
    [...]
        Enable rpm support in abipkgdiff               : no
        Enable rpm 4.15 support in abipkgdiff tests    : no
    [...]

Notice intermixed error output: 'rpm: command not found'.

If Ubuntu focal 'rpm' 4.14.2.1+dfsg1-1build2 is available, we currently get:

    [...]
    checking for rpm... yes
    configure: detected rpm version: 4.14.2.1
    configure: rpm support in abipkgdiff is enabled
    configure: rpm 4.15 support in abipkgdiff tests is enabled
    [...]
     Here is the configuration of the package:
    [...]
        Enable rpm support in abipkgdiff               : yes
        Enable rpm 4.15 support in abipkgdiff tests    : yes
    [...]

Notice wrong 4.15+ version detection (due to '[[ "$rpmversion" > "4.14.0" ]]'),
which is satisfied by '4.14.2.1'.  (Comparing versions with shell '[['
generally is fragile; instead use 'autoconf-archive/ax_compare_version.m4'
or similar?)

Also, 'configure'ing with '--disable-rpm415' doesn't work; same output as
before.  That's due to commit 26c41c060bf30750fe2cded87edaf1ae47027523
"Fix thinko in configure.ac", where either there was no thinko in fact (the
original idea, I suppose, was only if 'test x$ENABLE_RPM = xyes' to do the
4.15+ 'auto' checking?), and/or a typo: instead of 'test x$ENABLE_RPM = xyes',
the first conditional should 'test x$ENABLE_RPM415 = xyes'?

And, 'configure'ing with '--enable-rpm415' doesn't raise a hard error if 'rpm'
actually isn't 4.15+.

But all that said, we don't actually need to check for rpm 4.15+ version, but
instead may simply check for the rpm/zstd support that we need: 'rpm2cpio'.

* configure.ac: Instead of for rpm 4.15+ version, test actual
rpm/zstd support.
* tests/test-diff-pkg.cc: Adjust.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
configure.ac
tests/test-diff-pkg.cc
This page took 0.033071 seconds and 5 git commands to generate.