From 3ba0d67cb14ba5d608df16eb447fe441956dbf8f Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Wed, 7 Sep 2005 07:03:50 +0000 Subject: Imported from pacman-2.9.7-TEST2.tar.gz --- src/db.c | 7 ++++++- src/pacman.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/db.c b/src/db.c index 82e76318..4d5c4e22 100644 --- a/src/db.c +++ b/src/db.c @@ -779,7 +779,11 @@ PMList* db_find_conflicts(pacdb_t *db, PMList *targets, char *root, PMList **ski * is not (or vice versa) then it's a conflict */ ok = 0; - } else if(S_ISDIR(buf.st_mode)) { + goto donecheck; + } + /* re-fetch with stat() instead of lstat() */ + stat(path, &buf); + if(S_ISDIR(buf.st_mode)) { /* if it's a directory, then we have no conflict */ ok = 1; } else { @@ -845,6 +849,7 @@ PMList* db_find_conflicts(pacdb_t *db, PMList *targets, char *root, PMList **ski } } } +donecheck: if(!ok) { MALLOC(str, 512); snprintf(str, 512, "%s: %s: exists in filesystem", p->name, path); diff --git a/src/pacman.c b/src/pacman.c index b8d8eed5..6ab8d3cf 100644 --- a/src/pacman.c +++ b/src/pacman.c @@ -693,7 +693,7 @@ int pacman_sync(pacdb_t *db, PMList *targets) cmp = rpmvercmp(local->version, sync->pkg->version); if(cmp > 0 && !sync->pkg->force) { /* local version is newer */ - fprintf(stderr, ":: %s: local version (%s) is newer than repo version (%s)\n", + fprintf(stderr, ":: %s: local version (%s) appears to be newer than repo version (%s)\n", local->name, local->version, sync->pkg->version); newer = 1; FREE(sync); -- cgit v1.2.3-24-g4f1b