xbps: add patch from git master to fix strange buildbot errors.
This commit is contained in:
parent
c80cbb91b5
commit
6941404e4f
2 changed files with 59 additions and 1 deletions
|
@ -0,0 +1,58 @@
|
|||
From 16e18313da1b8e85141fbaf8f376305aa48d5330 Mon Sep 17 00:00:00 2001
|
||||
From: Juan RP <xtraeme@gmail.com>
|
||||
Date: Wed, 28 Nov 2012 17:35:03 +0100
|
||||
Subject: [PATCH] xbps_transaction: return proper errors if pkg is missing from
|
||||
repos.
|
||||
|
||||
---
|
||||
lib/transaction_ops.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c
|
||||
index 64d378a..109a070 100644
|
||||
--- lib/transaction_ops.c
|
||||
+++ lib/transaction_ops.c
|
||||
@@ -78,14 +78,14 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool bypattern,
|
||||
pkg_repod = xbps_rpool_find_pkg_exact(xhp, pkg);
|
||||
if (pkg_repod == NULL) {
|
||||
/* not found */
|
||||
- return errno;
|
||||
+ return ENOENT;
|
||||
}
|
||||
} else {
|
||||
if (((pkg_repod = xbps_rpool_find_pkg(xhp, pkg, bypattern, best)) == NULL) &&
|
||||
((pkg_repod = xbps_rpool_find_virtualpkg_conf(xhp, pkg, bypattern)) == NULL) &&
|
||||
((pkg_repod = xbps_rpool_find_virtualpkg(xhp, pkg, bypattern)) == NULL)) {
|
||||
/* not found */
|
||||
- return errno;
|
||||
+ return ENOENT;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -96,7 +96,7 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool bypattern,
|
||||
pkg_repod = xbps_rpool_find_pkg(xhp, pkg, false, true);
|
||||
if (pkg_repod == NULL) {
|
||||
/* not found */
|
||||
- return errno;
|
||||
+ return ENOENT;
|
||||
}
|
||||
}
|
||||
prop_dictionary_get_cstring_nocopy(pkg_repod, "pkgname", &pkgname);
|
||||
@@ -181,12 +181,12 @@ trans_find_pkg(struct xbps_handle *xhp, const char *pkg, bool bypattern,
|
||||
* the "unsorted" array in transaction dictionary.
|
||||
*/
|
||||
if (!prop_array_add(unsorted, pkg_repod))
|
||||
- return errno;
|
||||
+ return EINVAL;
|
||||
|
||||
xbps_dbg_printf(xhp, "%s-%s: added into the transaction (%s).\n",
|
||||
pkgname, repover, repoloc);
|
||||
|
||||
- return rv;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int
|
||||
--
|
||||
1.8.0.1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.18.1
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=configure
|
||||
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
|
||||
--with-tests --with-static"
|
||||
|
|
Loading…
Reference in a new issue