Page MenuHomeFreeBSD

Mk/bsd.port.mk: stage-qa target should depend on stage
ClosedPublic

Authored by skozlov on Nov 4 2015, 11:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 31, 2:50 AM
Unknown Object (File)
Fri, Oct 31, 2:50 AM
Unknown Object (File)
Fri, Oct 31, 2:50 AM
Unknown Object (File)
Thu, Oct 30, 9:45 PM
Unknown Object (File)
Sat, Oct 25, 3:13 AM
Unknown Object (File)
Tue, Oct 7, 5:37 AM
Unknown Object (File)
Oct 5 2025, 5:30 AM
Unknown Object (File)
Oct 5 2025, 4:11 AM
Subscribers

Details

Summary

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

"stage-qa" target should depend on "stage" like, for example, "check-plist" does.

If "stage" is not done, "stage-qa" have nothing to verify and reports "file not found" errors.

Test Plan

Checked on one of my ports: devel/staf

without the patch:

$ make clean stage-qa
===>  Cleaning for staf-3.4.23
====> Running Q/A tests (stage-qa)
cd: /usr/home/leeroyjenkins/prtwrk/staf/work/stage: No such file or directory
find: /usr/home/leeroyjenkins/prtwrk/staf/work/stage: No such file or directory
find: /usr/home/leeroyjenkins/prtwrk/staf/work/.PLIST.mktmp: No such file or directory
find: /usr/home/leeroyjenkins/prtwrk/staf/work/stage: No such file or directory
find: /usr/home/leeroyjenkins/prtwrk/staf/work/stage: No such file or directory
find: /usr/home/leeroyjenkins/prtwrk/staf/work/stage: No such file or directory

with the patch:

$ make clean stage-qa
===>  Cleaning for staf-3.4.23
... build omitted ...
===>  Staging for staf-3.4.23
===>   Generating temporary packing list
... staging omitted ...
====> Running Q/A tests (stage-qa)

Diff Detail

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

Event Timeline

skozlov retitled this revision from to Mk/bsd.port.mk: stage-qa target should depend on stage.
skozlov updated this object.
skozlov edited the test plan for this revision. (Show Details)
skozlov set the repository for this revision to rP FreeBSD ports repository.
skozlov edited edge metadata.

That's the wrong fix.

stage-qa is already in the target dependency pipeline, but only if DEVELOPER=yes.

It should be more like this:

.if defined(DEVELOPER)
actual stage-qa
.else
stage-qa:
        @${ECHO_MSG} "You must add DEVELOPER=yes to your make.conf for this to work"
        @exit 1
.endif

why have the DEVELOPER condition?

I don't have DEVELOPER=yes set and I hit this probably *all* the time, and wonder why it works that way.
I'd like to see it fixed.

(I'll work on it and fix)

In D4082#85818, @marino wrote:

why have the DEVELOPER condition?

So that it runs when you run make stage when you have DEVELOPER=yes.

I don't have DEVELOPER=yes set and I hit this probably *all* the time, and wonder why it works that way.
I'd like to see it fixed.

Add DEVELOPER=yes to your make.conf.

Let me rephrase:

Why is this limited to DEVELOPER?
It is useful enough for everyone.

And larger question is: What value does developer still bring? Why not just remove it? What does it bring to the table that can't be done for regular users? Is not this knob obsolete?

Because it does many things that the end user do not care about, and it can fail when the port is usable, for some qa reason.

"it can fail when the port is usable, for some qa reason."

If that's the case then either the check is invalid or the port needs fixing.

I would love to see a case where that statement above isn't true.

I'd also love to see a through list of what DEVELOPER is still doing and why it's not merged into standard qa checks. It's probably not documented though and I'd have to go do the research myself.

So that it runs when you run make stage when you have DEVELOPER=yes

It's already that way - if you have DEVELOPER=yes in your make.conf stage-qa runs after stage automatically, no fixing required

It's not that "stage-qa" should be done always when "stage" is called, it's vise versa - "stage" should be done every time "stage-qa" is called, and it won't change anything in usual build process for a user, except the case when user explicitly calls "stage-qa" for some reason (like marino@ does when he doen't have DEVELOPER=yes in his make.conf)

Also - there's exactly the same code for "check-plist" in bsd.port.mk already:

.if !target(check-plist)
check-plist: stage
        @${ECHO_MSG} "====> Checking for pkg-plist issues (check-plist)"
        @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh checkplist
        @${ECHO_MSG} "===> No pkg-plist issues found (check-plist)"
.endif

Why "check-plist" can be run w/o DEVELOPER and it depends on "stage", and "stage-qa" should not?

This revision was automatically updated to reflect the committed changes.