-
Notifications
You must be signed in to change notification settings - Fork 20
xbps
Link : https://github.com/void-linux/xbps/commit/62962208fd40606467c616fc657c4ab1142fc997
Description: Fix leaving behind obsolete directories
At lib/transaction_files.c
@@ -445,14 +445,6 @@ collect_file(struct xbps_handle *xhp, const char *file, size_t size,
* Multiple packages removing the same directory.
* Record the last package to remove this directory.
*/
+ if (idx < item->old.index || item->old.preserve)
+ return 0;
+ item->old.pkgname = pkgname;
+ item->old.pkgver = pkgver;
+ item->old.index = idx;
+ item->old.preserve = preserve;
+ item->old.update = update;
+ item->old.removepkg = removepkg;
return 0;
} else {
/*
Tags
#Omission
#Multi-line
#Added
Link : https://github.com/void-linux/xbps/commit/bd707acfee7385be846e9851e305e47cea1a32ac
Description: Fix a double free with invalid repodata.
At lib/repo.c
@@ -156,6 +156,7 @@ repo_open_local(struct xbps_repo *repo, const char *repofile)
xbps_dbg_printf(repo->xhp,
"[repo] `%s' failed to open repodata archive %s\n",
repofile, strerror(rv));
- xbps_repo_close(repo);
return false;
}
if ((repo->idx = repo_get_dict(repo)) == NULL) {
@@ -163,6 +164,7 @@ repo_open_local(struct xbps_repo *repo, const char *repofile)
" index on archive, removing file.\n", repofile);
/* broken archive, remove it */
(void)unlink(repofile);
- xbps_repo_close(repo);
return false;
}
xbps_dictionary_make_immutable(repo->idx);
@@ -366,8 +368,7 @@ xbps_repo_open(struct xbps_handle *xhp, const char *url)
void
xbps_repo_close(struct xbps_repo *repo)
{
+ if (!repo)
+ return;
- assert(repo);
if (repo->ar != NULL)
archive_read_finish(repo->ar);
Tags
#Memory-error
#Multi-line
#Modified
Link : https://github.com/void-linux/xbps/commit/7b933a87a89bbf111b6b88cfd858fc0068cc2149
Description: Fix regression in revdeps check
At lib/transaction_check_revdeps.c
@@ -174,8 +174,9 @@ xbps_transaction_check_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs)
}
if ((revpkgd = xbps_find_pkg_in_array(pkgs, pkgname, 0))) {
+ if (xbps_transaction_pkg_type(revpkgd) == XBPS_TRANS_REMOVE)
+ continue;
- ttype = xbps_transaction_pkg_type(revpkgd);
- if (ttype == XBPS_TRANS_REMOVE)
- revpkgd = NULL;
}
if (revpkgd == NULL)
revpkgd = xbps_pkgdb_get_pkg(xhp, curpkgver);
Tags
#Logical-error
#Multi-line
#Modified
Link : https://github.com/void-linux/xbps/commit/0005b3ecc08ef3f1979b49f665bb06ef02d10080
Description: Fix for #234
At lib/package_orphans.c
@@ -156,6 +156,7 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user)
xbps_dictionary_t pkgd;
const char *pkgver = NULL;
unsigned int cnt = 0, reqbycnt = 0;
- bool automatic = false;
pkgd = xbps_array_get(array, i);
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
@@ -169,7 +170,6 @@ xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans_user)
xbps_array_t reqby;
xbps_dictionary_t deppkgd;
const char *deppkgver = NULL;
+ bool automatic = false;
cnt = 0;
xbps_array_get_cstring_nocopy(rdeps, x, &deppkgver);
Tags
#Logical-error
#Multi-line
#Modified
Link : https://github.com/void-linux/xbps/commit/8637269b38d9cd59fe946dc797a455e3c8009ea0
Description: Fix provides/replaces
At lib/transaction_revdeps.c
@@ -238,10 +238,6 @@ xbps_transaction_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs)
* if a new version of this conflicting package
* is in the transaction.
*/
+ if (xbps_find_pkg_in_array(pkgs, pkgname, "update")) {
+ free(pkgname);
+ continue;
+ }
free(pkgname);
broken_pkg(mdeps, curpkgver, pkgver, tract);
}
Tags
#Omission
#Multi-line
#Added