From f4809dcc9c27ac614e2a3381d4ecd8661beec8de Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Tue, 15 Sep 2009 16:07:25 +0200 Subject: sync.c : duplicate the target before modifying it It was probably a bad idea to modify the target directly in case of repo/pkg syntax. Duplicating it also allows us to keep the original target string, which is more informative when printing errors. Also remove a duplicated error message from libalpm, and improve the message already returned to the frontend. $ pacman -S foo/bar before error: repository 'foo' not found error: 'bar': no such repository after error: 'foo/bar': could not find repository for target Signed-off-by: Xavier Chantry Signed-off-by: Dan McGee --- lib/libalpm/sync.c | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/libalpm/sync.c') diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 28e63fd4..a1a6ea7c 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -323,7 +323,6 @@ int SYMEXPORT alpm_sync_dbtarget(char *dbname, char *target) } } if(dbs == NULL) { - _alpm_log(PM_LOG_ERROR, _("repository '%s' not found\n"), dbname); RET_ERR(PM_ERR_PKG_REPO_NOT_FOUND, -1); } return(_alpm_sync_target(dbs, target)); -- cgit v1.2.3-54-g00ecf