index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2008-07-08 10:07:05 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-07-13 09:16:55 -0500 |
commit | fd8969f67875ad6854725165b9530f4be26c5d96 (patch) | |
tree | fe3d41322943efa8167076fafecb80d83de04558 /src | |
parent | f724fb27022551e536496f8f99bc4be33b4ce3b7 (diff) |
-rw-r--r-- | src/pacman/sync.c | 40 |
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 47ab4ebb..1e2af45f 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -583,7 +583,7 @@ static int sync_trans(alpm_list_t *targets) goto cleanup; } /* target not found: check if it's a group */ - + printf(_("%s package not found, searching for group...\n"), targ); for(j = sync_dbs; j; j = alpm_list_next(j)) { pmdb_t *db = alpm_list_getdata(j); grp = alpm_db_readgrp(db, targ); @@ -617,41 +617,9 @@ static int sync_trans(alpm_list_t *targets) } } if(!found) { - /* targ not found in sync db, searching for providers... */ - alpm_list_t *prov = NULL; - for(j = sync_dbs; j; j = alpm_list_next(j)) { - pmdb_t *db = alpm_list_getdata(j); - alpm_list_t *dblist = alpm_db_getpkgcache(db); - alpm_list_t *satisfiers = alpm_find_pkg_satisfiers(dblist, targ); - prov = alpm_list_join(prov, satisfiers); - } - if(prov != NULL) { - if(alpm_list_count(prov) == 1) { - const char *pname = NULL; - pmpkg_t *pkg = alpm_list_getdata(prov); - pname = alpm_pkg_get_name(pkg); - alpm_list_free(prov); - printf(_("Warning: %s provides %s\n"), pname, targ); - targets = alpm_list_add(targets, strdup(pname)); - } else { - alpm_list_t *k; - pm_fprintf(stderr, PM_LOG_ERROR, - _("several packages provide %s, please specify one :\n"), targ); - for(k = prov; k; k = alpm_list_next(k)) { - pmpkg_t *pkg = alpm_list_getdata(k); - printf("%s ", alpm_pkg_get_name(pkg)); - } - printf("\n"); - alpm_list_free(prov); - retval = 1; - goto cleanup; - } - } else { - pm_fprintf(stderr, PM_LOG_ERROR, - _("'%s': not found in sync db\n"), targ); - retval = 1; - goto cleanup; - } + pm_fprintf(stderr, PM_LOG_ERROR, _("'%s': not found in sync db\n"), targ); + retval = 1; + goto cleanup; } } } |