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>
This commit is contained in:
Chantry Xavier 2007-11-17 14:05:48 +01:00 committed by Dan McGee
parent c8be7540a5
commit e28973169d

View File

@ -524,22 +524,6 @@ int sync_trans(alpm_list_t *targets, int sync_only)
} }
} }
if(!found) { 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); fprintf(stderr, _("error: '%s': not found in sync db\n"), targ);
retval = 1; retval = 1;
goto cleanup; goto cleanup;
@ -547,7 +531,6 @@ int sync_trans(alpm_list_t *targets, int sync_only)
} }
} }
} }
}
/* Step 2: "compute" the transaction based on targets and flags */ /* Step 2: "compute" the transaction based on targets and flags */
if(alpm_trans_prepare(&data) == -1) { if(alpm_trans_prepare(&data) == -1) {