[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
PATCH: %exclude tag
- From: "Ademar de Souza Reis Jr." <ademar conectiva com br>
- To: rpm-list redhat com
- Subject: PATCH: %exclude tag
- Date: Mon, 3 Dec 2001 14:00:15 -0200
Hello.
In the 4.0.2 -> 4.0.3 changelog, I see:
- add %exclude support (i.e. "everything but") to %files.
But testing it I found it was causing a segfault in rpmb.
Attached is a patch that fixes the problem.
[]'s
- Ademar
--
Ademar de Souza Reis Jr.
"Unfortunately, no-one can be told what Linux is.. you have
to see it for yourself."
^[:wq!
Index: files.c
===================================================================
RCS file: /cvs/devel/rpm/build/files.c,v
retrieving revision 1.188
diff -u -r1.188 files.c
--- files.c 2001/11/18 17:49:21 1.188
+++ files.c 2001/12/03 15:53:53
@@ -1138,13 +1138,15 @@
!strcmp(flp->fileURL, flp[1].fileURL)) {
/* Two entries for the same file found, merge the entries. */
+ /* Note that an %exclude is a duplication of a file reference */
- rpmMessage(RPMMESS_WARNING, _("File listed twice: %s\n"),
- flp->fileURL);
-
/* file flags */
- flp[1].flags |= flp->flags;
-
+ flp[1].flags |= flp->flags;
+
+ if (!(flp[1].flags & RPMFILE_EXCLUDE))
+ rpmMessage(RPMMESS_WARNING, _("File listed twice: %s\n"),
+ flp->fileURL);
+
/* file mode */
if (S_ISDIR(flp->fl_mode)) {
if ((flp[1].specdFlags & (SPECD_DIRMODE | SPECD_DEFDIRMODE)) <
@@ -1382,6 +1384,11 @@
while (((flp - fl->fileList) < (fl->fileListRecsUsed - 1)) &&
!strcmp(flp->fileURL, flp[1].fileURL))
flp++;
+
+ if (flp->flags & RPMFILE_EXCLUDE) {
+ i--;
+ continue;
+ }
/* Create disk directory and base name. */
fi->dil[i] = i;
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]