xbps: update to 0.20.

This commit is contained in:
Juan RP 2013-01-24 09:44:57 +01:00
parent 5f6a1abeec
commit 05b45a6d0f
6 changed files with 4 additions and 218 deletions

View file

@ -1,37 +0,0 @@
From 0f22579a34741e2a33f9bdb06b0ad0f1681cdd3d Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Fri, 28 Dec 2012 10:42:13 +0100
Subject: [PATCH] libxbps: fixed regression executing "pre-remove" action in
installed pkgs.
---
NEWS | 3 +++
lib/package_remove.c | 5 ++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/package_remove.c b/lib/package_remove.c
index 0b6fc03..3118e19 100644
--- lib/package_remove.c
+++ lib/package_remove.c
@@ -233,8 +233,6 @@ xbps_remove_pkg(struct xbps_handle *xhp,
if (!update)
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE, 0, pkgname, version, NULL);
- pkgver = xbps_xasprintf("%s-%s", pkgname, version);
-
if (chdir(xhp->rootdir) == -1) {
rv = errno;
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE_FAIL,
@@ -259,7 +257,8 @@ xbps_remove_pkg(struct xbps_handle *xhp,
* Run the pre remove action.
*/
if (pkgd) {
- rv = xbps_pkg_exec_script(xhp, pkgd, "remove", "pre", update);
+ rv = xbps_pkg_exec_script(xhp, pkgd, "remove-script",
+ "pre", update);
if (rv != 0) {
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE_FAIL,
errno, pkgname, version,
--
1.8.0.3

View file

@ -1,53 +0,0 @@
From 5d59a15faf67d921dfb190195c07bf4a70bca137 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Sat, 29 Dec 2012 07:13:49 +0100
Subject: [PATCH] libxbps: even if executing a pre-remove action fails,
continue removing pkg.
This is no reason to stop removing a pkg, so just continue and fully
remove the pkg.
---
lib/package_remove.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/package_remove.c b/lib/package_remove.c
index 3118e19..a207fc0 100644
--- lib/package_remove.c
+++ lib/package_remove.c
@@ -266,7 +266,7 @@ xbps_remove_pkg(struct xbps_handle *xhp,
"execute pre ACTION: %s",
pkgver, strerror(errno));
rv = errno;
- goto out;
+ goto purge;
}
}
/*
@@ -349,6 +349,7 @@ purge:
*/
buf = xbps_xasprintf("%s/.%s.plist", xhp->metadir, pkgname);
if (remove(buf) == -1) {
+ free(buf);
if (errno != ENOENT) {
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE_FAIL,
rv, pkgname, version,
@@ -356,6 +357,7 @@ purge:
pkgver, strerror(errno));
}
}
+ free(buf);
/*
* Unregister package from pkgdb.
*/
@@ -367,8 +369,6 @@ purge:
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE_DONE,
0, pkgname, version, NULL);
out:
- if (buf != NULL)
- free(buf);
if (pkgname != NULL)
free(pkgname);
--
1.8.0.3

View file

@ -1,31 +0,0 @@
From b5bb1debe4f1686aa018cc941389ced8c4b97cbb Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Mon, 14 Jan 2013 14:01:35 +0100
Subject: [PATCH] Partial revert of 5d59a15faf67d921dfb190195c07bf4a70bca137.
Error out if "pre-remove" script action fails, otherwise package is
removed but its files are still there (ouch).
---
NEWS | 3 ---
lib/package_remove.c | 5 ++---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/package_remove.c b/lib/package_remove.c
index a207fc0..4e69e82 100644
--- lib/package_remove.c
+++ lib/package_remove.c
@@ -264,9 +264,8 @@ xbps_remove_pkg(struct xbps_handle *xhp,
errno, pkgname, version,
"%s: [remove] REMOVE script failed to "
"execute pre ACTION: %s",
- pkgver, strerror(errno));
- rv = errno;
- goto purge;
+ pkgver, strerror(rv));
+ goto out;
}
}
/*
--
1.8.1

View file

@ -1,27 +0,0 @@
From fa40928026bd31ebc398a91066efe6709838f9a3 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 16 Jan 2013 11:47:52 +0100
Subject: [PATCH] xbps-install: don't treat EEXIST as an error when installing
pkgs.
Thanks to pancake for the bug hunting.
---
NEWS | 3 +++
bin/xbps-install/transaction.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/bin/xbps-install/transaction.c b/bin/xbps-install/transaction.c
index b91448b..480faeb 100644
--- bin/xbps-install/transaction.c
+++ bin/xbps-install/transaction.c
@@ -218,6 +218,7 @@ install_new_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall)
if ((rv = xbps_transaction_install_pkg(xhp, pkg, reinstall)) != 0) {
if (rv == EEXIST) {
printf("Package `%s' already installed.\n", pkg);
+ rv = 0;
} else if (rv == ENOENT) {
fprintf(stderr, "Unable to locate '%s' in "
"repository pool.\n", pkg);
--
1.8.1.1

View file

@ -1,66 +0,0 @@
From 82a8263f376a6f967e97fe7e5d1135a8e96b425a Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Wed, 16 Jan 2013 16:25:29 +0100
Subject: [PATCH] xbps-rindex(8): fix crash in -r when a pkg cannot be removed.
---
NEWS | 5 ++++-
bin/xbps-rindex/remove-obsoletes.c | 19 ++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/bin/xbps-rindex/remove-obsoletes.c b/bin/xbps-rindex/remove-obsoletes.c
index 96c0c98..426340f 100644
--- bin/xbps-rindex/remove-obsoletes.c
+++ bin/xbps-rindex/remove-obsoletes.c
@@ -56,8 +56,9 @@ remove_pkg(const char *repodir, const char *arch, const char *file)
if (remove(filepath) == -1) {
if (errno != ENOENT) {
rv = errno;
- xbps_error_printf("failed to remove old binpkg "
- "`%s': %s\n", file, strerror(rv));
+ fprintf(stderr, "xbps-rindex: failed to remove "
+ "package `%s': %s\n", file,
+ strerror(rv));
free(filepath);
return rv;
}
@@ -68,8 +69,9 @@ remove_pkg(const char *repodir, const char *arch, const char *file)
if (remove(filepath) == -1) {
if (errno != ENOENT) {
rv = errno;
- xbps_error_printf("failed to remove old binpkg "
- "`%s': %s\n", file, strerror(rv));
+ fprintf(stderr, "xbps-rindex: failed to remove "
+ "package `%s': %s\n", file,
+ strerror(rv));
free(filepath);
return rv;
}
@@ -95,11 +97,8 @@ cleaner_thread(void *arg)
if (pkgd == NULL) {
rv = remove_pkg(thd->ri->uri, arch, binpkg);
if (rv != 0) {
- fprintf(stderr, "xbps-rindex: failed to remove "
- "package `%s': %s\n", binpkg,
- strerror(rv));
prop_object_release(pkgd);
- break;
+ continue;
}
printf("Removed broken package `%s'.\n", binpkg);
}
@@ -118,10 +117,8 @@ cleaner_thread(void *arg)
if (!xbps_rindex_get_pkg(thd->ri, pkgver)) {
rv = remove_pkg(thd->ri->uri, arch, binpkg);
if (rv != 0) {
- fprintf(stderr, "xbps-rindex: failed to remove "
- "package `%s': %s\n", binpkg,
- strerror(rv));
prop_object_release(pkgd);
+ continue;
}
printf("Removed obsolete package `%s'.\n", binpkg);
}
--
1.8.1.1

View file

@ -1,10 +1,10 @@
# Template file for 'xbps'
pkgname=xbps
version=0.19.1
revision=7
version=0.20
revision=1
build_style=configure
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
--with-tests --with-static --debug"
--enable-tests --enable-static --enable-debug"
depends="xbps-triggers"
makedepends="which pkg-config proplib-devel>=0.6.2 openssl-devel
libfetch-devel libarchive-devel confuse-devel atf-devel>=0.16"
@ -16,4 +16,4 @@ maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://code.google.com/p/xbps"
license="Simplified BSD"
distfiles="http://xbps.googlecode.com/files/xbps-$version.tar.gz"
checksum=e52a1645d42fe14aec829df9ba1a3c572659056ed5fd8581aeb5ef95687896a6
checksum=91e0ae3c6cf807e1f66e45d84c1913d9d87c0eb201ae9c07bc3b4425beba401f