[Libguestfs] [PATCH] lib: remove extra @LIBS@ from pkg-config file

Eric Blake eblake at redhat.com
Wed Mar 11 21:25:40 UTC 2020


On 3/11/20 4:17 PM, Richard W.M. Jones wrote:
> On Wed, Mar 11, 2020 at 01:21:06PM +0100, Pino Toscano wrote:
>> At the moment it is empty, so probably it does not exist. Remove it to
>> avoid adding spurious content to the pkg-config file in case that
>> variable will get a value in the future.
>> ---
>>   lib/libguestfs.pc.in | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/libguestfs.pc.in b/lib/libguestfs.pc.in
>> index 679ed7eba..013bf0f28 100644
>> --- a/lib/libguestfs.pc.in
>> +++ b/lib/libguestfs.pc.in
>> @@ -8,4 +8,4 @@ Version: @VERSION@
>>   Description: libguestfs library for accessing and modifying VM images
>>   Requires:
>>   Cflags:
>> -Libs: -lguestfs @LIBS@
>> +Libs: -lguestfs
> 
> I don't really know about this any better than Eric, but I did look at
> the about 250 *.pc.in files in random development trees in my home
> directory.  Not a statistically independent sample!
> 
> Only these (discounting libguestfs) have @LIBS@ in the file:
> 
>   - augeas
>   - hivex
>   - libarchive
>   - libnbd
>   - libpng
>   - libxml2 (twice)
>   - openvswitch (4 sub-libraries)
>   - portaudio
> 
> Hivex and libnbd are likely derived from libguestfs, and maybe augeas.
> Note that libvirt doesn't appear.
> 
> I think we can make an argument that it's a rarely used feature and we
> should remove it.

Okay, I'm also in favor of removing it.  After thinking about it, Pino's 
reminder that the .pc is what other code should use to link to us, 
rather than what we had to link to internally, makes sense - even if a 
user passes LIBS= during configure, that should not leak to the outside 
use of our public interface.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list