oshazard / apacman

ArchLinux User Repository (AUR) helper and pacman wrapper
https://aur.archlinux.org/packages/apacman/
GNU General Public License v3.0
70 stars 11 forks source link

doesn't install checkdepends if needed #4

Closed senorsmile closed 9 years ago

senorsmile commented 9 years ago

e.g. perl-expect has: checkdepends=('perl-test-exception>=0.32') in its PKGBUILD.

makepkg fails without those being installed. Not sure where the best place to insert this logic would be. If I get time before the project owner fixes this, I'll put together something and submit a PR.

oshazard commented 9 years ago

I think it's a somewhat new PKGBUILD variable, I haven't come across it before. It's unclear what its purpose is. Seems to be somewhere between depends=() and optdepends=()

oshazard commented 9 years ago

Reading man PKGBUILD Seems to imply that packages in checkdepends=() are build deps but that running makepkg --nocheck ignores these deps.

Based on this, it is my understanding that this should be handled by passing a new flag --skipcheck and without its presence add the contents of checkdepends to the list of packages to be installed.

senorsmile commented 9 years ago

According to the wiki, https://wiki.archlinux.org/index.php/PKGBUILD#checkdepends :

An array of packages this package depends on to run its test suite but are not needed at runtime. Packages in this list follow the same format as depends. These dependencies are only considered when the check() function is present and is to be run by makepkg.

I tested that package on a fresh vm with yaourt just to see what it would do, and it did just install the checkdepends.

Since a package that has checkdepends will more than likely have a check() function for its preinstallation tasks, it would probably be safe to either:

  1. just install it
  2. or install it if it's not already installed and then remove it

What do apacman do for builddepends? I assume it should do the same action for checkdepends.

oshazard commented 9 years ago

@senorsmile Fixed! Thank you for the bug reports, please let me know if you find any other inconsistencies.

Version 1.2 changelog:

oshazard commented 9 years ago

Oh, one thing I should point out: