Workaround fix for 'xbps-install -yf xbps <-> xbps-git'.

This commit is contained in:
Juan RP 2013-02-05 12:10:24 +01:00
parent 6c96fe32cc
commit d8769c4873
5 changed files with 10 additions and 7 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
xbps-0.21 (???):
* libxbps: workaround a bug (found by pancake) when updating a package
that is being replaced by a virtual package.
* libxbps: fully remove packages with broken symlinks; previously if a
broken symlink was there (readlink returning ELOOP), package wasn't
removed.

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2008-2012 Juan Romero Pardines.
* Copyright (c) 2008-2013 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -64,7 +64,7 @@
*/
#define XBPS_PKGINDEX_VERSION "1.6"
#define XBPS_API_VERSION "20130202"
#define XBPS_API_VERSION "20130205"
#ifndef XBPS_VERSION
#define XBPS_VERSION "UNSET"

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2008-2012 Juan Romero Pardines.
* Copyright (c) 2008-2013 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -491,7 +491,8 @@ unpack_archive(struct xbps_handle *xhp,
* - Package with "softreplace" keyword.
*/
old_filesd = xbps_pkgdb_get_pkg_metadata(xhp, pkgname);
assert(prop_object_type(old_filesd) == PROP_TYPE_DICTIONARY);
if (old_filesd == NULL)
goto out1;
obsoletes = xbps_find_pkg_obsoletes(xhp, old_filesd, filesd);
for (i = 0; i < prop_array_count(obsoletes); i++) {

View File

@ -264,7 +264,7 @@ xbps_transaction_commit(struct xbps_handle *xhp)
else
install = true;
if (update) {
if (update && xbps_pkgdb_get_pkg(xhp, pkgname)) {
/*
* Update a package: execute pre-remove
* action if found before unpacking.

View File

@ -92,8 +92,7 @@ xbps_transaction_package_replace(struct xbps_handle *xhp)
* package that should be replaced is also in the
* transaction and it's going to be updated.
*/
if ((reppkgd = xbps_find_pkg_in_array(unsorted, curpkgname)) ||
(reppkgd = xbps_find_virtualpkg_in_array(xhp, unsorted, curpkgname))) {
if ((reppkgd = xbps_find_pkg_in_array(unsorted, curpkgname))) {
xbps_dbg_printf(xhp,
"found replaced pkg "
"in transaction\n");