mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 13:07:58 -05:00
Switch pkg_new -> pkg_dup in find_replacements
Ugh, it was a pain to figure out why the Total Removed Size was showing up wrong in the output of removed packages, but this was why- we used a stupid _alpm_pkg_new call instead of just duping the package. Fix this. In the long run, we really need to figure out better ways to not duplicate all this package information. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
ac0605b9c2
commit
d18686a563
@ -147,7 +147,7 @@ static int find_replacements(pmtrans_t *trans, pmdb_t *db_local,
|
|||||||
* the package to replace.
|
* the package to replace.
|
||||||
*/
|
*/
|
||||||
pmsyncpkg_t *sync;
|
pmsyncpkg_t *sync;
|
||||||
pmpkg_t *dummy = _alpm_pkg_new(alpm_pkg_get_name(lpkg), NULL);
|
pmpkg_t *dummy = _alpm_pkg_dup(lpkg);
|
||||||
if(dummy == NULL) {
|
if(dummy == NULL) {
|
||||||
pm_errno = PM_ERR_MEMORY;
|
pm_errno = PM_ERR_MEMORY;
|
||||||
synclist_free(*syncpkgs);
|
synclist_free(*syncpkgs);
|
||||||
|
Loading…
Reference in New Issue
Block a user