Page MenuHomeFreeBSD

Add support for "pkg create -v"
ClosedPublic

Authored by marino on Aug 27 2015, 5:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 20 2024, 1:02 PM
Unknown Object (File)
Mar 17 2024, 8:23 PM
Unknown Object (File)
Dec 20 2023, 1:10 AM
Unknown Object (File)
Nov 11 2023, 4:23 AM
Unknown Object (File)
Nov 11 2023, 12:30 AM
Unknown Object (File)
Nov 8 2023, 11:08 AM
Unknown Object (File)
Oct 21 2023, 12:58 AM
Unknown Object (File)
Oct 12 2023, 12:58 AM
Subscribers

Details

Summary

This modification adds a new knob, PKG_CREATE_VERBOSE. When
set to any value, it will add "-v" to the PKG_CREATE_ARGS definition.

The intended purpose of this is allow poudriere to request verbosity
during packaging to avoid timeouts in this phase. This may also also
the timeout/runaway period to be reduce as is set high most likely for
long packaging times.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

marino retitled this revision from to Add support for "pkg create -v".
marino updated this object.
marino edited the test plan for this revision. (Show Details)
bapt added inline comments.
Mk/bsd.port.mk
3460 ↗(On Diff #8262)

Please Create something like:

.if defined(PKG_CREATE_VERBOSE)
_PKG_CREATE_VERBOSE_FLAGS= -v
.endif

then use that new variable which will only be set if PKG_CREATE_VERBOSE is set

I considered that approach, but found it to be less clean and requiring the same number of line changes --- all while being functionally identical.

Since neither _PKG_CREATE_VERBOSE_FLAGS (with nasty underscore prefix) nor PKG_CREATE_ARGS can be altered by user, I didn't see the point of creating the extra variable.

In D3507#71996, @marino wrote:

I considered that approach, but found it to be less clean and requiring the same number of line changes --- all while being functionally identical.

Since neither _PKG_CREATE_VERBOSE_FLAGS (with nasty underscore prefix) nor PKG_CREATE_ARGS can be altered by user, I didn't see the point of creating the extra variable.

But duplicating all the other args is the best way to make sure that one day they won't be kept in sync.

If they were physically separate, I'd agree but they are one line apart (you have to admit that possibility is not very likely).

Plus my proposal means 1 less evaluation thus (slightly) more performant.
I really did put some thought into the decision.

In D3507#72003, @marino wrote:

If they were physically separate, I'd agree but they are one line apart (you have to admit that possibility is not very likely).

Plus my proposal means 1 less evaluation thus (slightly) more performant.
I really did put some thought into the decision.

I'm not sure about evaluation time, the .else vs the extra variable.

The point of the extra variable is not evaluation time or whatever but to avoid duplicating a line that that could lead to mistakes in the futur.

once fmake support is gone what would be turned into a simple

PKG_CREATE_ARGS= ${PKG_CRATE_VERBOSE:D-v} -r ${STAGEDIR} -m ${METADIR} -p ${TMPPLIST}

and no more else etc.
The other option if you prefer is the following:
.if defined(PKG_CREATE_VERBOSE}
PKG_CREATE_ARGS+= -v
.endif

i don't think the potential error is at all realistic but I'll update the patch.

marino edited edge metadata.

Modified as requested

bapt added a reviewer: bapt.
This revision is now accepted and ready to land.Aug 28 2015, 1:21 PM
This revision was automatically updated to reflect the committed changes.