Subject: [alpine-devel] Huh? Error reporter did not find the broken constraints.

From: Natanael Copa <[email-masked]>
Date: Sun, 31 Dec 2017 15:00:48 +0100

Hi,

after I upgraded apk to 2.9.0 on my work desktop I get the following error:

ncopa-desktop:~$ sudo apk upgrade -U -a
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  Huh? Error reporter did not find the broken constraints.

I have tried to delete some of the --virtual package I had installed but it didn't solve anything.

I idea how to troubleshoot this?

I have attached my /etc/apk/world

-nc

---

From: William Pitcock <[email-masked]>
Date: Sun, 31 Dec 2017 10:23:54 -0600

Hello,

>   Huh? Error reporter did not find the broken constraints.

Can you rebuild apk-tools with -DDEBUG_PRINT in the CFLAGS?
Then redo the transaction and send the output to this list.  Thanks!

A copy of the installed DB would also be helpful here.

It is indeed probably due to a --virtual with unsatisfiable
constraints; you still have 4, so maybe you could keep removing them.

William

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: "Tmp File" <[email-masked]>
Date: Sun, 31 Dec 2017 18:35:32 +0100

You can use this script to find out what's the package that gives the error.

#!/bin/sh
for i in $(cat /etc/apk/world)
do
        printf "%s: " "$i" >> file 2>&1
        sudo apk add $i --no-progress >> file 2>&1
done
grep "ERROR" file

This error was noticed before by postmarketOS.
https://github.com/postmarketOS/pmbootstrap/issues/952
They didn't find solutions yet.

> Sent: Sunday, December 31, 2017 at 12:00 PM
> From: "Natanael Copa" <[email-masked]>
> To: "Alpine Development" <[email-masked]>
> Subject: [alpine-devel] Huh? Error reporter did not find the broken constraints.
>
> Hi,
> 

---

---

From: Oliver Smith <[email-masked]>
Date: Tue, 02 Jan 2018 01:19:00 +0000

Sorry for not reporting it yet.

In our case the bug was triggered by a "dbus-nox11" package we created - probably because it ended up providing the same "so:..." dependency as the official "dbus" package. It worked fine, and at some point (maybe after an apk upgrade?) the package didn't work anymore - after we removed it, it worked again.

If it helps with debugging/fixing this issue, I could try to reproduce the way the bug affected us, and provide apk's installed DB.

Thanks,
Oliver

---

---

From: William Pitcock <[email-masked]>
Date: Mon, 1 Jan 2018 20:26:44 -0600

Hello,

> If it helps with debugging/fixing this issue, I could try to reproduce the way the bug affected us, and provide apk's installed DB.

I think I can create a reproducer.  I will do it after I finish cooking dinner.

William

---

---

From: William Pitcock <[email-masked]>
Date: Mon, 1 Jan 2018 22:49:07 -0600

Hello,

> I think I can create a reproducer.  I will do it after I finish cooking dinner.

Unfortunately based on this data, I was unable to create a testcase.

Adding two packages resulted in an unsatisfiable constraints problem,
but it explained what the problem was (that it wanted the user to
choose a provider).
I did add those testcases to apk-tools git if you would like to look at them...

Could somebody reproduce the failure with apk-tools git compiled with
debug printing enabled?

Thanks in advance!

William

---

---

From: Natanael Copa <[email-masked]>
Date: Tue, 2 Jan 2018 10:55:40 +0100

On Mon, 1 Jan 2018 22:49:07 -0600

> Could somebody reproduce the failure with apk-tools git compiled with

I have attached output from debug print.

Thanks!

-nc

---

From: Natanael Copa <[email-masked]>
Date: Tue, 2 Jan 2018 11:23:40 +0100

On Tue, 2 Jan 2018 10:55:40 +0100

> I have attached output from debug print.

The problem is nvme-cli.

ERROR PKG: nvme-cli: conflict: same name provided

It seems that it comes from a local repository /home/ncopa/packages/testing where I have an older version of nvme-cli:

$ tar -O -zxf /home/ncopa/packages/testing/x86_64/APKINDEX.tar.gz APKINDEX | grep -w -A 15  P:nvme-cli
P:nvme-cli
V:1.1-r0
A:x86_64
S:68384
I:192512
T:NVM-Express user space tooling for Linux
U:https://github.com/linux-nvme/nvme-cli
L:GPL
o:nvme-cli
m:Florian Heigl <[email-masked]>
t:1482791353
c:3f5fcf3c09c78baca6ac5bde33ca8210aab75251
D:so:libc.musl-x86_64.so.1
p:nvme-cli

C:Q135cWo/MbmAnhinSUHunVd/nBCcM=
--
...

So it looks like I have a package named nvme-cli in community repo and
an old version of nvme-cli in my local testing repo, which has a
provides=nvme-cli for some reason.

Some things that fixes my machine:
- apk del nvme-cli
- commenting out /home/ncopa/packages/testing in /etc/apk/repositories

---

---

From: Oliver Smith <[email-masked]>
Date: Tue, 02 Jan 2018 15:30:00 +0000

Looks like the trigger for the issue is: provides="$pkgname".
This was also in the "dbus-nox11" case and was earlier reported here:

https://bugs.alpinelinux.org/issues/7586

Thanks,
Oliver

---

---

From: Natanael Copa <[email-masked]>
Date: Tue, 2 Jan 2018 16:39:23 +0100

On Tue, 02 Jan 2018 15:30:00 +0000

> https://bugs.alpinelinux.org/issues/7586

heh... indeed.

Should be fixed upstream now
https://git.alpinelinux.org/cgit/apk-tools/commit/?id=667cb6bca799e58f58f22ad868761c022c6600dc

I also added a check to abuild so we can catch it earlier in the future:
https://git.alpinelinux.org/cgit/abuild/commit/?id=e970c74b0e3117c2172cbda45985c9e592c72fcc

Thanks!

-nc

---