pkg regression 1.6.1 to 1.6.2: custom package dependencies missing after install

Baptiste Daroussin bapt at FreeBSD.org
Sun Dec 6 09:52:12 UTC 2015


On Sat, Dec 05, 2015 at 07:24:39PM -0800, Nick Rogers wrote:
> 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!

As replied on the github issue, the MANIFEST definition is wrong, at least not
doing that is expected:
is means depending on for example bash-* (not a glob really the "*" character.
pkg accepted the installation in pkg 1.6.1 due to a bug in the solver fixed in
1.6.2.

The proper way to do what is expected is to just drop the version: "*" lines.

How ever pkg should not die in pkg check, I will work on a fix for that.

Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20151206/567da2c6/attachment.sig>


More information about the freebsd-ports mailing list