Page MenuHomeFreeBSD

Mk/Uses/php.mk: change exec and unexec to post*
ClosedPublic

Authored by joneum on Sep 2 2017, 2:09 PM.

Details

Summary

When "USES= php:ext" is set into the Makefile, there is a following
warning:"@exec is deprecated, please use @[pre|post][un]exec" [1][2]
After change exec and unexec to post* it works again correctly

[1] https://github.com/freebsd/freebsd-ports/blob/master/CHANGES#L407
[2] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#plist-keywords-base-exec

Approved by: xxx (mentor)
#Differential Revision: https://reviews.freebsd.org/Dxxxxx

Test Plan

before (example: archivers/php-snappy)
http://joneumbox.org/data/10amd64-ports/2017-09-02_11h11m11s/logs/php-snappy-0.1.8.log

after change:
http://joneumbox.org/data/10amd64-ports/2017-09-02_15h54m19s/logs/php-snappy-0.1.8.log

i add ale, because: "PHP_Include_MAINTAIER= ale@FreeBSD.org"

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

joneum created this revision.Sep 2 2017, 2:09 PM
antoine added a subscriber: antoine.Sep 2 2017, 2:44 PM

Why postunexec and not preunexec ?

% pkg info -RF /poudriere/data/packages/head-i386-default/All/php-snappy-0.1.7.txz 
...
scripts: {
    post-install: "echo \\#include \\\"ext/snappy/config.h\\\" >> /usr/local/include/php/ext/php_config.h",
    pre-deinstall: "cp /usr/local/include/php/ext/php_config.h /usr/local/include/php/ext/php_config.h.orig\ngrep -v ext/snappy/config.h /usr/local/include/php/ext/php_config.h.orig > /usr/local/include/php/ext/php_config.h || true\n/bin/rm -f /usr/local/include/php/ext/php_config.h.orig"
}
joneum added a comment.Sep 2 2017, 3:22 PM

Why postunexec and not preunexec ?

I was not sure. I will test it with pre*

The output of the pkg info command was with what we currently do in the ports tree.

joneum updated this revision to Diff 32611.Sep 2 2017, 4:57 PM

mv postunexec to preunexec

antoine added inline comments.Sep 2 2017, 4:58 PM
Mk/Uses/php.mk
282 ↗(On Diff #32611)

typo

mat added a comment.Sep 4 2017, 2:01 PM

This looks ok to me. @antoine, do you think an exp-run is needed ?

In D12215#253529, @mat wrote:

This looks ok to me. @antoine, do you think an exp-run is needed ?

The packages before and after the change don't differ, I don't think an exp-run is needed.

In D12215#253529, @mat wrote:

This looks ok to me. @antoine, do you think an exp-run is needed ?

The packages before and after the change don't differ, I don't think an exp-run is needed.

Great, then...

Macro ssshipit:

rene accepted this revision.Sep 9 2017, 4:03 PM
This revision is now accepted and ready to land.Sep 9 2017, 4:03 PM
This revision was automatically updated to reflect the committed changes.