Skip to content
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.

Version predicates don't work inside depends array #1

Closed
Viech opened this issue Mar 7, 2014 · 5 comments
Closed

Version predicates don't work inside depends array #1

Viech opened this issue Mar 7, 2014 · 5 comments
Assignees
Labels

Comments

@Viech
Copy link

Viech commented Mar 7, 2014

I'm the maintainer of the unvanquished and unvanquished-data AUR packages. There is a strict dependency of unvanquished on the version of unvanquished-data: If unvanquished-data is outdated, the program installed by unvanquished won't work properly. I want to model this kind of dependency using the ">=VERSION" predicate inside the "depends" array of the unvanquished PKGBUILD.

While yaourt invocations such »yaourt -S unvanquished-data=0.24.1« or »yaourt -S "unvanquished-data>=0.24.1"« both work as expected by installing the unvanquished-data package only if it fulfils the predicate, adding either predicate to the "depends" array of the unvanquished PKGBUILD would result in yaourt not being able to locate the dependency in the AUR. Example output for the ">=" predicate:

% LANG=C yaourt -S unvanquished

==> Downloading unvanquished PKGBUILD from AUR...
x unvanquished.install
x PKGBUILD
x ChangeLog

[AUR user comments]

unvanquished 0.24.1-1 (Tue Jul 24 15:59:31 CEST 2012)
( Unsupported package: Potentially dangerous ! )
==> Edit PKGBUILD ? [Y/n] ("A" to abort)
==> ------------------------------------
==> n

==> unvanquished dependencies:
- zlib (already installed)

[more already installed dependencies]

- cmake (already installed)
- unvanquished-data>=0.24.1 (building from AUR)


==> Edit unvanquished.install ? [Y/n] ("A" to abort)
==> ------------------------------------------------
==> n

==> Continue building unvanquished ? [Y/n]
==> --------------------------------------
==>
==> Building and installing package
==> Install or build missing dependencies for unvanquished:
==> Making package: unvanquished 0.24.1-1 (Thu Feb 13 23:21:18 CET 2014)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: unvanquished-data>=0.24.1
==> ERROR: 'pacman' failed to install missing dependencies.
==> ERROR: Makepkg was unable to build unvanquished.
==> Restart building unvanquished ? [y/N]
==> -------------------------------------
==>

It appears that yaourt uses a different method to look for a dependency as it would use when you specified the same dependency (including the same predicate) on the command line. This results in yaourt falsly not locating the dependency in the AUR and handing it over to pacman, which fails, since it's not inside the official repositories.

The version of yaourt used is archlinuxfr/yaourt 1.3-1.

@tuxce
Copy link
Member

tuxce commented Mar 8, 2014

I can't reproduce it, maybe unvanquished 0.25 had been modified.

You can have a log by executing :

LANG=C bash -x yaourt -S  unvanquished |& tee yaourt.log

Post yaourt.log

@Viech
Copy link
Author

Viech commented Mar 9, 2014

Here is yaourt.log produced by the given command.

Note that the following packages were installed before issuing the command:

local/unvanquished 0.24.1-1
local/unvanquished-data 0.24.1-1

If I uninstall both packages, yaourt successfully locates unvanquished-data in the AUR, so apparently the problem only occurs during upgrades.

@Viech
Copy link
Author

Viech commented Mar 11, 2014

If you want to reproduce, apart from skipping checksums you only need to change the versions from 0.25.0 to 0.24.1. Upgrading (or downgrading) unvanquished-data shouldn't require a complete redownload since the download is initialized with existing data from the system.

@tuxce tuxce self-assigned this Mar 18, 2014
@tuxce
Copy link
Member

tuxce commented Mar 18, 2014

Try this commit, I think it solves this issue : 9be559a

@Viech
Copy link
Author

Viech commented Mar 18, 2014

Yes, this solves the issue. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants