1 |
--- rpm-4.6.1/build/files.c.1016~ 2010-10-02 06:18:55.416527836 +0200 |
2 |
+++ rpm-4.6.1/build/files.c 2010-10-07 00:06:23.527440773 +0200 |
3 |
@@ -1150,6 +1150,26 @@ static void genCpioListAndHeader(FileLis |
4 |
headerPutUint32(h, RPMTAG_FILEFLAGS, &(flp->flags) ,1); |
5 |
} |
6 |
|
7 |
+ /* Remove all entries from the list of files to check */ |
8 |
+ for (i = fl->fileListRecsUsed-1, flp--; i >= 0; i--, flp--) { |
9 |
+ if(i < fl->fileListRecsUsed-1 && !strcmp(flp->cpioPath,flp[1].cpioPath)) |
10 |
+ flp->flags |= flp[1].flags; |
11 |
+ if (flp->flags & RPMFILE_EXCLUDE) { |
12 |
+ char *buf_stdin = getStringBuf(check_fileList); |
13 |
+ size_t len = strlen(flp->diskPath); |
14 |
+ char *ptr = NULL; |
15 |
+ if((ptr = strstr(buf_stdin, flp->diskPath)) != NULL) { |
16 |
+ size_t ptr_len = strlen(ptr); |
17 |
+ char *end = &ptr[ptr_len-len-2]; |
18 |
+ memmove(ptr, ptr+len+1, ptr_len-len-1); |
19 |
+ memset(&ptr[ptr_len-len-1], ' ', len); |
20 |
+ *end = '0'; /* Swap out to avoid being stripped */ |
21 |
+ stripTrailingBlanksStringBuf(check_fileList); |
22 |
+ *end = '\n'; |
23 |
+ } |
24 |
+ } |
25 |
+ } |
26 |
+ |
27 |
if (totalFileSize < UINT32_MAX) { |
28 |
rpm_off_t totalsize = totalFileSize; |
29 |
headerPutUint32(h, RPMTAG_SIZE, &totalsize, 1); |