summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-11-17 14:05:48 +0100
committerDan McGee <dan@archlinux.org>2007-11-17 09:51:04 -0600
commite28973169d2e5eda8b64ebdda11ece0dc761d978 (patch)
tree4ac92a0e4f2f8f6b4c7ef7b0301b2378054abbb0
parentc8be7540a50583194e971918099006a1736cfab7 (diff)
downloadpacman-e28973169d2e5eda8b64ebdda11ece0dc761d978.tar.xz
pacman/sync.c : remove duplicated fallback on providers.
The fallback on providers when a target is not found was already made in the backend : libalpm/sync.c , _alpm_sync_addtarget . So I removed it from the frontend. The sync500 pactest proves this fallback still works correctly. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/sync.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 6f3c5d5e..bb48cf98 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -524,26 +524,9 @@ int sync_trans(alpm_list_t *targets, int sync_only)
}
}
if(!found) {
- /* targ not found in sync db, searching for providers... */
- const char *pname = NULL;
- for(j = sync_dbs; j; j = alpm_list_next(j)) {
- pmdb_t *db = alpm_list_getdata(j);
- alpm_list_t *prov = alpm_db_whatprovides(db, targ);
- if(prov) {
- pmpkg_t *pkg = alpm_list_getdata(prov);
- pname = alpm_pkg_get_name(pkg);
- alpm_list_free(prov);
- break;
- }
- }
- if(pname != NULL) {
- /* targ is provided by pname */
- targets = alpm_list_add(targets, strdup(pname));
- } else {
- fprintf(stderr, _("error: '%s': not found in sync db\n"), targ);
- retval = 1;
- goto cleanup;
- }
+ fprintf(stderr, _("error: '%s': not found in sync db\n"), targ);
+ retval = 1;
+ goto cleanup;
}
}
}