]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-check_files.patch
- merged 4.1 patches... hope I didn't brake anything
[packages/rpm.git] / rpm-check_files.patch
index 9136b64844f3d3404c1c7ffbf48f232196301de0..6e1a74b3167819268bff8f5f5ade75472ad6d1e0 100644 (file)
@@ -1,29 +1,36 @@
---- rpm-4.0.2/build/files.c    Sun May 26 13:40:43 2002
-+++ rpm-4.0.2-filon/build/files.c      Sun May 26 13:39:44 2002
-@@ -1987,7 +1987,7 @@
-  */
- static int generateDepends(Spec spec, Package pkg,
-                          struct cpioFileMapping *cpioList, int cpioCount,
--                         int multiLib)
-+                         int multiLib, StringBuf fileList, int *fileListLen)
- {
-     StringBuf writeBuf;
-     int writeBytes;
-@@ -2013,7 +2013,9 @@
-       }
+diff -urN rpm-4.0.4.org/build/files.c rpm-4.0.4/build/files.c
+--- rpm-4.0.4.org/build/files.c        Sun Jul 28 00:22:46 2002
++++ rpm-4.0.4/build/files.c    Sun Jul 28 00:23:54 2002
+@@ -90,6 +90,10 @@
+ /*@unchecked@*/
+ static int multiLib = 0;      /* MULTILIB */
  
-       writeBytes += strlen(cpioList->fsPath) + 1;
-+      *fileListLen += strlen(cpioList->fsPath) + 1;
-       appendLineStringBuf(writeBuf, cpioList->fsPath);
-+      appendLineStringBuf(fileList, cpioList->fsPath);
-     }
++/* list of files */
++static StringBuf check_fileList = NULL;
++static int check_fileListLen = 0;
++
+ /**
+  * Package file tree walk data.
+  */
+@@ -1593,6 +1597,13 @@
+       (unsigned)fileMode, fileUname, fileGname, fileURL);
+ #endif
  
-     for (dm = depMsgs; dm->msg != NULL; dm++) {
-@@ -2190,10 +2192,54 @@
-     FREE(versions);
++    /* S_XXX macro must be consistent with type in find call at check-files script */
++    if (S_ISREG(fileMode)) {
++      appendStringBuf(check_fileList, diskURL);
++      appendStringBuf(check_fileList, "\n");
++      check_fileListLen += strlen(diskURL) + 1;
++    }
++
+     /* Add to the file list */
+     if (fl->fileListRecsUsed == fl->fileListRecsAlloced) {
+       fl->fileListRecsAlloced += 128;
+@@ -2655,11 +2671,54 @@
+     versions = hfd(versions, dvt);
  }
  
-+int checkFiles(StringBuf fileList, int fileListLen)
++static int checkFiles(StringBuf fileList, int fileListLen)
 +{
 +    StringBuf readBuf = NULL;
 +    char* myargv[3] = {NULL, NULL, NULL};
@@ -57,8 +64,8 @@
 +exit:
 +    
 +    freeStringBuf(readBuf);
-+    FREE(myargv[0]);
-+    FREE(myargv[1]);
++    _free(myargv[0]);
++    _free(myargv[1]);
 +
 +    return rc;
 +}
  {
      Package pkg;
      int res = 0;
-+    StringBuf fileList;
-+    int fileListLen = 0;
-+    
-+    fileList = newStringBuf();
      
++    check_fileList = newStringBuf();
++    check_fileListLen = 0;
++    
      for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
        const char *n, *v, *r;
-@@ -2213,13 +2260,23 @@
-      * XXX existence (rather than value) that will need to change as well.
-      */
-       if (headerGetEntry(pkg->header, RPMTAG_MULTILIBS, NULL, NULL, NULL)) {
--          generateDepends(spec, pkg, pkg->cpioList, pkg->cpioCount, 1);
--          generateDepends(spec, pkg, pkg->cpioList, pkg->cpioCount, 2);
-+          generateDepends(spec, pkg, pkg->cpioList, pkg->cpioCount, 1, fileList, &fileListLen);
-+          generateDepends(spec, pkg, pkg->cpioList, pkg->cpioCount, 2, fileList, &fileListLen);
-       } else
--          generateDepends(spec, pkg, pkg->cpioList, pkg->cpioCount, 0);
-+          generateDepends(spec, pkg, pkg->cpioList, pkg->cpioCount, 0, fileList, &fileListLen);
-       printDeps(pkg->header);
-       
+       int rc;
+@@ -2687,5 +2746,15 @@
+       /*@=noeffect@*/
      }
  
 +    /* Now we have in fileList list of files from all packages.
 +     */
 +    
 +    if (res == 0) 
-+        checkFiles(fileList, fileListLen);
++        checkFiles(check_fileList, check_fileListLen);
 +    
-+    freeStringBuf(fileList);
++    freeStringBuf(check_fileList);
 +    
      return res;
  }
---- rpm-4.0.2/platform.in      Sun May 26 13:40:43 2002
-+++ rpm-4.0.2-filon/platform.in        Sun May 26 12:11:26 2002
-@@ -38,6 +38,10 @@
- #     Expanded at end of %install
+diff -Nur rpm-4.0.4.orig/platform.in rpm-4.0.4/platform.in
+--- rpm-4.0.4.orig/platform.in Sun Jun 30 00:07:54 2002
++++ rpm-4.0.4/platform.in      Sun Jun 30 00:13:45 2002
+@@ -89,6 +89,10 @@
+ #     Expanded at end of %install scriptlet.
  #
  
 +# Gets file list on input and buildroot as first parameter
This page took 0.037166 seconds and 4 git commands to generate.