teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.12.90-try-unglobbed.patch

Lubos Kardos ad8c42
From c16c70cbd6b31cd93541d5c22d23ba98d212ad3d Mon Sep 17 00:00:00 2001
Lubos Kardos ad8c42
From: Lubos Kardos <lkardos@redhat.com>
Lubos Kardos ad8c42
Date: Mon, 3 Aug 2015 12:10:14 +0200
Lubos Kardos ad8c42
Subject: [PATCH 2/2] If globbing of a filename fails, try use the filename
Lubos Kardos ad8c42
 without globbing.
Lubos Kardos ad8c42
Lubos Kardos ad8c42
Commit d14ecfe587efbe80e5534161dbd3a4f7158b4e2b enabled {} expansion
Lubos Kardos ad8c42
but {} expansion caused regresion because rpm tried to expand filenames
Lubos Kardos ad8c42
which weren't expanded previously and expansion failed because these
Lubos Kardos ad8c42
filenames weren't supposed to be expanded. Now if expansion fails then
Lubos Kardos ad8c42
rpm tries to use original filename.
Lubos Kardos ad8c42
---
Lubos Kardos ad8c42
 build/files.c | 15 ++++++---------
Lubos Kardos ad8c42
 1 file changed, 6 insertions(+), 9 deletions(-)
Lubos Kardos ad8c42
Lubos Kardos ad8c42
diff --git a/build/files.c b/build/files.c
Lubos Kardos ad8c42
index d16bb17..ea595b9 100644
Lubos Kardos ad8c42
--- a/build/files.c
Lubos Kardos ad8c42
+++ b/build/files.c
Lubos Kardos ad8c42
@@ -1584,16 +1584,13 @@ static rpmRC processBinaryFile(Package pkg, FileList fl, const char * fileName)
Lubos Kardos ad8c42
 	    }
Lubos Kardos ad8c42
 	    argvFree(argv);
Lubos Kardos ad8c42
 	} else {
Lubos Kardos ad8c42
-	    int lvl = RPMLOG_WARNING;
Lubos Kardos ad8c42
 	    const char *msg = (fl->cur.isDir) ?
Lubos Kardos ad8c42
-				_("Directory not found by glob: %s\n") :
Lubos Kardos ad8c42
-				_("File not found by glob: %s\n");
Lubos Kardos ad8c42
-	    if (!(fl->cur.attrFlags & RPMFILE_EXCLUDE)) {
Lubos Kardos ad8c42
-		lvl = RPMLOG_ERR;
Lubos Kardos ad8c42
-		rc = RPMRC_FAIL;
Lubos Kardos ad8c42
-	    }
Lubos Kardos ad8c42
-	    rpmlog(lvl, msg, diskPath);
Lubos Kardos ad8c42
-	    goto exit;
Lubos Kardos ad8c42
+				_("Directory not found by glob: %s. "
Lubos Kardos ad8c42
+				"Trying without globbing.\n") :
Lubos Kardos ad8c42
+				_("File not found by glob: %s. "
Lubos Kardos ad8c42
+				"Trying without globbing.\n");
Lubos Kardos ad8c42
+	    rpmlog(RPMLOG_DEBUG, msg, diskPath);
Lubos Kardos ad8c42
+	    rc = addFile(fl, diskPath, NULL);
Lubos Kardos ad8c42
 	}
Lubos Kardos ad8c42
     } else {
Lubos Kardos ad8c42
 	rc = addFile(fl, diskPath, NULL);
Lubos Kardos ad8c42
-- 
Lubos Kardos ad8c42
1.9.3
Lubos Kardos ad8c42