summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/sync.c40
1 files changed, 4 insertions, 36 deletions
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;
}
}
}