[sane-devel] [PATCH 2/2] sane-config fix, don't provide random infos

Nils Philippsen nils at tiptoe.de
Mon Sep 3 16:21:00 UTC 2012


Hi there,

I should probably monitor sane-devel more closely (sue me ;-)).

On Tue, 2012-02-07 at 21:24 +0100, Ruediger Meier wrote:
> From: Ruediger Meier <ruediger.meier at ga-group.nl>
> 
> This got broken in 26ea2a25.
> If we configure --prefix=/tmp/bla then /tmp/bla/bin/sane-config should
> tell us the right things instead of using any default search paths.
> ---
>  tools/sane-config.in |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/sane-config.in b/tools/sane-config.in
> index 1fae2e5..8e4b52a 100644
> --- a/tools/sane-config.in
> +++ b/tools/sane-config.in
> @@ -10,6 +10,10 @@ scriptname="sane-config"
>  prefix="@prefix@"
>  exec_prefix="@exec_prefix@"
>  
> +# using our installed *.pc only - neither default nor user paths
> +export PKG_CONFIG_LIBDIR="@libdir@/pkgconfig"
> +export PKG_CONFIG_PATH=""
> +

Well, this ^^ broke multilib again in 1.0.23 (but it's really my fault
for not spotting this earlier): it makes the sane-config script differ
between 32bit and 64bit installation, which prevents installing both
32bit and 64bit versions of development packages (which usually contain
it) on the same machine, see:

https://admin.fedoraproject.org/updates/FEDORA-2012-13142/sane-backends-1.0.23-1.fc17

I agree that there should be a way to have sane-config produce the
correct information if someone installs sane-backends into a private
prefix (as long as we have it -- can we get rid of it pretty please?),
but it should also work for both bit sizes when installed system-wide. I
mean if someone used sane-config installed into /usr/bin it should work
for building binaries for either ix86 or x86_64 if both variants are
available. This was the intention of my original patch, i.e. defer the
decision about 32bit/64bit to pkg-config which uses /usr/lib64/pkgconfig
or /usr/lib/pkgconfig respectively, depending on the desired variant
(i.e. default or whatever the user selected with setarch).

BTW, now that I think about it the patch above will become faulty as
soon as our *.pc file correctly specifies dependencies, i.e. listing
libraries on which sane-backends depends on the "Requires:" line instead
of hard-coding the flags in "libs". In that case, pkg-config won't know
what flags to use since we forbade it to look in its default location.

Any ideas how to tackle this conundrum?

Nils
-- 
Nils Philippsen / Wilhelmstraße 22 / D-71229 Leonberg 
nils at tiptoe.de / nils at redhat.com
PGP fingerprint:  C4A8 9474 5C4C ADE3 2B8F  656D 47D8 9B65 6951 3011
Ever noticed that common sense isn't really all that common?




More information about the sane-devel mailing list