Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
1.22.1
-
None
-
3e0553e465 (qbs/qbs/1.23) 3e0553e465 (qbs/qbs/master) 3e0553e465 (qbs/qbs/1.24)
Description
Hello,
if a pkg-config file contains an empty variable which will we used by another variable or key the Qbs pkgconfig-parser just throws an error. But it is legal to have and use empty variables in a pkgconfig file.
In my case my systemd.pc file contains
root_prefix= ... systemd_util_dir=${root_prefix}/lib/systemd
The line triggering the exception: https://github.com/qbs/qbs/blob/b20256ccef06f515d1cbfdd51bf2b2398d114c70/src/lib/pkgconfig/pcparser.cpp#L469
As I understand it is completely valid to reference a undefined variables. Thus the result here beeing an empty string would be valid. No error should be thrown.
(see https://github.com/pkgconf/pkgconf/blob/b0802cb3d19b5b963ad20eed464a2da6e7d7b0b5/libpkgconf/tuple.c#L293 for reference)