diff options
author | Dan McGee <dan@archlinux.org> | 2008-05-13 19:03:54 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-05-13 19:03:54 -0500 |
commit | dd98aa8564a21ed43782704bf9feb5b2b114825f (patch) | |
tree | 685c35186dc19109865957abc5f384dd606d3df9 /lib/libalpm/deps.c | |
parent | a422f6e39c9c60b89269c2b09e697a9eb142b904 (diff) | |
download | pacman-dd98aa8564a21ed43782704bf9feb5b2b114825f.tar.xz |
Simplify _alpm_pkg_new()
Any real call of this function doesn't specify a name or version ahead of
time, so just kill that functionality off. Now to remove those dummy
packages...
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r-- | lib/libalpm/deps.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index 818418e2..55e24388 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -598,7 +598,8 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg, } /* If package is in the ignorepkg list, ask before we pull it */ if(_alpm_pkg_should_ignore(sync)) { - pmpkg_t *dummypkg = _alpm_pkg_new(miss->target, NULL); + pmpkg_t *dummypkg = _alpm_pkg_new(); + STRDUP(dummypkg->name, miss->target, RET_ERR(PM_ERR_MEMORY, -1)); QUESTION(trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, dummypkg, sync, NULL, &found); _alpm_pkg_free(dummypkg); } @@ -620,7 +621,8 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg, continue; } if(_alpm_pkg_should_ignore(sync)) { - pmpkg_t *dummypkg = _alpm_pkg_new(miss->target, NULL); + pmpkg_t *dummypkg = _alpm_pkg_new(); + STRDUP(dummypkg->name, miss->target, RET_ERR(PM_ERR_MEMORY, -1)); QUESTION(trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, dummypkg, sync, NULL, &found); _alpm_pkg_free(dummypkg); } |