xbps-git: add patch from single-pkgdb git branch to fix packages on hold.

This commit is contained in:
Juan RP 2012-09-25 15:06:30 +02:00
parent 00ef758b19
commit e4807a8672
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,35 @@
commit aa154199a6d7d89bfe040755be289b1d827c5727
Author: Juan RP <xtraeme@gmail.com>
Date: Tue Sep 25 15:02:57 2012 +0200
xbps_transaction_update_packages: make packages on hold work (duh!).
diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c
index aa26279..666bd38 100644
--- lib/transaction_ops.c
+++ lib/transaction_ops.c
@@ -204,7 +204,7 @@ xbps_transaction_update_packages(struct xbps_handle *xhp)
{
prop_object_t obj;
const char *pkgname, *holdpkgname;
- bool newpkg_found = false;
+ bool foundhold = false, newpkg_found = false;
int rv = 0;
size_t i, x;
@@ -219,9 +219,14 @@ xbps_transaction_update_packages(struct xbps_handle *xhp)
if (strcmp(pkgname, holdpkgname) == 0) {
xbps_dbg_printf(xhp, "[rpool] package %s on hold, "
"ignoring updates.\n", pkgname);
- continue;
+ foundhold = true;
+ break;
}
}
+ if (foundhold) {
+ foundhold = false;
+ continue;
+ }
rv = transaction_find_pkg(xhp, pkgname, false, true,
false, TRANS_UPDATE);
if (rv == 0)

View File

@ -1,7 +1,7 @@
# Template file for 'xbps-git'
pkgname=xbps-git
version="$(date -u +%Y%m%d)"
revision=1
revision=2
nofetch=yes
noextract=yes
build_style=configure