Bug 253360 - print/qt5-printsupport: stale include in include/qt5/QtCore/qconfig-modules.h when reinstalling without DBUS
Summary: print/qt5-printsupport: stale include in include/qt5/QtCore/qconfig-modules.h...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-09 01:15 UTC by Benjamin Takacs
Modified: 2021-02-23 23:44 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Takacs 2021-02-09 01:15:05 UTC
When print/qt5-printsupport gets installed with the DBUS option set and later reinstalled with with the DBUS option unset it no longer has QtCore/modules/qconfig-printsupport.h (as it would be empty anyways), but include/qt5/QtCore/qconfig-modules.h still contains #include <QtCore/modules/qconfig-printsupport.h> because reinstalls don't remove those includes (as pointed out in bug #253356, comment #2)
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-02-23 20:12:34 UTC
A commit references this bug:

Author: adridg
Date: Tue Feb 23 20:11:57 UTC 2021
New revision: 566427
URL: https://svnweb.freebsd.org/changeset/ports/566427

Log:
  Re-work Qt5 install- and deinstall scripts.

  Qt5 packages *together* manage a header file qconfig-modules.h which
  `#includes` other headers. A given Qt5 package may get a line in there,
  or it might not: that depends on package settings.

  On installing a package, add the line (if needed), on deinstall, remove
  the line (if it was there). There's a tricky case, too: upgrading
  a package that *had* a line, but no longer has one. That behaves like
  deinstall. Previously we used @postexec and @postunexec lines, but
  these were fragile in their own special way. See the linked PRs for
  examples -- or tcberner's comment that his qconfig-modules.h file
  *was* a screenful, and is now much shorter (and alphabetical, too!)

  An additional complication comes from needing to update qtchooser,
  *if* it is installed and *if* the package needs it. There was another
  set of @postexec lines for that.

  Migrate all the update logic to a shell script (there already was one
  for deinstall, now make it do triple-duty). From the template file,
  `pkg-change.in`, we generate a pkg-install and a pkg-deinstall
  script that does the right thing.

  PR:		253356 253360
  Reported by:	Nimaje on IRC
  Reviewed by:	tcberner

Changes:
  head/Mk/Uses/qt-dist.mk
  head/devel/qt5/files/pkg-change.in
  head/devel/qt5/files/pkg-deinstall.in