On Tue, Oct 18, 2016 at 07:58:00AM +0200, Patrik Lundin wrote:
> On Tue, Oct 18, 2016 at 06:30:41AM +0200, Jasper Lievisse Adriaanse wrote:
> >
> > I was hoping that 2.2.0.0 would be released soon, but it seems upstream 
> > enjoys
> > many a rc over a lengthy period of time. So perhaps syncing the openbsd_pkg
> > provider with master would be the way to go.
> > 
> 
> This would be my personal preference. This also means the local addition
> of -z comes into question as the upstream changes replace "pkg_info -e"
> with "pkg_info -Iq" for looking up package state, which does not handle
> name lookups in the same way.
> 
> I believe landry@ should be involved in this decision because from what I
> recall he is one of the people who wanted the addition (and might be depending
> on it).

For full history:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/ansible/patches/Attic/patch-library_packaging_openbsd_pkg
=========
Use -z when invoking pkg_add in openbsd_pkg module, so that one can use
for example php-fpm-5.4* and ensure the correct version is installed.
Previously, one had to specify the exact version, or ansible would fail
since there were alternatives.
=========
And the discussion with upstream in the maze of github tickets:
https://github.com/ansible/ansible/issues/8990
https://github.com/ansible/ansible-modules-extras/issues/97

So the original idea was more or less to use -z to 'fake' branch
support when it wasnt existing.

As for pkg_info -e vs pkg_info -Iq, i dont know what was the intent of
the change nor if it was good or not, but here -Iq finds an installed
package by giving only its name (but not if you pass the version without
patchlevel):

$pkg_info -Iq ansible
ansible-2.1.1.0p2
$pkg_info -e ansible
Invalid spec: ansible
$pkg_info -e ansible-2.1.1.0
inst:ansible-2.1.1.0p2
$pkg_info -Dunsigned -Iq ansible-2.1.1.0
Error from 
http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/ansible-2.1.1.0.tgz
ftp: Error retrieving file: 404 Not Found
$pkg_info -Iq ansible-2.1.1.0p2
ansible-2.1.1.0p2

The only 'advantage' of -e here is that it finds it if you pass the full
version without the patchlevel.

Landry

Reply via email to