Subject: Re: pkgsrc installing binary packages
To: Jeremy C. Reed <reed@reedmedia.net>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-pkg
Date: 05/03/2001 12:38:10
On Wed, 2 May 2001, Jeremy C. Reed wrote:
>  rainier:/usr/pkgsrc/games/pacman$ make
>  ===> Validating dependencies for Pacman-0.3
>  => Checksum OK for Pacman-0.3-CVS-00-11-17.tar.gz.
>  ===> Extracting for Pacman-0.3
>  ===> Required package ClanLib>=0.2.2: NOT found
>  ===> Verifying bin-install for ../../graphics/clanlib
>  Installing from binary pkg /usr/pkg/pkgsrc/packages/All/ClanLib-0.4.4.tgz
>  pkg_add: pkg `MesaLib-3.4' required, but `MesaLib-3.2.1' found installed.
>  pkg_add: Please resolve this conflict!
>  *** Error code 1

This ias nothing to do with pkgsrc, please read the error message
closely: the ClanLib pkg requires MesaLib 3.4, but you have MesaLib 3.2.1
installed. Tough luck. (Maybe ClanLib should depend on some wildcard of
MesaLib>=something(. 


> Now trying your patch... it wouldn't work because PKG_PATH not set for
> ftp and it found the first package locally. I want it to be smart -- use
> local if it is available, fall back to a remote copy, then as a last
> resort build from source.

Uh, i tried setting PKG_PATH manually, and it *did* the expected thing
(complain that PKG_PATH is set). so why does it go and find the pkg
locally when you call "make bin-install"? For the rest: local->ftp->build
is the expected order here. 


>  ===> Verifying bin-install for ../../graphics/clanlib
> 
>  ftp: The `CWD ' command (without a directory), which is required by
>       RFC 1738 to support the empty directory in the URL pathname (`//'),
>       conflicts with the server's conformance to RFC 959.
>       Try the same URL without the `//' in the URL pathname.
> 
>  pkg_add: prompt failed - wrong dir?
> 
> Okay, logging shows:
> ftp -detv ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5/i386/All//usr/pkg/pkgsrc/packages/All/
> 
> Now I see:
> PKGFILE?=               ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
> 
> So I changed your PKGFILE to ${PKGNAME}${PKG_SUFX} and that was fixed.

Um, in what place did you have to fix that - line numbers/context please.
It'd be nice to know what pkg_add gets called with as environment. Please
put an "echo" in front of that line in the bin-install patch, and let me
know. The above error suggests that you get a double '//' in a place in
PKG_PATH where it shouldn't be. This does not happen for me...


> Now to try another package, because ...
>  pkg_add: pkg `MesaLib-3.4' required, but `MesaLib-3.2.1' found installed.
>  pkg_add: Please resolve this conflict!
> (Aaaagggh! A bunch of installed packages depend on MesaLib.)
> 
> Also, so I tried sharity-light. A binary package was not available.
> And it did not fall back to use source:
> 
>  rainier:/usr/pkgsrc/net/sharity-light$ make bin-install 2>&1 | tee LOG
>  release: 1.5 arch: i386
>  ftp -detv ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5/i386/All/
> 
>  ftp> prompt off
>  trying PKG_PATH ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5/i386/All
>  Spawning FTP coprocess
> 
>  ftp> nlist sharity-light-1.2.tgz /var/tmp/pkg.17062a
>  pkg_add: nlist failed!
> 
>  ftp> nlist sharity-light-1.2-*.t[bg]z /var/tmp/pkg.17062b
>  Reusing FDs 4/5 for communication to FTP coprocess
>  pkg_add: nlist failed!
>  pkg_add: can't find package 'sharity-light-1.2.tgz'
> 
>  ftp> close
>  pkg_add: 1 package addition(s) failed
>  *** Error code 1
> 
> Thanks for the patch. It does help.

Eh, not so cynical, please. We're all low on quality time. Appent a "||
${TRUE}" at then end of the "$SETENV ... $PKG_ADD" line (but before the
";"), and give it another try. 


 - Hubert

-- 
Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>