tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: FETCH_CMD and dependencies



On Sun, Feb 01, 2009 at 04:48:14PM +0200, Alan Barrett wrote:
> On Fri, 30 Jan 2009, Joerg Sonnenberger wrote:
> > If FETCH_USING is set to manual, FETCH_CMD specifies to program to use,
> > FETCH_BEFORE_ARGS etc have to be provided in that case as well.
> 
> The general idea looks good, but I would expect FETCH_USING=manual to
> mean "the user will manualy place distfiles in DISTDIR; pkgsrc should
> not automatically fetch distfiles in any way at all".  I suggest using
> FETCH_USING=custom to mean "pkgsrc should fetch distfiles using the
> custom command and arguments specified in FETCH_CMD, FETCH_BEFORE_ARGS,
> etc".

Fine with me. We can make FETCH_USING=manual default to false for
fetching :)

> > A check in bsd.prefs.mk will bail out explicitly if FETCH_CMD is set,
> > but FETCH_USING is not manual. Is that too restrictive?
> 
> I think that's too restrictive, because it makes it difficult for users
> to specify FETCH_CMD in mk.conf but temporarily override FETCH_USING
> from the command line.  Perhaps make it a warning (not an error) if
> FETCH_CMD and friends are set but FETCH_CMD != "custom".

The intention of making it an error was to make the migration path
explicitly and to not change the behavior silently. If you want to do
the above, you can just as easily use
.if !defined(FETCH_USING)
FETCH_USING=    custom
FETCH_CMD=      ...
.endif
in /etc/mk.conf. The biggest question is here how it should behave
otherwise.

> > Do we want to have a fallback mechasnim with associated magic so that
> > fetching wget when using FETCH_USING=wget does use ftp or fetch?
> 
> No, make it an error if FETCH_USING=foo but foo is not installed.

It should try to install foo, but the question is at what point do we
want to abort? pkgsrc can detect cyclic dependencies, so it will fail,
the question is how obvious it is for the user.

The dependency is important as tnftp will not be part of the bootstrap
after the pkg_install-renovation merge any longer.

Joerg


Home | Main Index | Thread Index | Old Index