FS#64265 - [devtools] makechrootpkg -I a package with multiple-choice dependencies leads to an endless loop

Attached to Project: Arch Linux
Opened by Chih-Hsuan Yen (yan12125) - Friday, 25 October 2019, 16:14 GMT
Last edited by Kristian (klausenbusk) - Saturday, 03 June 2023, 18:07 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 9
Private No

Details

Description:
In `makechrootpkg -I foo.pkg.tar.xz`, if foo depends on something that can be provided by multiple packages (e.g., ttf-font), then the whole stuff ends up in a endless loop:

Enter a number (default=1): error: invalid number: y

Enter a number (default=1): error: invalid number: y

...

Additional info:
extra/devtools 20191016-1

The relevant commit is https://git.archlinux.org/devtools.git/commit/?id=b7893a2ca8e09062197129881bce3fd6700a573a

Steps to reproduce:

Create two PKGBUILDs:

# foo/PKGBUILD
pkgname=foo
pkgver=0.1
pkgrel=1
arch=(any)
depends=(ttf-font)

package() {
true
}

# bar/PKGBUILD
pkgname=bar
pkgver=0.1
pkgrel=1
arch=(any)
depends=(foo)

package() {
true
}

Then build foo and bar:
$ pushd foo && extra-x86_64-build && popd
$ pushd bar && extra-x86_64-build -- -I ../foo/foo-0.1-1-any.pkg.tar.xz

A real-life reproducer is the python-pytorch-lightning at [archlinuxcn] (https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/python-pytorch-lightning), which is built with:

archlinuxcn-x86_64-build -- -I ../python-av/python-av-6.2.0-2-x86_64.pkg.tar.xz -I ../python-torchvision/python-torchvision-0.4.0-4-x86_64.pkg.tar.xz

The first package, python-av, depends on ffmpeg, which depends on libjpeg indirectly, and there is another package mozjpeg in [archlinuxcn] that also provides libjpeg.
This task depends upon

Closed by  Kristian (klausenbusk)
Saturday, 03 June 2023, 18:07 GMT
Reason for closing:  Upstream
Additional comments about closing:  Please report upstream if this is still relevant: https://gitlab.archlinux.org/archlinux/d evtools.
Comment by Chih-Hsuan Yen (yan12125) - Friday, 25 October 2019, 16:15 GMT
Oops wrong title. Should be

[devtools] makechrootpkg -I a package with multiple-choice dependencies leads to an endless loop
Comment by Chih-Hsuan Yen (yan12125) - Sunday, 08 May 2022, 09:20 GMT
git.archlinux.org is decommissioned. Here is the new link for the relevant commit: https://gitlab.archlinux.org/archlinux/devtools/-/commit/b7893a2ca8e09062197129881bce3fd6700a573a
Comment by George Rawlinson (rawlinsong) - Sunday, 08 May 2022, 09:34 GMT
Ran into this today, was tearing my hair out until yan12125 linked this to me. I've had to workaround this by reverting that particular commit.

Watching with great interest.

Loading...