xbps: update to 0.19.

This commit is contained in:
Juan RP 2012-12-15 23:26:15 +01:00
parent 999d9d781b
commit dd5725a8a3
4 changed files with 3 additions and 162 deletions

View file

@ -1,58 +0,0 @@
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

View file

@ -1,84 +0,0 @@
From ca5aeebdc9fbbf5c74ad73e36ccea0ee6e7fbf7e Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Mon, 10 Dec 2012 11:09:18 +0100
Subject: [PATCH 1/2] xbps-install: fetch_cb.c: do not print ANSI escape codes
if stdout isn't a tty.
---
bin/xbps-install/fetch_cb.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/bin/xbps-install/fetch_cb.c b/bin/xbps-install/fetch_cb.c
index 4b4d05a..3497e19 100644
--- bin/xbps-install/fetch_cb.c
+++ bin/xbps-install/fetch_cb.c
@@ -144,9 +144,14 @@ stat_display(struct xbps_fetch_cb_data *xfpd, void *cbdata)
(double)xfpd->file_dloaded) / (double)xfpd->file_size);
(void)xbps_humanize_number(totsize, (int64_t)xfpd->file_size);
}
- fprintf(stderr, "%s: [%s %d%%] %s ETA: %s\033[K\r",
- xfpd->file_name, totsize, percentage,
- stat_bps(xfpd, xfer), stat_eta(xfpd, xfer));
+ if (isatty(fileno(stdout)))
+ printf("%s: [%s %d%%] %s ETA: %s\033[K\r",
+ xfpd->file_name, totsize, percentage,
+ stat_bps(xfpd, xfer), stat_eta(xfpd, xfer));
+ else
+ printf("%s: [%s %d%%] %s ETA: %s\n",
+ xfpd->file_name, totsize, percentage,
+ stat_bps(xfpd, xfer), stat_eta(xfpd, xfer));
}
void
@@ -165,7 +170,11 @@ fetch_file_progress_cb(struct xbps_fetch_cb_data *xfpd, void *cbdata)
} else if (xfpd->cb_end) {
/* end transfer stats */
(void)xbps_humanize_number(size, (int64_t)xfpd->file_dloaded);
- fprintf(stderr,"%s: %s [avg rate: %s]\033[K\n",
- xfpd->file_name, size, stat_bps(xfpd, xfer));
+ if (isatty(fileno(stdout)))
+ printf("%s: %s [avg rate: %s]\033[K\n",
+ xfpd->file_name, size, stat_bps(xfpd, xfer));
+ else
+ printf("%s: %s [avg rate: %s]\n",
+ xfpd->file_name, size, stat_bps(xfpd, xfer));
}
}
--
1.8.0.1
From f2d2b2fde9ddf8aebf2c3e7cc852333c4210b3ca Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Mon, 10 Dec 2012 11:20:59 +0100
Subject: [PATCH 2/2] xbps-install: fetch_cb.c: if stdout is a tty use stderr.
---
bin/xbps-install/fetch_cb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/xbps-install/fetch_cb.c b/bin/xbps-install/fetch_cb.c
index 3497e19..5093f9e 100644
--- bin/xbps-install/fetch_cb.c
+++ bin/xbps-install/fetch_cb.c
@@ -145,7 +145,7 @@ stat_display(struct xbps_fetch_cb_data *xfpd, void *cbdata)
(void)xbps_humanize_number(totsize, (int64_t)xfpd->file_size);
}
if (isatty(fileno(stdout)))
- printf("%s: [%s %d%%] %s ETA: %s\033[K\r",
+ fprintf(stderr, "%s: [%s %d%%] %s ETA: %s\033[K\r",
xfpd->file_name, totsize, percentage,
stat_bps(xfpd, xfer), stat_eta(xfpd, xfer));
else
@@ -171,7 +171,7 @@ fetch_file_progress_cb(struct xbps_fetch_cb_data *xfpd, void *cbdata)
/* end transfer stats */
(void)xbps_humanize_number(size, (int64_t)xfpd->file_dloaded);
if (isatty(fileno(stdout)))
- printf("%s: %s [avg rate: %s]\033[K\n",
+ fprintf(stderr, "%s: %s [avg rate: %s]\033[K\n",
xfpd->file_name, size, stat_bps(xfpd, xfer));
else
printf("%s: %s [avg rate: %s]\n",
--
1.8.0.1

View file

@ -1,17 +0,0 @@
Remove incorrect assertion that may be hit in packages that
set conf_files with files not installed.
Temporary fix until xbps-0.19 is released.
--- lib/package_remove_obsoletes.c.orig 2012-12-03 17:27:30.354154688 +0100
+++ lib/package_remove_obsoletes.c 2012-12-03 17:27:49.560683084 +0100
@@ -67,7 +67,8 @@ again:
found = false;
obj = prop_array_get(array, i);
oldstr = prop_dictionary_get(obj, "file");
- assert(oldstr);
+ if (oldstr == NULL)
+ continue;
file = xbps_xasprintf(".%s",
prop_string_cstring_nocopy(oldstr));

View file

@ -1,7 +1,7 @@
# Template file for 'xbps'
pkgname=xbps
version=0.18.1
revision=4
version=0.19
revision=1
build_style=configure
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
--with-tests --with-static"
@ -16,7 +16,7 @@ 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=7467ad3a10e3c851e3cc69abb1ce5364a65ddda9a57171bd8e127da5bfc833fa
checksum=15355389722c1cecd2a54d568afc61e11fa73bc85f8ff6b5c5dd8900deb9a226
long_desc="
The XBPS package system. A new, fast, from scratch and simple
binary package manager. This package includes the binary utilities