switched exists() to rpmfileexists()
authorewt <devnull@localhost>
Mon, 30 Nov 1998 17:48:03 +0000 (17:48 +0000)
committerewt <devnull@localhost>
Mon, 30 Nov 1998 17:48:03 +0000 (17:48 +0000)
CVS patchset: 2563
CVS date: 1998/11/30 17:48:03

lib/install.c
lib/misc.c
lib/misc.h
lib/query.c
lib/rpmdb.c

index 402e9f4..d9e4f9b 100644 (file)
@@ -692,7 +692,7 @@ int rpmInstallPackage(char * rootdir, rpmdb db, FD_t fd,
                files[i].action = CREATE;
                if ((files[i].flags & RPMFILE_CONFIG) &&
                    !S_ISDIR(files[i].mode)) {
-                   if (exists(files[i].relativePath)) {
+                   if (rpmfileexists(files[i].relativePath)) {
                        if (files[i].flags & RPMFILE_NOREPLACE) {
                            rpmMessage(RPMMESS_DEBUG, 
                                _("%s exists - creating with alternate name\n"), 
index 890cdcb..11e67bf 100644 (file)
@@ -45,7 +45,7 @@ void freeSplitString(char ** list) {
     free(list);
 }
 
-int exists(char * filespec) {
+int rpmfileexists(char * filespec) {
     struct stat buf;
 
     if (stat(filespec, &buf)) {
index bbfcb7b..8c684c5 100644 (file)
@@ -8,7 +8,7 @@ char ** splitString(char * str, int length, char sep);
 void freeSplitString(char ** list);
 void stripTrailingSlashes(char * str);
 
-int exists(char * filespec);
+int rpmfileexists(char * filespec);
 
 int rpmvercmp(char * one, char * two);
 
index 4bb3087..9b54016 100644 (file)
@@ -79,9 +79,8 @@ static void queryArgCallback(poptContext con, enum poptCallbackReason reason,
       case 'f': data->source |= QUERY_PATH; data->sourceCount++; break;
       case 'g': data->source |= QUERY_GROUP; data->sourceCount++; break;
       case 'p': data->source |= QUERY_RPM; data->sourceCount++; break;
-
+      case 'v': rpmIncreaseVerbosity();         break;
       case POPT_SPECFILE: data->source |= QUERY_SPECFILE; data->sourceCount++; break;
-
       case POPT_WHATPROVIDES: data->source |= QUERY_WHATPROVIDES; 
                              data->sourceCount++; break;
       case POPT_WHATREQUIRES: data->source |= QUERY_WHATREQUIRES; 
index 93d5bb9..eabd502 100644 (file)
@@ -72,7 +72,7 @@ static int openDbFile(char * prefix, char * dbpath, char * shortName,
     strcat(filename, dbpath);
     strcat(filename, shortName);
 
-    if (!justCheck || !exists(filename)) {
+    if (!justCheck || !rpmfileexists(filename)) {
        *db = dbiOpenIndex(filename, perms, 0644);
        if (!*db) {
            return 1;
@@ -115,7 +115,7 @@ int openDatabase(char * prefix, char * dbpath, rpmdb *rpmdbp, int mode,
 
     memset(&db, 0, sizeof(db));
 
-    if (!justcheck || !exists(filename)) {
+    if (!justcheck || !rpmfileexists(filename)) {
        db.pkgs = faOpen(filename, mode, 0644);
        if (db.pkgs == NULL) {
            rpmError(RPMERR_DBOPEN, _("failed to open %s\n"), filename);