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

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");