diff options
author | Joakim Tjernlund <joakim.tjernlund@infinera.com> | 2019-05-14 18:58:18 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2019-05-16 19:10:37 +0200 |
commit | 4dc16c6cfcf2c3a4d2a439ee93999a4cd1864af2 (patch) | |
tree | f4cf714e6888b9830091b6fc3cce656e04187e70 /qmerge.c | |
parent | qmerge: improve messages somewhat (diff) | |
download | portage-utils-4dc16c6cfcf2c3a4d2a439ee93999a4cd1864af2.tar.gz portage-utils-4dc16c6cfcf2c3a4d2a439ee93999a4cd1864af2.tar.bz2 portage-utils-4dc16c6cfcf2c3a4d2a439ee93999a4cd1864af2.zip |
qmerge: ensure we respect SLOT while finding candidate package to unmerge
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qmerge.c')
-rw-r--r-- | qmerge.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1358,12 +1358,12 @@ pkg_merge(int level, const depend_atom *atom, const struct pkg_t *pkg) pkg_ctx = tree_next_pkg(cat_ctx); if (!pkg_ctx) break; - - old_atom = atom_explode(pkg_ctx->name); - /* This cast sucks, but we know for now the field isn't modified */ - old_atom->CATEGORY = (char *)cat_ctx->name; + old_atom = tree_get_atom(pkg_ctx, 1); /* retrieve SLOT */ + if (!old_atom) + goto next_pkg; + old_atom->SUBSLOT = NULL; /* just match SLOT */ + old_atom->REPO = NULL; /* REPO never matters, TODO atom_compare */ ret = atom_compare(atom, old_atom); - atom_implode(old_atom); switch (ret) { case NEWER: case OLDER: |