Subject: pkg/32285: Installation of shells/standalone-tcsh is messed up
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Hauke Fath <hf@spg.tu-darmstadt.de>
List: pkgsrc-bugs
Date: 12/12/2005 10:20:00
>Number:         32285
>Category:       pkg
>Synopsis:       pkgsrc installation of shells/standalone-tcsh is messed up
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 12 10:20:00 +0000 2005
>Originator:     Hauke Fath <hf@spg.tu-darmstadt.de>
>Release:        NetBSD 3.0_RC3
>Organization:
-- 
/~\  The ASCII Ribbon Campaign                    Hauke Fath
\ /    No HTML/RTF in email	        Institut für Nachrichtentechnik
 X     No Word docs in email	                  TU Darmstadt
/ \  Respect for open standards              Ruf +49-6151-16-3281
>Environment:
	
	
System: NetBSD Heiligenberg 3.0_RC3 NetBSD 3.0_RC3 (SPG_PIII) #1: Fri Dec 2 14:52:48 CET 2005 hf@Heiligenberg:/var/obj/netbsd-builds/3_0/i386/sys/arch/i386/compile/SPG_PIII i386
Architecture: i386
Machine: i386
>Description:

	I tried to update standalone-tcsh from 6.13 to 6.14 and got a
	bunch of strange, contradicting messages indicating that there
	is something seriously wrong within the pkgsrc install process.

	First the naive approach, a 'make update' - shouldn't be too
	much of a problem since this is a leave package, right? 
	Well...

[hf@Heiligenberg] /<3>shells/standalone-tcsh > su root -c /bin/ksh
Password:
# make update
===> Checking for vulnerabilities in standalone-tcsh-6.14.00nb1
===> Installing for standalone-tcsh-6.14.00nb1
===> standalone-tcsh-6.13.00 is already installed - perhaps an older version?
*** If so, you may use either of:
***  - "pkg_delete standalone-tcsh-6.13.00" and "/usr/bin/make reinstall" to upgrade properly
***  - "/usr/bin/make update" to rebuild the package and all of its dependencies
***  - "/usr/bin/make replace" to replace only the package without re-linking
***    dependencies, risking various problems.
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
#


	I'd have expected 'make update' to be capable of updating
	foo-3.44 to foo-3.55, but maybe that's just me... Second try,
	do what pkgsrc tells me to:


# pkg_delete standalone-tcsh-6.13.00 && /usr/bin/make reinstall
===> Updating /etc/shells
===> Checking for vulnerabilities in standalone-tcsh-6.14.00nb1
===> Installing for standalone-tcsh-6.14.00nb1
/usr/bin/install -c -s -o root -g wheel -m 555 tcsh /bin/tcsh
/usr/bin/install -c -o root -g wheel -m 444 tcsh.man /usr/share/man/man1/tcsh.1
Installing message catalogues
===========================================================================
Adding shells from standalone-tcsh-6.14.00nb1 to /etc/shells:

        /bin/tcsh

===========================================================================
===> Registering installation for standalone-tcsh-6.14.00nb1
pkg_create: can't open pkgdb: No such file or directory
pkg_info: can't find package `standalone-tcsh-6.14.00nb1'
pkg_info: can't find package `standalone-tcsh-6.14.00nb1'
===> Checking for work-directory references in standalone-tcsh-6.14.00nb1
pkg_info: can't find package `standalone-tcsh-6.14.00nb1'
#


	So, we installed standalone-tcsh but then failed to register
	it with the pkg database. Cool. Maybe if we tried again?


[hf@Heiligenberg] /<3>shells/standalone-tcsh # pkg_delete standalone-tcsh-6.13.00 && /usr/bin/make reinstall
pkg_delete: package 'standalone-tcsh-6.13.00' not installed
[hf@Heiligenberg] /<3>shells/standalone-tcsh #


	Yeah, right. You said so.


[hf@Heiligenberg] /<3>shells/standalone-tcsh # /usr/bin/make reinstall
===> Checking for vulnerabilities in standalone-tcsh-6.14.00nb1
===> Installing for standalone-tcsh-6.14.00nb1
===> standalone-tcsh-6.14.00nb1 is already installed - perhaps an older version?
*** If so, you may use either of:
***  - "pkg_delete standalone-tcsh-6.14.00nb1" and "/usr/bin/make reinstall" to upgrade properly
***  - "/usr/bin/make update" to rebuild the package and all of its dependencies
***  - "/usr/bin/make replace" to replace only the package without re-linking
***    dependencies, risking various problems.
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
[hf@Heiligenberg] /<3>shells/standalone-tcsh #


	"Not installed"? "Already installed"? 
	Another one?


[hf@Heiligenberg] /<3>shells/standalone-tcsh # pkg_delete standalone-tcsh-6.14.00nb1 && /usr/bin/make reinstall
pkg_delete: package 'standalone-tcsh-6.14.00nb1' doesn't have a prefix
[hf@Heiligenberg] /<3>shells/standalone-tcsh #


	There is nothing like a good, descriptive error message.
	Another try, yet another different error:


[hf@Heiligenberg] /<3>shells/standalone-tcsh # make replace
===> Checking for vulnerabilities in standalone-tcsh-6.14.00nb1
===> Replacing standalone-tcsh-6.14.00nb1
*** WARNING - experimental target - data loss may occur ***
Creating binary package: standalone-tcsh-6.14.00nb1
Creating package /usr/src/pkgsrc/shells/standalone-tcsh/work/standalone-tcsh-6.14.00nb1.tgz
Registering depends:.
Registering conflicts:.
tar: Invalid file name argument
usage: tar [-]{crtux}[-befhjlmopqvwzHOPSXZ014578] [archive] [blocksize]
           [-C directory] [-T file] [-s replstr] [file ...]
pkg_create: /bin/tar command failed with code 1
===> Deinstalling for standalone-tcsh
Running /usr/bin/env /usr/sbin/pkg_delete -K /var/db/pkg standalone-tcsh-6.14.00nb1
pkg_delete: package 'standalone-tcsh-6.14.00nb1' doesn't have a prefix
===> Checking for vulnerabilities in standalone-tcsh-6.14.00nb1
===> Installing for standalone-tcsh-6.14.00nb1
===> standalone-tcsh-6.14.00nb1 is already installed - perhaps an older version?
*** If so, you may use either of:
***  - "pkg_delete standalone-tcsh-6.14.00nb1" and "/usr/bin/make reinstall" to upgrade properly
***  - "/usr/bin/make update" to rebuild the package and all of its dependencies
***  - "/usr/bin/make replace" to replace only the package without re-linking
***    dependencies, risking various problems.
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/shells/standalone-tcsh
[hf@Heiligenberg] /<3>shells/standalone-tcsh #


	==>> Like in the "pkgtools/pkg_install" case, the pkgsrc
	install process is inconsistent and far from robust here.


>How-To-Repeat:

	Attempt to update shells/standalone-tcsh package.

>Fix:
	Yes, please.

>Unformatted: