keenerd / packer

Bash wrapper for pacman and AUR.
247 stars 48 forks source link

checkdepends are not installed, leading to makepkg failure #144

Open anntzer opened 8 years ago

anntzer commented 8 years ago

Example:

$ packer -S python-joblib

with python-coverage not installed.

==> Making package: python-joblib 0.9.4-1 (Mon Feb 22 07:58:10 PST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
  -> python-coverage
==> ERROR: Could not resolve all dependencies.
The build failed.
MG2R commented 7 years ago

Running into the same issues. It used to just work

MG2R commented 7 years ago

Looking into this further...

@anntzer it seems your specific issue is that packer only uses the "depends" and "makedepends" variables from the PKGBUILD to determine what it should install. AFAIK, the package maintainer should alter the PKGBUILD to ensure the checkdeps are only required if you actually try to check the sourcecode using -g in makepkg. A comment on the AUR page also seems to reflect this.

EDIT: thinking about it more, looking at your error message, it seems that python-coverage is required to build the software. If this is indeed the case, the package maintainer should put python-coverage in the makedepends array.

My issue is with the sickgear package, where the maintainer has put the "depends" variable in the package() function. packer simply sources the PKGBUILD files and then uses variables in its env to filter the dependencies. This creates an issue for PKGBUILDs like sickgear's, as the package() function isn't actually execute, so the "depends" variable isn't sourced into the environment.

@keenerd not quite sure how to best solve this. I get the maintainers putting the depends array inside the package function. People not actually wishing to package shouldn't have to care about dependencies until the package() function is actually called. The AUR also seems to support this (unless dependency information is entered manually). Are these issues you're willing to catch in the code, or do you think package maintainers should put their depends variables in the top scope of their PKGBUILDs?

MG2R commented 7 years ago

OK ignore everything I just spouted out above. Your issue is indeed that checkdepends simply isn't read (as check() always runs during packer builds). I'll create a pull request which should fix that.

My issue is separate. I'll create a separate ticket to track that.