pkg icon indicating copy to clipboard operation
pkg copied to clipboard

pkg-install ignores missing packages by default

Open michael-o opened this issue 4 years ago • 1 comments

Using:

# pkg --version
1.16.3

I have a custom port/package with:

...
RUN_DEPENDS=   kinit:security/krb5 nsupdate:dns/bind-tools
...

This package has now been built poudriere and the repo served does *not contain the run dependencies. Now I install the package:

Updating ldadw-custom repository catalogue...
ldadw-custom repository is up to date.
All repositories are up to date.
pkg: register-hostnames has a missing dependency: bind-tools
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        register-hostnames: 20210622

Number of packages to be installed: 1

Proceed with this action? [y/N]: y
[...] [1/1] Installing register-hostnames-20210622...

It warns about the missing deps, but lets me continue. This is confusing because I would expect that pkg would fail the installation and require me either to provide are repo with the dependencies OR pass

 -M, --ignore-missing
  Force the installation of the package with missing dependen-
  cies.

michael-o avatar Jun 28 '21 18:06 michael-o

A quick glance at src/install.c shows code similar to the thing I found in #2002. The fix is likely similar, and this also appears to be affecting several other possible failures in pkg-install as well.

cgull avatar Nov 05 '21 21:11 cgull