Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jul 1998 11:46:55 -0400
From:      Tim Vanderhoek <ac199@hwcn.org>
To:        Sue Blake <sue@welearn.com.au>
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: questions about packages
Message-ID:  <19980719114655.A20943@zappo>
In-Reply-To: <19980720011454.23919@welearn.com.au>; from Sue Blake on Mon, Jul 20, 1998 at 01:14:54AM %2B1000
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> <19980720011454.23919@welearn.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 20, 1998 at 01:14:54AM +1000, Sue Blake wrote:
> 
> 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?

Hmm...  Sorry if the pseudo-code in the last message scared you...
To be fair, it's almost basically written in English and doesn't really
require any programming familiarity to understand it, though. :(

Yes, it checks the current directory, if the original package
specified was a filename itself, and if the env.variable PKG_ADD_BASE
is not defined.  However, I'd want to test the code to see if it
actually works for recursive dependencies before using it for such.

And, of course, same CAVEAT about not trusting this unquestioningly...


> 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,

There is the following (fatal || Force) errmessage,

if (vsystem("pkg_add %s%s", Verbose ? "-v " : "", cp)) {
	warnx("autoload of dependency `%s' failed%s",
	cp, Force ? " (proceeding anyway)" : "!");

but it only gets executed if the dependency package is found but is
corrupted.

Whether this was intended or not, only jkh knows.  :)


> > 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...

I really think that if you want a package, then you should be going
about this by using an install or requirements script for the package.
That allows you to test for any possible error condition you can
dream-up, and then handle the condition in the most graceful way that
a newbie could want.


> > 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

Well, I did try to tell you where it looks...  :)


[Re: dependency-failed-error]
> 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

It probably should be fatal unless -f is specified, IMO...


> 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.

Yup.  That's why I'm still suggesting an install or requirements
script.  :)  Or even just a plain script, for that matter.  Do you
have any familiarity with dialog(1)?  Can have a lot of fun with a
"plain script"...  ;)


> 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.

Well, those packages are allowed to assume reasonable competency and
reasonable setup on the behalf of the user, which really solves the
whole problem...  :)


-- 
This .sig is not innovative, witty, or profund.

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?19980719114655.A20943>