mock 2.0: excluded packages as best candidates

Issues related to applications and software problems and general support
Post Reply
sml
Posts: 305
Joined: 2020/01/17 09:01:44

mock 2.0: excluded packages as best candidates

Post by sml » 2020/02/11 18:39:14

First, a little back story. Once upon a time, I had this problem trying to rebuild with mock packages that BuildRequire perl-generators. I worked this around by adding the following stanza to my ~/.config/mock.cfg

Code: Select all

config_opts['yum.conf'] += """
[main]
best=0
"""
Later I found out that there's a fix to libsolv for it. So I rebuilt libsolv-0.7.10-1 from Fedora, put it into my local repo, sudo createrepo, added the repo to mock.cfg, commented out the code above, and instead added this:

Code: Select all

config_opts['yum.conf'] += """
[local]
name=local
enabled=1
baseurl=file:///srv/rpms/
includepkgs=libsolv*
gpgcheck=0
"""
That worked until today.

Today, I upgraded to mock-2.0-2 and mock-core-configs-32.1-1 from epel-testing. It required one adjustment to my mock.conf to work: s/yum.conf/dnf.conf/g

And then the old problem with uninstallable perl-generators appeared once again. I rebuilt the newest libsolv-0.7.11-2 from Fedora Rawhide and put it into my local repo, but to no avail. For now, I've reverted to the old trick with best=0.

Does anybody know, what has changed in mock and/or mock-core-configs that dnf in mock again tries to install excluded packages seeing them as best candidates (even with the newest libsolv)?

Namely, it tries to install perl-generators from the module perl and fails.

Code: Select all

$ dnf -d0 list perl-generators
perl-generators.noarch                1.10-9.el8                    @AppStream
$ dnf module info perl | grep perl-generators
                : perl-generators-0:1.10-10.module_el8.1.0+229+cd132df8.noarch
                : perl-generators-0:1.10-10.module_el8.1.0+229+cd132df8.src
Update. The difference seems to be that mock uses bootstrap chroot by default now. libsolv from the local repo gets installed into that bootstrap chroot.

Post Reply