You are not logged in.

#1 2020-10-10 05:30:13

smilerish
Member
Registered: 2019-04-05
Posts: 2

makepkg not recognising installed package as dependency

I've been installing a few AUR packages, mostly fixing problems as I find them but this one has me stumped!

I'm attempting to install beets-alternatives from AUR. It depends on beets>=1.4.7 (from the PKGBUILD):

pkgname=beets-alternatives
pkgver=0.10.1
    [...]
depends=('python' 'beets>=1.4.7')

beets-git, which provides beets, is already installed from AUR:

$ pacman -Qi beets
Name            : beets-git
Version         : 1.4.9.r869.g52ca0cbf-1
    [...]
Provides        : beets
    [...]
Conflicts With  : beets

But makepkg doesn't recognise beets-git as satisfying this dependency:

$ makepkg
==> Making package: beets-alternatives 0.10.1-1 (Fri Oct  9 20:30:21 2020)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> beets>=1.4.7
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.
$ makepkg -s
==> Making package: beets-alternatives 0.10.1-1 (Fri Oct  9 20:23:22 2020)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...
:: beets and beets-git are in conflict. Remove beets-git? [y/N]
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: beets and beets-git are in conflict

I thought that because beets-git 'provides' beets, it should satisfy the dependency for beets-alternatives.

Does that not apply when specifying a package version? If that's true, then how can this dependency/conflict be resolved?

Offline

#2 2020-10-10 06:16:59

loqs
Member
Registered: 2014-03-06
Posts: 11,916

Re: makepkg not recognising installed package as dependency

https://wiki.archlinux.org/index.php/PKGBUILD#provides
Try modifying the PKGBUILD for beets-git as below:

diff --git a/PKGBUILD b/PKGBUILD
index 1bca261..a527f43 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -41,7 +41,7 @@ optdepends=('python-requests: absubmit, fetchart, embyupdate, kodiupdate, lyrics
             'aacgain: replaygain plugin'
             'audiotools: replaygain plugin'
             'go-ipfs: ipfs plugin')
-provides=('beets')
+provides=("beets=$pkgver")
 conflicts=('beets')
 source=('git+https://github.com/beetbox/beets.git')
 md5sums=('SKIP')

Last edited by loqs (2020-10-10 06:17:17)

Online

#3 2020-10-10 06:17:30

progandy
Member
Registered: 2012-05-17
Posts: 3,903

Re: makepkg not recognising installed package as dependency

There is an explicit version number in the beets dependency of beets-alternatives. That means, a package other than beets will only qualify as a dependency if the provides entry has a version number as well that is equal or larger to the specified one.

https://wiki.archlinux.org/index.php/PKGBUILD#provides

Edit: too slow...

Last edited by progandy (2020-10-10 06:18:41)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2020-10-10 06:21:48

smilerish
Member
Registered: 2019-04-05
Posts: 2

Re: makepkg not recognising installed package as dependency

Thanks both - I just found that note in the wiki. I'll try this and report to the package maintainer if it works.

Edit:

Amending the beets-git PKGBUILD as suggested by loqs worked perfectly.  I'll let the beets-git maintainer know.

Thanks again!

Last edited by smilerish (2020-10-10 06:40:51)

Offline

Board footer

Powered by FluxBB