libxbps: ignore updates for pkgs with held deps. Close #143

This commit is contained in:
Juan RP 2016-02-06 09:03:54 +01:00
parent 27e36fcbf9
commit 067687ce28
3 changed files with 9 additions and 3 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
xbps-0.52 (???):
* libxbps: ignore updates for packages that have held dependencies.
Fixes #143. See https://github.com/voidlinux/xbps/issues/143
* xbps-install(1): in dry-run mode, do not stop after processing a package
that is already up-to-date. Fixes #145.
See https://github.com/voidlinux/xbps/issues/145

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2008-2014 Juan Romero Pardines.
* Copyright (c) 2008-2016 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -280,6 +280,10 @@ find_repo_deps(struct xbps_handle *xhp,
break;
}
}
if (xbps_dictionary_get(curpkgd, "hold")) {
xbps_dbg_printf(xhp, "%s on hold state! ignoring package.\n", curpkg);
continue;
}
/*
* Pass 4: find required dependency in repository pool.
* If dependency does not match add pkg into the missing

View File

@ -44,7 +44,6 @@ update_pkg_with_held_dep_head() {
}
update_pkg_with_held_dep_body() {
atf_expect_death "Known bug: see https://github.com/voidlinux/xbps/issues/143"
mkdir -p some_repo pkginst pkgheld pkgdep-21_1 pkgdep-22_1
touch pkginst/pi00
touch pkgheld/ph00
@ -102,7 +101,7 @@ update_pkg_with_held_dep_body() {
xbps-rindex -d -a pkgdep-22*.xbps
atf_check_equal $? 0
xbps-install -r root -C empty.conf --repository=$PWD -d -y pkginst >&2
xbps-install -r root -C empty.conf --repository=$PWD -d -yv pkginst
atf_check_equal $? 0
}