Unable to resolve package errors when building mix bundles

Hi fellow developers,

I am getting acquainted with mixer tools to be able to create new bundle with my own custom package and I have hit an unexpected roadblock. On my test system the mixer seems to be unable to resolve some upstream packages while building bundles.

Steps to reproduce:

  1. create new mixer workspace using mkdir testmix; cd testmix; mixer init
  2. run mixer build bundles which gives following output:
Generating certificate for signature validation...
Building bundles...
=> BUILD BUNDLES
Adding bundle "syslinux" from upstream bundles
Adding bundle "libstdcpp" from upstream bundles
Bundle "os-core" already in mix; skipping
Adding bundle "os-core-plus" from upstream bundles
Adding bundle "os-core-webproxy" from upstream bundles
Adding bundle "hardware-uefi" from upstream bundles
Bundle "bootloader" already in mix; skipping
Adding bundle "linux-firmware" from upstream bundles
Adding bundle "linux-firmware-extras" from upstream bundles
Adding bundle "qemu-guest-additions" from upstream bundles
Adding bundle "findutils" from upstream bundles
Bundle "os-core" already in mix; skipping
Adding bundle "libglib" from upstream bundles
Bundle "bootloader" already in mix; skipping
Bundle "linux-firmware" already in mix; skipping
Bundle "linux-firmware-extras" already in mix; skipping
Bundle "libglib" already in mix; skipping
Bundle "os-core" already in mix; skipping
Bundle "libglib" already in mix; skipping
Adding bundle "p11-kit" from upstream bundles
Creating bundles for version 10 based on Clear Linux 32010
Preparing new /home/mx/src/clrlnx/workspace/testmix/update/image/10
  and dnf config: /home/mx/src/clrlnx/workspace/testmix/.yum-mix.conf
Packager command-line: dnf --config=/home/mx/src/clrlnx/workspace/testmix/.yum-mix.conf -y --releasever=32010
Resolving packages using 8 workers
processing kernel-native
processing findutils
processing qemu-guest-additions
processing p11-kit
processing os-core-webproxy
processing libstdcpp
processing hardware-uefi
processing os-core-plus
kernel-native: unable to resolve package
libstdcpp: unable to resolve package
hardware-uefi: unable to resolve package
p11-kit: unable to resolve package
findutils: unable to resolve package
os-core-plus: unable to resolve package
os-core-webproxy: unable to resolve package
qemu-guest-additions: unable to resolve package

TIMINGS
  BUILD BUNDLES 0s
TOTAL: 0s
2020/01/03 20:38:09 ERROR: Error building bundles: os-core-webproxy: unable to resolve package

Interestingly mixer’s behavior is different when the command is run on an untouched freshly created mixer workspace (as in the test case above) and when in it is run on a workspace with a custom bundle and package and all upstream packages in the mix. In both cases it prints the “unable to resolve package” errors but in the first case it reaches the end and exist whereas in the second case it gets stuck seemingly doing nothing and never reaches the code reporting “TIMINGS” and never exits.

Looking to mixer’s sources it looks like the error originates here so it seems like mixer is not getting expected output from dnf. Unfortunately I found no simple way to get to the output of dnf commands issued by mixer so as a Clear Linux development newbie I thought before I start setting up go language environment to be able to build and debug mixer myself I’ll go and try to ask more experienced people here. Maybe there is some easy answer?

Have you opened any issue on mixer’s GitHub repository?

The error here is misleading, but it looks like Mixer fails to resolve the packages because it needs sudo. Try adding sudo to the mixer build bundles command:

sudo mixer build bundles

1 Like

Thank you, running the command as root solved the problem. I did not expect that because in the documentation there is no mention about mixer needing root rights and the examples there do not use sudo to build bundles so I though mixer is expected to work perfectly under normal user.

Does it mean that the mixer tool should always be run as root? Or how does one tell when should it be run as root and when not?

@doct0rHu

in the end I decided to write here first before creating issue on GitHub because I had a feeling that it will be some triviality like it turned out to be and I did not want to pollute GitHub issues with such questions.

1 Like

The mixer build commands need root. I can look into updating this in the documentation.

1 Like