From afb7c341bcc6298744e3f99784b26e1c8b313083 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 26 Nov 2012 10:27:24 +0100 Subject: [PATCH] xbps: add 2 patches from git master. --- ...2870f0ed00755afbb16d251aca0de5fb378e.patch | 44 +++++++++++++++++++ ...f7f1b4bc4f30d6641504e81bb038a0b14a86.patch | 25 +++++++++++ srcpkgs/xbps/template | 5 ++- 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/xbps/patches/25612870f0ed00755afbb16d251aca0de5fb378e.patch create mode 100644 srcpkgs/xbps/patches/b7b6f7f1b4bc4f30d6641504e81bb038a0b14a86.patch diff --git a/srcpkgs/xbps/patches/25612870f0ed00755afbb16d251aca0de5fb378e.patch b/srcpkgs/xbps/patches/25612870f0ed00755afbb16d251aca0de5fb378e.patch new file mode 100644 index 00000000000..acbfd3da34f --- /dev/null +++ b/srcpkgs/xbps/patches/25612870f0ed00755afbb16d251aca0de5fb378e.patch @@ -0,0 +1,44 @@ +From 25612870f0ed00755afbb16d251aca0de5fb378e Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Mon, 26 Nov 2012 10:22:09 +0100 +Subject: [PATCH] xbps-query: when checking revdeps from repos use the same + pkgver from repo pkg. + +This fixes showing revdeps for any pkg that uses dependencies like: + + foo>2.0<3.0 + blah<15 +--- + bin/xbps-query/show-deps.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/bin/xbps-query/show-deps.c b/bin/xbps-query/show-deps.c +index f6f755f..2f39eae 100644 +--- bin/xbps-query/show-deps.c ++++ bin/xbps-query/show-deps.c +@@ -127,12 +127,17 @@ repo_revdeps_cb(struct xbps_handle *xhp, + int + repo_show_pkg_revdeps(struct xbps_handle *xhp, const char *pkg) + { +- char *pattern; ++ prop_dictionary_t pkgd; ++ const char *pkgver; + + if (xbps_pkg_version(pkg)) +- pattern = strdup(pkg); +- else +- pattern = xbps_xasprintf("%s-9999999", pkg); ++ pkgver = pkg; ++ else { ++ pkgd = xbps_rpool_find_pkg(xhp, pkg, false, false); ++ if (pkgd == NULL) ++ return ENOENT; ++ prop_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver); ++ } + +- return xbps_rpool_foreach(xhp, repo_revdeps_cb, pattern); ++ return xbps_rpool_foreach(xhp, repo_revdeps_cb, __UNCONST(pkgver)); + } +-- +1.8.0 + diff --git a/srcpkgs/xbps/patches/b7b6f7f1b4bc4f30d6641504e81bb038a0b14a86.patch b/srcpkgs/xbps/patches/b7b6f7f1b4bc4f30d6641504e81bb038a0b14a86.patch new file mode 100644 index 00000000000..c132210b5a8 --- /dev/null +++ b/srcpkgs/xbps/patches/b7b6f7f1b4bc4f30d6641504e81bb038a0b14a86.patch @@ -0,0 +1,25 @@ +From b7b6f7f1b4bc4f30d6641504e81bb038a0b14a86 Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Sun, 25 Nov 2012 11:03:03 +0100 +Subject: [PATCH] xbps-create: use the right var in chdir(2) doh. + +--- + bin/xbps-create/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c +index df302eb..53b9ad5 100644 +--- bin/xbps-create/main.c ++++ bin/xbps-create/main.c +@@ -710,7 +710,7 @@ main(int argc, char **argv) + process_destdir(mutable_files); + + /* Back to original cwd after file tree walk processing */ +- if (chdir(cwd) == -1) ++ if (chdir(p) == -1) + die("cannot chdir() to cwd %s:", cwd); + + /* +-- +1.8.0 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index 8beceb5d29c..0700d6f81c0 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,9 +1,10 @@ # Template file for 'xbps' pkgname=xbps version=0.18 -revision=2 +revision=3 build_style=configure -configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin --with-tests --with-static" +configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin + --with-tests --with-static" depends="xbps-triggers" makedepends="which pkg-config zlib-devel proplib-devel>=0.6.2 openssl-devel libfetch-devel libarchive-devel confuse-devel atf-devel>=0.16"