Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 1998 01:14:54 +1000
From:      Sue Blake <sue@welearn.com.au>
To:        Tim Vanderhoek <ac199@hwcn.org>
Cc:        Chuck Robey <chuckr@Glue.umd.edu>, freebsd-ports@FreeBSD.ORG
Subject:   Re: questions about packages
Message-ID:  <19980720011454.23919@welearn.com.au>
In-Reply-To: <19980719072000.B20184@zappo>; from Tim Vanderhoek on Sun, Jul 19, 1998 at 07:20:00AM -0400
References:  <19980718171423.58388@welearn.com.au> <Pine.BSF.3.96.980718050959.18866M-100000@localhost> <19980719001610.45098@welearn.com.au> <19980718134825.C11959@zappo> <19980719082019.63071@welearn.com.au> <19980718175516.A18192@zappo> <19980719111914.25963@welearn.com.au> <19980719072000.B20184@zappo>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 19, 1998 at 07:20:00AM -0400, Tim Vanderhoek wrote:
> On Sun, Jul 19, 1998 at 11:19:14AM +1000, Sue Blake wrote:
> > On Sat, Jul 18, 1998 at 05:55:17PM -0400, Tim Vanderhoek wrote:
> > > On Sun, Jul 19, 1998 at 08:20:19AM +1000, Sue Blake wrote:
> > > 
> > > To add the dependencies.  Instead of using pkg_*'s normal dependency
> > > handling, you would just call pkg_add from within the iscript to add
> > > the "dependencies".
> > 
> > Why? Ah, do you mean to go pkg_add /cdrom/whatever/package.tgz?
> > Hmmm... risky...
> 
> Why?  This would let you first check that the cdrom is even mounted.
> 
> 
> > What about the other way round... maybe... if you mounted the CD and
> > worked from /packages/All/ and went pkg_add /path/package.tgz then
> > would it be able to pick up all of its dependencies? I mean, perhaps
> 
> Wouldn't this increase the total number of commands the user must
> enter?

Yes and no. It would be much easier to identify the reason for failure.
But without having knowledge of the places pkg_add looks for
dependencies we don't know if pkg_add would work this way. Does it look
in the current directory, for example?

> > pkg_add looks in the current working directory for them, in which case
> > this wouldn't be toooo terribly hard to organise. At least we'd know for
> > sure that the cdrom was mounted! :-)
> 
> "Hmm...  I can't get the cd mounted.  I'm just going to skip to the
> next command and see what happens, now."
> 
> If pkg_add(1) fails to find a dependency, it only prints a soft error
> message.

True, but that's not what its default behaviour is supposed to be.
Without 'pkg_add -f' it's supposed to give up without installing. The
behaviour I've observed is the opposite of what it's supposed to do,
ie, pkg_add completes the whole installation and just comments on what
was missing. In my case that's convenient, but it means either
something's wrong, or it's behaving inconsistently.

> Working from either a depends or install script, you can do
> pretty much whatever your want.  :)

Sure. Then a package gives you all the benefits of a plain installation
script with the added advantage of... umm... the advantage of...


> So far as where pkg_add(1) looks for dependency packages....that can
> always be changed if needed (although not for 2.2.7-RELEASE, obviously).

The person creating the package has no way to change it, and the person
installing has no way to predict its default behaviour. In fact, nobody
seems to be real sure where it looks. I'm sure I can hear pkg_add
tossing a coin :-)

> Hmm...  Maybe it should have a "look for dependencies here"
> logical^H^H^H^H^H^H^Henv. variable.  Maybe it does and its not
> documented...  :)

Well PKG_PATH is documented. But if the user has to go to that much
trouble they might as well be using a port. The ease of use of packages
is defeated.

> Hmm...  Browsing the source, I'm not sure if jkh actually intended a
> failed dependency to be a soft error, or not...  :)

My current vote says it's not intended to be soft, but it is, and I
like it that way. It tells me a package is installed (and can't be
installed again) when half of it is missing. I can live with that.
I just want to know I can trust it to be consistent.


It seems to me that for inexperienced FreeBSD users:
A package which has no dependencies is always easy and convenient to use.
A package which has dependencies is too difficult and unpredictable unless
it's on the CD with the others.

For experienced FreeBSD users a port is always preferable, or even a
plain script. They can make any adjustments they want.

In a couple of weeks there will be (hopefully many) people creating
packages with dependencies for the xcontest, and they will have to deal
with the same issues (or misconceptions?) that I'm raising now. It'd be
nice to have answers ready for them too.


-- 

Regards,
        -*Sue*-


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980720011454.23919>