Bug 210310 - [PATCH] Fix some sanity checks so they honor CLEAN_FETCH_ENV
Summary: [PATCH] Fix some sanity checks so they honor CLEAN_FETCH_ENV
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
URL: https://reviews.freebsd.org/D6682
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-06-15 19:39 UTC by Alan Somers
Modified: 2019-09-05 12:13 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer 2016-06-15 19:39:32 UTC
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.
Comment 1 Mathieu Arnold freebsd_committer 2016-06-15 21:55:17 UTC
What usage does it fix, precisely ?
Comment 2 Alan Somers freebsd_committer 2016-06-15 21:58:34 UTC
It fixes bulk-downloading distfiles on a system that isn't able to build the ports.  Here at work we use this patch to build download distfiles on a FreeBSD 9 machine even though we're intending to use those distfiles on a FreeBSD 10 machine.  The ports we fetch have conflicts with the ports that are installed on the FreeBSD 9  machine.
Comment 3 Chris Hutchinson 2016-06-16 14:27:15 UTC
(In reply to Alan Somers from comment #2)
> It fixes bulk-downloading distfiles on a system that isn't able to build the
> ports.  Here at work we use this patch to build download distfiles on a
> FreeBSD 9 machine even though we're intending to use those distfiles on a
> FreeBSD 10 machine.  The ports we fetch have conflicts with the ports that
> are installed on the FreeBSD 9  machine.

OK. Apologies in advance, if I'm missing something here.
But doesn't

make fetch-recursive

already provide for that?

--Chris
Comment 4 Alan Somers freebsd_committer 2016-06-16 14:41:00 UTC
Make fetch-recursive is supposed to do that, but it fails if the port can't be built.  That's what my patch fixes.  To demonstrate:

1) cd editors/vim
2) make config
3) Deselect every option, including all User Interface options
4) It will tell you "Config is invalid. Re-edit? [Y/n]".  Select n
5) make fetch-recursive

The last step will fail with the error 'You must select one and only one option from the UI single'
Comment 5 Chris Hutchinson 2016-06-16 15:56:59 UTC
(In reply to Alan Somers from comment #4)
> Make fetch-recursive is supposed to do that, but it fails if the port can't
> be built.  That's what my patch fixes.  To demonstrate:
> 
> 1) cd editors/vim
> 2) make config
> 3) Deselect every option, including all User Interface options
> 4) It will tell you "Config is invalid. Re-edit? [Y/n]".  Select n
> 5) make fetch-recursive
> 
> The last step will fail with the error 'You must select one and only one
> option from the UI single'

Ahh, sure. I see what you mean. That *can* be a problem.

Thanks for the clarification, Alan.

--Chris
Comment 6 Brad Davis freebsd_committer 2016-07-06 16:32:35 UTC
Ping portmgr@, can we get some review?
Comment 7 Baptiste Daroussin freebsd_committer 2019-09-05 12:13:50 UTC
I see the revision was abandonned. So let's close this PR as well