Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1702

pkgconfig throws when trying to substitute empty variables

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 1.22.1
    • Dependency Tracking
    • 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)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            Psy-Kai Kai Dohmen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes