Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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 freswa (frederik) - Friday, 21 February 2020, 21:37 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 5
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

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

Loading...