Subject: bin/10925: pkg_add isn't very good at error checking sometimes.....
To: None <firstname.lastname@example.org>
From: None <email@example.com>
Date: 08/31/2000 11:00:35
>Synopsis: pkg_add isn't very good at error checking.....
>Arrival-Date: Thu Aug 31 11:01:01 PDT 2000
>Originator: Greg A. Woods
Planix, Inc.; Toronto, Ontario; Canada
System: NetBSD q 1.5B i386
It would seem that some parts of the pkg tools are less robust
than others. Failure to fully fetch a remote package in
"pkg_add" will cause the partial copy to be partly installed
despite the fact that error messages clearly indicated that
the code detected the problem.
try adding a package from a remote server that'll time out
after sending a bit of the file (or force the ftp to fail):
# pkg_add ftp://q/pub/NetBSD/packages/1.5B/i386/All/emacs-20.7.tgz
pkg_add: expect: select() timeout
pkg_add: Cannot fetch file (-1!=226)!
Error on unpackURL('ftp://q/pub/NetBSD/packages/1.5B/i386/All/emacs-20.7.tgz', '/var/tmp/instmp.27373a')
pkg_add: unable to fetch `ftp://q/pub/NetBSD/packages/1.5B/i386/All/emacs-20.7.tgz' by URL
tar: cannot chown file share/emacs/20.7/etc/FAQ to uid 0 gid 0 : No such file or directory
tar: couldn't change access and modification times of share/emacs/20.7/etc/FAQ : No such file or directory
tar: cannot change mode of file share/emacs/20.7/etc/FAQ to 0444 : No such file or directory
tar: Could not create file share/emacs/20.7/etc/FTP : No such file or directory
tar: Could not create file share/emacs/20.7/etc/GNU : No such file or directory
^?Signal 2 received, cleaning up.
pkg_add: can't chdir back to '/var/tmp/instmp.27373a'
ksh: exit code: 2
# ftp: No control connection for command.
note that the server does show the file was not fully
Aug 31 13:35:34 q ftpd: get /pub/NetBSD/packages/1.5B/i386/All/emacs-20.7.tgz = 3457024 bytes in 749.366 seconds
$ ls -l emacs*
-rw-r--r-- 1 root wheel 11736724 Aug 29 16:53 emacs-20.7.tgz