[Bug 253356] devel/qt5-core: include/qt5/QtCore/qconfig-modules.h contains duplicated includes

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 8 21:55:40 GMT 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253356

Adriaan de Groot <adridg at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adridg at freebsd.org

--- Comment #2 from Adriaan de Groot <adridg at freebsd.org> ---
Let's take a look at what is in the package itself:

```
sqlite> select * from packages where origin = 'print/qt5-printsupport';
2048|print/qt5-printsupport|qt5-printsupport|5.15.2_1|Qt print support
sqlite> select * from pkg_script where package_id=2048;
2048|1|327
2048|7|317
sqlite> select * from script where script_id=327;
327|echo '#include <QtCore/modules/qconfig-printsupport.h>' >>
/usr/local/include/qt5/QtCore/qconfig-modules.h
```

There we go, that's the install script. The type 7 script is deinstall, which
removes the qconfig-printsupport.h line from qconfig-modules.


So if we install, deinstall the package, then the include line is removed.

Does pkg upgrade run deinstall / reinstall? No it does not. Doing an upgrade,
or a reinstall, or an `install -f`, all run the **install** script again, but
not the deinstall script (the right order would be deinstall, install, but even
that is flaky). That is where the duplications come from.

If the install script was smarter -- e.g. doing `sort -u` or something on the
`qconfig-modules.h` file -- then it would not produce duplicates. The install
script is generated in `Mk/Uses/qt-dist.mk` as part of the *qt-post-install*
target. We could add an extra line in there to do the `sort -u` in-place.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list