actionless / pikaur

AUR helper with minimal dependencies. Review PKGBUILDs all in once, next build them all without user interaction.
GNU General Public License v3.0
868 stars 87 forks source link

Providers not taken into account in deps solver #4

Closed rmarquis closed 6 years ago

rmarquis commented 6 years ago

I have cower-git installed, which provides cower. When installing a package that requires cower, the dependency solver fails.

In addition to package names, you'll need to check providers here.

$ pikaur -S pacaur-git
resolving dependencies...
Reading repository package databases...
Reading local package database...

New packages will be installed from AUR:
    pacaur-git

:: Proceed with installation? [Y/n] y
Do you want to edit PKGBUILD for pacaur-git package? [Y/n]
error: target not found: cower
Can't build 'pacaur-git'.
Failed to build following packages:
pacaur-git
actionless commented 6 years ago

i fixed that particular problem yesterday already, but build for pacaur-git still not succeeds. so for me it now looks like that: https://paste.ee/p/C4iib

actionless commented 6 years ago

i did more changes, now pacaur-git is building successfully

thanks for reporting, feel free to reopen if it still errors

rmarquis commented 6 years ago

I'm afraid the issue is still present in version 0.3+17+gbb6f0d5-1:

$ pikaur -S pacaur-git
resolving dependencies...
Reading repository package databases...
Reading local package database...

New packages will be installed from AUR:
    pacaur-git

:: Proceed with installation? [Y/n] y
Do you want to edit PKGBUILD for pacaur-git package? [Y/n] n
:: Installing repository dependencies for pacaur-git:
error: target not found: cower
Can't build 'pacaur-git'.
Failed to build following packages:
pacaur-git
$ pacman -Qs cower
local/cower-git 17.5.g59ecf02-1
    A simple AUR agent with a pretentious name
actionless commented 6 years ago

fixed that as well, please try again

rmarquis commented 6 years ago

Better, but still problematic (version: 0.3+18+g43b80c4-1):

$ pikaur -S pacaur-git
resolving dependencies...
Reading repository package databases...
Reading local package database...

New packages will be installed from AUR:
    pacaur-git

:: Proceed with installation? [Y/n] y
Do you want to edit PKGBUILD for pacaur-git package? [Y/n] n
==> Making package: pacaur-git 4.7.10-1 (Thu  8 Feb 15:45:55 CET 2018)
...
==> Finished making: pacaur-git 4.7.10.47.ga0f232d-1 (Thu  8 Feb 15:45:58 CET 2018)
Traceback (most recent call last):
  File "/tmp/makepkg/pikaur-git/src/pikaur-git/pikaur.py", line 18, in <module>
  File "/tmp/makepkg/pikaur-git/src/pikaur-git/pikaur/main.py", line 503, in main
  File "/tmp/makepkg/pikaur-git/src/pikaur-git/pikaur/main.py", line 225, in cli_install_packages
  File "/tmp/makepkg/pikaur-git/src/pikaur-git/pikaur/build.py", line 303, in build
IndexError: list index out of range
actionless commented 6 years ago

what is the full filename of the built package?

rmarquis commented 6 years ago

Not on my linux machine right now, but if that helps:

actionless commented 6 years ago

thanks, i'll try to address that tonight, shouldn't be too tricky

actionless commented 6 years ago

i've implemented the planned, hope now it should work finally

rmarquis commented 6 years ago

No, another error (0.3+24+g7e8575e-1):

$ pikaur -S pacaur-git
resolving dependencies...
Reading repository package databases...
Reading local package database...

New packages will be installed from AUR:
    pacaur-git

:: Proceed with installation? [Y/n] y
Traceback (most recent call last):
  File "/tmp/makepkg/pikaur-git/src/pikaur-git/pikaur.py", line 18, in <module>
    main()
  File "/tmp/makepkg/pikaur-git/src/pikaur-git/pikaur/main.py", line 503, in main
    cli_install_packages(args)
  File "/tmp/makepkg/pikaur-git/src/pikaur-git/pikaur/main.py", line 149, in cli_install_packages
    conflict_result = check_conflicts(repo_packages_names, aur_packages_names)
  File "/tmp/makepkg/pikaur-git/src/pikaur-git/pikaur/meta_package.py", line 214, in check_conflicts
    for installed_pkg_name, provides in local_provided.items():
AttributeError: 'list' object has no attribute 'items'
actionless commented 6 years ago

i did few more fixes :-)

rmarquis commented 6 years ago

Yep, this time it is fixed!

A quick note since you're relaying on makepkg --packagelist: You can't really rely on simply adding PKGEXT since this can be and is sometimes overriden. There is however a patch in queue for pacman 5.1 (not in master branch yet) that should provide a robuster way to handle file path for pacman -U.

actionless commented 6 years ago

i've also added more code to handle such cases, what do you think about it? https://github.com/actionless/pikaur/blob/master/pikaur/build.py#L327-L336

rmarquis commented 6 years ago

You mean to handle the architecture? I don't really have an opinion on this, since only 64bit is officially supported on Arch now.