xbps: merge patch from git to make xbps-uhelper version match vpkgs.

This commit is contained in:
Juan RP 2013-03-25 21:14:04 +01:00
parent ef8e6a5bc8
commit 1bcabefb3a
2 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,28 @@
From e25216822bc51b5ff1a87cbe980d1a96843a3a93 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Mon, 25 Mar 2013 21:11:30 +0100
Subject: [PATCH] xbps-uhelper: make the 'version' target also match virtual
pkgs.
---
bin/xbps-uhelper/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/xbps-uhelper/main.c b/bin/xbps-uhelper/main.c
index f1eb111..25acd45 100644
--- bin/xbps-uhelper/main.c
+++ bin/xbps-uhelper/main.c
@@ -155,8 +155,8 @@ main(int argc, char **argv)
if (argc != 2)
usage();
- dict = xbps_pkgdb_get_pkg(&xh, argv[1]);
- if (dict == NULL)
+ if ((((dict = xbps_pkgdb_get_pkg(&xh, argv[1])) == NULL)) &&
+ (((dict = xbps_pkgdb_get_virtualpkg(&xh, argv[1])) == NULL)))
exit(EXIT_FAILURE);
prop_dictionary_get_cstring_nocopy(dict, "pkgver", &version);
--
1.8.2

View file

@ -1,7 +1,7 @@
# Template file for 'xbps'
pkgname=xbps
version=0.22
revision=1
revision=2
build_style=configure
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
--enable-static --enable-debug --enable-tests"