Bug 20827

Summary: pkg_add -r only fetchs one-level deep dependencies
Product: Base System Reporter: david <david>
Component: binAssignee: bill fumerola <billf>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   

Description david 2000-08-25 02:10:01 UTC
Given a functional package server and pkg_add -r, dependencies of
dependencies of a given package are not fetched, and thus the install
fails.

Fix: 

Pass the remote flag to child pkg_add's?  I have a feeling that this
might cause problems with duplicate dependencies, not sure.
How-To-Repeat: # setenv PACKAGE_SITE http://www.example.com/packages/All/
# pkg_add -r evolution-0.4.1
Fetching http://localhost/packages/All/evolution-0.4.1.tgz... Done.
Fetching http://localhost/packages/All/bonobo-0.18.tgz... Done.
pkg_add: could not find package gdk-pixbuf-0.8.0 !
pkg_add: could not find package gnomecontrolcenter-1.2.1 !
pkg_add: could not find package gnomeprint-0.20 !
pkg_add: pkg_add of dependency `bonobo-0.18' failed!
Fetching http://localhost/packages/All/gconf-0.8.tgz... Done.
pkg_add: could not find package gdk-pixbuf-0.8.0 !
pkg_add: could not find package gnomecontrolcenter-1.2.1 !
...

and so on.  All of these dependent packages _do_ exist on the server.
Comment 1 bill fumerola freebsd_committer freebsd_triage 2000-08-25 02:11:17 UTC
Responsible Changed
From-To: freebsd-bugs->billf

If it's possible to "own" an option to a program, I guess I "own" pkg_add -r.
Comment 2 danp 2000-08-25 04:57:51 UTC
try:

setenv PACKAGE_SITE http://www.example.com/packages/All/
setenv PKG_ADD_BASE http://www.example.com/packages/All/
pkg_add -r evolution-0.4.1

-dan

-- 
Dan Peterson / danp@danp.net / 415-505-4855
Comment 3 david 2000-08-25 06:46:05 UTC
Hmm.  Thanks!  This seems to work, but it still seems like a bug to me for
you to have to override that..  otherwise what's the point of the PACKAGESITE
(note: no '_') env var?  Also, when you set both and run, it quietly installs
the dependent dependencies without saying anything.. not what you'd want.

--David Bushong


On Thu, Aug 24, 2000 at 08:57:51PM -0700, Dan Peterson wrote:
> try:
> 
> setenv PACKAGE_SITE http://www.example.com/packages/All/
> setenv PKG_ADD_BASE http://www.example.com/packages/All/
> pkg_add -r evolution-0.4.1
> 
> -dan
> 
> -- 
> Dan Peterson / danp@danp.net / 415-505-4855
> 
>
Comment 4 danp 2000-08-25 17:26:19 UTC
yes, it is rather odd. i just happened about PKG_ADD_BASE while i was
browsing the source (usr.sbin/pkg_install/add/perform.c). when pkg_add (and
its slaves) installs a package, having PKG_ADD_BASE set in the environment
will force it to see the full file path as a URL (i.e.,
$PKG_ADD_BASE/evolution-0.4.1.tgz) and fetch it accordingly regardless of
what's actually in PKG_ADD_BASE. i don't know if this is some kind of
internal thing, but perhaps it should be documented. :)

-dan

--
Dan Peterson / danp@danp.net / 415-505-4855


----- Original Message -----
From: "David Bushong" <david@bushong.net>
To: "Dan Peterson" <danp@danp.net>
Cc: <freebsd-gnats-submit@FreeBSD.org>
Sent: Thursday, August 24, 2000 10:46 PM
Subject: Re: bin/20827: pkg_add -r only fetchs one-level deep dependencies


> Hmm.  Thanks!  This seems to work, but it still seems like a bug to me for
> you to have to override that..  otherwise what's the point of the
PACKAGESITE
> (note: no '_') env var?  Also, when you set both and run, it quietly
installs
> the dependent dependencies without saying anything.. not what you'd want.
>
> --David Bushong
Comment 5 Maxim Sobolev freebsd_committer freebsd_triage 2001-10-11 12:33:05 UTC
State Changed
From-To: open->closed

I've resolved the problem some time ago by forcing pkg_create sort dependencies 
in such a way that they are added in right order. Thank you for reporting!