Page MenuHomeFreeBSD

Fix some sanity checks so they honor CLEAN_FETCH_ENV
AbandonedPublic

Authored by asomers on Jun 1 2016, 8:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 1:57 AM
Unknown Object (File)
Mar 16 2024, 11:17 AM
Unknown Object (File)
Mar 16 2024, 11:17 AM
Unknown Object (File)
Feb 11 2024, 1:59 AM
Unknown Object (File)
Feb 7 2024, 4:49 PM
Unknown Object (File)
Feb 3 2024, 8:26 AM
Unknown Object (File)
Dec 22 2023, 9:34 PM
Unknown Object (File)
Dec 8 2023, 2:06 PM
Subscribers

Details

Reviewers
beat
ohauer
Group Reviewers
O5: Ports Framework(Owns No Changed Paths)
portmgr
Summary

This variable signals to ports that it will be operating in a fetch-only
environment and therefore should ignore any environmental checks that would
prevent it from running.

Mk/bsd.port.mk:

Ignore errors with incompatible port options when CLEAN_FETCH_ENV is 
set.  Ignore package conflicts when CLEAN_FETCH_ENV is set.

security/krb5-*/Makefile:

Ignore KRB5_HOME != LOCALBASE if CLEAN_FETCH_ENV is set.  In the
fetch-depends script, LOCALBASE is set to an empty directory that
differs from the default, which causes this conditional to trigger.
Since it's irrelevant for fetch-only jobs, ignore it here.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 5239
Build 5390: arc lint + arc unit

Event Timeline

asomers retitled this revision from to Fix some sanity checks so they honor CLEAN_FETCH_ENV.
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added reviewers: ohauer, beat.
asomers added a subscriber: brd.

It lacks an update of CLEAN_FETCH_ENV's documentation.

Or maybe, defined(CLEAN_FETCH_ENV) should be replaced with make(fetch) or ${.TARGETS:Mfetch*} or something

In D6682#151354, @mat wrote:

It lacks an update of CLEAN_FETCH_ENV's documentation.

Or maybe, defined(CLEAN_FETCH_ENV) should be replaced with make(fetch) or ${.TARGETS:Mfetch*} or something

The latter wouldn't work, because it would match when the user does "make fetch build". But the former _does_ work. I'll update the diff to entirely eliminate the CLEAN_FETCH_ENV variable.

I still don't like that ports need to be modified for this. Maybe it should set NO_IGNORE or something else.

asomers edited edge metadata.

Instead of changing the behavior of CLEAN_FETCH_ENV, just make the fetch and
checksum targets ignore BROKEN, CONFLICTS, and option checks. There's no
longer any need to modify individual ports. One necessary but unintended
behavioral change is that the check-sanity target will no longer be skipped for
IGNOREd ports.

Can someone please review my latest change to this diff?

Mk/bsd.port.mk
2649

This variable actually does the opposite of its name, I think.

2719

Where did the check-sanity target go ?

Mk/bsd.port.mk
2649

What it means is that attempting to build these targets will cause a port to be ignored, if there's a good reason. Would it be clearer if I just changed it to _TARGETS= and _TARGETS+= everywhere?

2719

I had to remove it from the list, because of the order of evaluation. check-sanity always gets evaluated before fetch or checksum. So if check-sanity gets ignored, then you can't do make fetch or make checksum. The check-sanity target still works, of course. The change is that check-sanity will never be skipped due to IGNORE, RESTRICTED, etc.

@mat do you approve this revision. I'll be forced to abandon it in two days if I don't get approval.

Abandoning revision because I didn't get approval before I lost access to the test environment.