Page MenuHomeFreeBSD

Make all the targets in USES use the _USES_* helpers.
ClosedPublic

Authored by mat on Mar 23 2016, 11:23 AM.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mat updated this revision to Diff 14543.Mar 23 2016, 11:23 AM
mat retitled this revision from to Make all the targets in USES use the _USES_* helpers..
mat updated this object.
mat edited the test plan for this revision. (Show Details)
mat added subscribers: gnome, Python, portmgr and 2 others.
rakuco added a subscriber: rakuco.Mar 23 2016, 11:53 AM

Uses/qmake.mk looks fine to me. I didn't even know those _USES_foo variables existed.

kwm accepted this revision.Mar 23 2016, 12:15 PM
kwm added a reviewer: kwm.
kwm added a subscriber: kwm.

mat@ thanks looks good, though I would like some changes to fix a bugreport.

This is more a question for python@, if I read bsd.port.mk corrrect, USES_install is run before USES_stage.

Can we shuffle/rename/rework either the gnome USES_install or the USES_stage around so python.mk generate the plists before the gnome USES_installs are run? This is so that pure python ports that use autoplist, can get macro's like INSTALLS_ICONS to work.

The bug that reported this issue is: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206019

kwm added a comment.Mar 23 2016, 12:15 PM

And that should not have been approval status, sigh.

mat added a comment.Mar 23 2016, 12:17 PM
In D5717#122079, @kwm wrote:

mat@ thanks looks good, though I would like some changes to fix a bugreport.
This is more a question for python@, if I read bsd.port.mk corrrect, USES_install is run before USES_stage.

No.

It's sorted according to the number in front of the target. There's no real reason to have both _USES_install and _USES_stage, as they end up in the same place, they could be collapsed as one, but for the sake of being complete, we have both.

Can we shuffle/rename/rework either the gnome USES_install or the USES_stage around so python.mk generate the plists before the gnome USES_installs are run? This is so that pure python ports that use autoplist, can get macro's like INSTALLS_ICONS to work.
The bug that reported this issue is: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206019

mat added a comment.Mar 23 2016, 12:24 PM
In D5717#122079, @kwm wrote:

Can we shuffle/rename/rework either the gnome USES_install or the USES_stage around so python.mk generate the plists before the gnome USES_installs are run? This is so that pure python ports that use autoplist, can get macro's like INSTALLS_ICONS to work.
The bug that reported this issue is: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206019

And that bit, yes, I was planning to move gnome-post-icons later in the pipeline, I'm waiting for @truckman or someone from gnome to tell me when to put it ?

kwm added a comment.Mar 23 2016, 12:58 PM
In D5717#122084, @mat wrote:
In D5717#122079, @kwm wrote:

Can we shuffle/rename/rework either the gnome USES_install or the USES_stage around so python.mk generate the plists before the gnome USES_installs are run? This is so that pure python ports that use autoplist, can get macro's like INSTALLS_ICONS to work.
The bug that reported this issue is: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206019

And that bit, yes, I was planning to move gnome-post-icons later in the pipeline, I'm waiting for @truckman or someone from gnome to tell me when to put it ?

Oh look I have a gnome@ hat :) Well where to put it.. I only know about the python plist "conflict". And since the macro's only add things to the plist based on the content. They could probably be quite late in de sequence, at the minimum after the python "scripts" are run, 950 or something?

In D5717#122084, @mat wrote:
In D5717#122079, @kwm wrote:

Can we shuffle/rename/rework either the gnome USES_install or the USES_stage around so python.mk generate the plists before the gnome USES_installs are run? This is so that pure python ports that use autoplist, can get macro's like INSTALLS_ICONS to work.
The bug that reported this issue is: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206019

And that bit, yes, I was planning to move gnome-post-icons later in the pipeline, I'm waiting for @truckman or someone from gnome to tell me when to put it ?

I looked at all of the Makefiles that use both INSTALL_ICONS and fiddle with TMPPLIST and they all add stuff to the plist in either do-install or post-install. Moving the icon processing anywhere after post-install should fix those. I haven't looked at the python stuff.

I can't say that I'm thrilled with scattering magic numbers in more places, but concentrating them in the framework is better than having them scattered all over the ports tree. Comments in the Mk/Uses files about why those particular numbers were chosen would be helpful (needs to be after ... and/or needs to be before ...).

I think it would be helpful to have some documentation for each sequence, including the optional steps pulled in by USES, that has a brief description for each step.

This revision was automatically updated to reflect the committed changes.
rm added a subscriber: rm.Apr 24 2016, 11:50 AM

It looks like it is break gnome.mk GCONF_SCHEMAS at least (deinstallation of scheme file step). For example, I'm doing poudriere testport build of games/aisleriot. In the end of build I got:

The operation will free 14 MiB.
[prod11-prod-ports] [1/1] Deinstalling aisleriot-3.20.1...
[prod11-prod-ports] [1/1] Deleting files for aisleriot-3.20.1: .......... done
I/O warning : failed to load external entity "/usr/local/etc/gconf/schemas/aisleriot.schemas"
Failed to open `/usr/local/etc/gconf/schemas/aisleriot.schemas': No such file or directory
`

But installing/packaging works correctly.