Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 2015 19:24:39 -0800
From:      Nick Rogers <ncrogers@gmail.com>
To:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   pkg regression 1.6.1 to 1.6.2: custom package dependencies missing after install
Message-ID:  <CAKOb=YY4ePB3Ko9n-mcpW%2Bp_89ZJLT8601=e%2BeYmFNzuD3%2BJsQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

I have an interesting problem since upgrading to the latest pkg version. I
am running FreeBSD 10.1-RELEASE-p24.

I use "pkg create" to create a custom package (lets call it "mypkg") to
distribute some proprietary software. In the custom package's manifest, I
specify dependencies that the software relies on. These dependencies are
all "real" ports in the FreeBSD ports tree. I use poudriere to host a
custom repository that contains all the necessary dependencies. When I
bring up a new system, to install the software I run "pkg install mypkg",
and that automatically installs all the necessary dependency packages. The
custom repo is configured in /usr/local/etc/pkg/repos, and the default
"FreeBSD" repo is disabled.

This has worked great for some time until I upgraded to pkg 1.6.2
(previously was using 1.6.1). Now when I install my package for the first
time, pkg seems to ignore some of the dependencies and does not install
some packages (about 14 out of over 200).

The MANIFEST of the custom package used in pkg create looks something like
this:
Generating +MANIFEST
name: mypkg
origin: myorigin/mypkg
version: "1.23"
comment: mypkg
prefix: /mypkg
arch: freebsd:10:*
deps: {
   "bonnie++": {
      origin: "benchmarks/bonnie++"
      version: "*"
   },
   "iperf": {
      origin: "benchmarks/iperf"
      version: "*"
   },
   "mgetty": {
      origin: "comms/mgetty+sendfax"
      version: "*"
   },
   "bash": {
      origin: "shells/bash"
      version: "*"
   },
.... more dependencies ....


There are no errors when I do the initial pkg install mypkg. It does not
complain about missing dependencies. Most of the dependencies are
installed, and a few are left out.

When I run "pkg check -d" after the initial "pkg install mypkg", pkg
clearly recognizes that some packages are missing, but then it crashes with
an abort trap. Here you can see which packages are ignored and the error.

Checking all packages: 100%
mypkg has a missing dependency: iperf
mypkg has a missing dependency: bash
mypkg has a missing dependency: gmake
mypkg has a missing dependency: rubygem-daemons
mypkg has a missing dependency: mrtg
mypkg has a missing dependency: python
mypkg has a missing dependency: dmidecode
mypkg has a missing dependency: bwm-ng
mypkg has a missing dependency: freeradius3
mypkg has a missing dependency: flex
mypkg has a missing dependency: p5-Devel-Size
mypkg has a missing dependency: tclGetOpts

>>> Missing package dependencies were detected.
>>> Found 13 issue(s) in the package database.

Assertion failed: (pattern != NULL), function pkg_jobs_maybe_match_file,
file pkg_jobs.c, line 188.
Child process pid=29412 terminated abnormally: Abort trap

If I try the same "pkg install mypkg" with pkg 1.6.1, against the exact
same custom package file and the same poudriere repo, all packages are
installed as expected and "pkg check -d" returns a success. So it seems
that the problem lies in some change in the behavior of pkg between 1.6.1
and 1.6.2, and not my custom package or the repo. Note that the custom
package is created with pkg 1.6.2 as well.

I am inclined to think the problem has something to do with the way I am
specifying dependencies in my custom packages MANIFEST. My gut tells me it
has something to do with the following commit/change to pkg between 1.6.2
and 1.6.1, but I am unfamiliar with the code.
https://github.com/freebsd/pkg/commit/7e5152d942cba492142c7a226974913b9d38af21

The list of packages that are left-out is the same every time, but I do not
notice any correlation between them as far as how they are named or what
not, but there must be some similarity.

Hoping someone can shed some light on what is going on.

I have opened a similar issue on github in case this is the wrong forum for
such weirdness.
https://github.com/freebsd/pkg/issues/1356

Thanks!

-Nick



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKOb=YY4ePB3Ko9n-mcpW%2Bp_89ZJLT8601=e%2BeYmFNzuD3%2BJsQ>