[Qbs] Failed 'PackageBuild' product on QBS 1.22

Карелин Павел hkarel at yandex.ru
Wed May 4 18:18:13 CEST 2022


 > I cannot reproduce this.

I began to understand further and found out that the problem manifests 
itself in only one project. It turned out that at the project level I 
have a 'Probe' section:

Project {
     Probe {
         ...
         configure: {
             if (File.exists(projectBuildDirectory + "/package_build_info"))
                 File.remove(projectBuildDirectory + "/package_build_info")
         }
     }
}

It turns out that when I opened the project in QtC, 'Probe' was executed 
from the 'PackageBuild' product (the package_build_info file was 
created), and when I started the build process, 'Probe' was executed 
from the project level (the package_build_info file was deleted). In 
versions QBS 1.21, 1.20, and earlier did not show this behavior.
My mistake, it's good to find it:))

 > but I have a suspicion that a configure script is not the right place 
to do whatever it is you are doing there.
I agree, section 'Probe' is probably not very suitable for generating 
auxiliary files, but this is a very simple solution to my problem, which 
is why I used it.

Christian, how would you solve my problem?
After the project is built, the deb-package is assembled. To build the 
deb-package, you need a list of dependent libraries (not all, only 
parts, system dependencies no required). For example this list:

/opt/ffmpeg/4.4/lib/libavutil.so*
/opt/ffmpeg/4.4/lib/libswscale.so*
/opt/ffmpeg/4.4/lib/libswresample.so*
/opt/opencv/4.5.5/lib/libopencv_core.so*
/opt/opencv/4.5.5/lib/libopencv_calib3d.so*
/opt/opencv/4.5.5/lib/libopencv_imgproc.so*

I can get library paths and names of so-modules from dependencies:

Depends { name: "lib.ffmpeg" }
Depends { name: "lib.opencv" }

How can I create such a list and put it in the package_build_info file? 
With the rules?

--
Pavel


04.05.2022 11:31, Christian Kandeler пишет:
> On 5/3/22 21:44, Карелин Павел wrote:
>> Hello, developers.
>>
>> I have a small product "PackageBuild" in my projects, I use it to 
>> generate the package_build_info file. 
> [ ... ]
>> When I open the project in QtC 7 the file package_build_info is 
>> successfully created, but after the build process starts the file 
>> package_build_info is deleted.
>
> I cannot reproduce this.
>
> Note, however, that you should not keep untracked non-temporary files 
> in the build directory. Generally, it should contain only proper 
> artifacts created by rules. Of course I don't know the specifics of 
> your project, but I have a suspicion that a configure script is not 
> the right place to do whatever it is you are doing there.
>
>
> Christian
>
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org
> https://lists.qt-project.org/listinfo/qbs



More information about the Qbs mailing list