You are not logged in.

#1 2021-03-18 14:24:34

daniel_shub
Member
Registered: 2012-06-21
Posts: 64

Should checkdepends also be listed in makedepends?

Someone was having trouble building python-scikit-image (https://aur.archlinux.org/packages/python-scikit-image/). I can trace the problem back to python-setuptools being needed to build the package but only being indirectly pulled in via a package in the checkdepends array (python-pytest-cov). This means, I think, that makepkg fails with the --nocheck option.

I wanted to tell the maintainer something helpful beyond just it doesn't work. The PKGBUILD guidelines (https://wiki.archlinux.org/index.php/PKGBUILD) don't mention what to do in this case nor does namcap seem to help find the issue.

Should the PKGBUILD list python-setuptools as a makedepends or is having it pulled in by the checkdepends enough?

Offline

#2 2021-03-18 15:56:58

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,114

Re: Should checkdepends also be listed in makedepends?

from https://aur.archlinux.org/cgit/aur.git/ … ikit-image

build() {
    cd ${srcdir}/${_pyname}-${pkgver}

    python setup.py build_ext --inplace
    python setup.py build
}

https://wiki.archlinux.org/index.php/Py … on_methods

Looks to me like either python-distlib or python-setuptools should be in makedepends.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-03-18 18:04:02

daniel_shub
Member
Registered: 2012-06-21
Posts: 64

Re: Should checkdepends also be listed in makedepends?

Yes, but python-setuptools is pulled in via a dependency in checkdepends.

Offline

#4 2021-03-18 18:17:03

metak
Member
Registered: 2009-09-27
Posts: 197

Re: Should checkdepends also be listed in makedepends?

daniel_shub wrote:

Yes, but python-setuptools is pulled in via a dependency in checkdepends.

I believe checkdepends should be treated separately from depends and makedepends (because you can skip check stage and build package) and in this case I agree with @Lone_Wolf, `python-setuptools` should be in makedepends.

Offline

#5 2021-03-19 04:53:15

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 4,042

Re: Should checkdepends also be listed in makedepends?

daniel_shub wrote:

Yes, but python-setuptools is pulled in via a dependency in checkdepends.

The PKGBUILD specification is clear on this. It's wrong.

makedepends must include *ALL* the dependencies needed for building the package. checkdepends must include anything needed to *additionally* run the check() function -- which can be disabled, because it is reasonable to do so.

In this case,
"These dependencies are only considered when the check() function is present and is to be run by makepkg."

Supported use case == package can only be considered technically correct if it works in this configuration.

...

Often, people neglect to *notice* that they are missing makedepends, and it's understandable and forgivable since mistakes happen... but it isn't *right* to do so. It's a bug. Please, if you notice packages in the official repos doing so, report a bug at https://bugs.archlinux.org (but search for an existing bug first, because Arch Linux ARM reports many such bugs already and we gratefully receive them and fix them).

If you notice packages in the AUR doing so, please report them in the comments, and... if the maintainer ignores you, feel free to tell them that a pacman developer clarified your interpretation of the guidelines by specifying that it is indeed a mandatory requirement of makepkg, and therefore is more strict than a mere packaging policy.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2021-03-19 14:53:47

daniel_shub
Member
Registered: 2012-06-21
Posts: 64

Re: Should checkdepends also be listed in makedepends?

eschwartz wrote:
daniel_shub wrote:

Yes, but python-setuptools is pulled in via a dependency in checkdepends.

The PKGBUILD specification is clear on this. It's wrong.

makedepends must include *ALL* the dependencies needed for building the package. checkdepends must include anything needed to *additionally* run the check() function -- which can be disabled, because it is reasonable to do so.

Thank you for the clarification. I think the wiki (https://wiki.archlinux.org/index.php/PKGBUILD) probably needs some clarification,but this is probably not the place for it. I will post something in the wiki discussion channel.

Offline

Board footer

Powered by FluxBB