Subject: pkg/13397: pkg_info does unecessary FTP operations
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 07/06/2001 13:52:03
>Number:         13397
>Category:       pkg
>Synopsis:       pkg_info does unecessary FTP operations
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 06 10:50:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        2001/06/24
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:

System: NetBSD 1.5W

>Description:

	pkg_info does strange and apparently unecessary things when
	PKG_PATH is set, especially if it's set to an FTP URL

	I wouldn't expect pkg_info to ever look at PKG_PATH unless it is
	explicitly asked about a package that is not installed!

	NOTE: this may also indicate problems with postgresql packaging!

>How-To-Repeat:

09:46 [164] # unset PKG_PATH
09:47 [165] # pkg_info
ssh2-2.4.0          Secure Shell client and server w/support for V.2 SSH protocol
links-0.95          Lynx-like text WWW browser
squid-2.4.1         Post-Harvest_cached WWW proxy cache and accelerator
xpkgwedge-1.5       allows X11 pkgs to be built and used outside of /usr/X11R6
rsync-2.4.6         Network file distribution/synchronisation utility
emacs-20.7          GNU editing macros (editor)
jove-4.16           small emacs-style editor, but lacks the LISP engine
perl-base-5.6.1     base installation of Perl
p5-CGI-2.75.2       perl5 module for writing forms-based CGI programs
perl-mk-1.1         Note installed perl version for bsd.pkg.mk speedup
perl-5.6.1          Practical Extraction and Report Language
unzip-5.42          List, test and extract compressed files in a ZIP archive
python-2.0.1        Interpreted, interactive, object-oriented programming language
postgresql-lib-7.1.2 PostgreSQL database headers and libraries
postgresql-client-7.1.2 PostgreSQL database client programs
postgresql-docs-7.1.2 PostgreSQL database system documentation
postgresql-server-7.1.2 PostgreSQL database server programs
postgresql-7.1.2    Robust, next generation, object-relational DBMS
09:47 [166] # export PKG_PATH=ftp://ftp.weird.com/pub/NetBSD/NetBSD-1.5W-20010624-PLANIX/i386/packages/All 
09:48 [167] # pkg_info                                                                                     
ssh2-2.4.0          Secure Shell client and server w/support for V.2 SSH protocol
links-0.95          Lynx-like text WWW browser
squid-2.4.1         Post-Harvest_cached WWW proxy cache and accelerator
xpkgwedge-1.5       allows X11 pkgs to be built and used outside of /usr/X11R6
rsync-2.4.6         Network file distribution/synchronisation utility
emacs-20.7          GNU editing macros (editor)
jove-4.16           small emacs-style editor, but lacks the LISP engine
perl-base-5.6.1     base installation of Perl
p5-CGI-2.75.2       perl5 module for writing forms-based CGI programs
perl-mk-1.1         Note installed perl version for bsd.pkg.mk speedup
perl-5.6.1          Practical Extraction and Report Language
unzip-5.42          List, test and extract compressed files in a ZIP archive
python-2.0.1        Interpreted, interactive, object-oriented programming language
postgresql-lib-7.1.2 PostgreSQL database headers and libraries
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: show_file: can't open '+COMMENT' for reading
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: show_file: can't open '+COMMENT' for reading
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: show_file: can't open '+COMMENT' for reading
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: show_file: can't open '+COMMENT' for reading
postgresql-client-7.1.2 postgresql-docs-7.1.2 postgresql-server-7.1.2 postgresql-7.1.2    ftp: 09:48 [168] # No control connection for command.

	pkg_info -v -a shows in part:

trying PKG_PATH ftp://ftp.weird.com/pub/NetBSD/NetBSD-1.5W-20010624-PLANIX/i386/packages/All
Reusing FDs 5/6 for communication to FTP coprocess

ftp> nlist postgresql-client-7.1.2.t*.t[bg]z /var/tmp/pkg.03432c
pkg_info: nlist failed!
Reusing FDs 5/6 for communication to FTP coprocess
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: unable to open +CONTENTS file
trying PKG_PATH ftp://ftp.weird.com/pub/NetBSD/NetBSD-1.5W-20010624-PLANIX/i386/packages/All
Reusing FDs 5/6 for communication to FTP coprocess
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
Reusing FDs 5/6 for communication to FTP coprocess
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: unable to open +CONTENTS file
trying PKG_PATH ftp://ftp.weird.com/pub/NetBSD/NetBSD-1.5W-20010624-PLANIX/i386/packages/All
Reusing FDs 5/6 for communication to FTP coprocess
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
Reusing FDs 5/6 for communication to FTP coprocess
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: unable to open +CONTENTS file
trying PKG_PATH ftp://ftp.weird.com/pub/NetBSD/NetBSD-1.5W-20010624-PLANIX/i386/packages/All
Reusing FDs 5/6 for communication to FTP coprocess
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
Reusing FDs 5/6 for communication to FTP coprocess
pkg_info: Cannot generate temp file for ftp(1)'s nlist output
pkg_info: unable to open +CONTENTS file

ftp> close
pkg_info: short write: Bad file descriptor
ftp: No control connection for command.


>Fix:

	unknown

>Release-Note:
>Audit-Trail:
>Unformatted: