Subject: pkg/5625: pkg_add installs packages despite missing dependencies
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/19/1998 19:42:22
>Number:         5625
>Category:       pkg
>Synopsis:       pkg_add will install a package despite missing dependencies
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 19 19:50:01 1998
>Originator:     Jeremy Cooper
>Release:        NetBSD-1.3.2
System: NetBSD mobeius 1.3.2 NetBSD 1.3.2 (MOBEIUS_SCSI3) #0: Tue May 26 18:22:54 PDT 1998 jeremy@mobeius:/usr/src/sys/arch/sparc/compile/MOBEIUS_SCSI3 sparc


The pkg_add utility, and the data format of the packages it installs, allows a
package to specify that it is dependent on one or more packages being
installed before it.  However, pkg_add fails to stop installation of a package
if a dependent package is missing, even though such behavior is counter to
what is stated in the pkg_add documentation.  It is also annoying because the
user must uninstall the package and reinstall it again, after the required
packages have been added, if he or she wishes the package dependency database
to be kept in order.

The man page for pkg_add states that the command line argument -f can be used
to force a package to install even if it detects that any packages required by
that package have not been installed.  This implies that in the absence of the
-f argument, pkg_add will not install a package that has missing dependencies.


Either the -f argument should be struck from the program and documentation, or
pkg_add should scan the package database for dependencies BEFORE installing
a package and prevent its installation if any of its dependencies are missing,
rather than installing the package first and then complaining that certain
dependencies could not be registered.