xbps: add patch from git master for xbps-rindex(8) -r crash.
This commit is contained in:
parent
7b0f5c3448
commit
8e2e0573dc
|
@ -0,0 +1,66 @@
|
|||
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
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.19.1
|
||||
revision=5
|
||||
revision=6
|
||||
build_style=configure
|
||||
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
|
||||
--with-tests --with-static"
|
||||
|
|
Loading…
Reference in New Issue