]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-tar_as_secondary_source.patch
- compress debuginfo sections with zlib (reduce /usr/lib/debug size).
[packages/rpm.git] / rpm-tar_as_secondary_source.patch
1 --- rpm-4.5/rpmio/macro.c~      2008-06-10 02:08:37.000000000 +0300
2 +++ rpm-4.5/rpmio/macro.c       2008-06-10 02:08:59.476044991 +0300
3 @@ -22,6 +22,7 @@
4  #include <stdio.h>
5  #include <stdlib.h>
6  #include <string.h>
7 +#include <strings.h>
8  #include <ctype.h>
9  #define rpmError fprintf
10  #define        rpmIsVerbose()  (0)
11 @@ -2106,6 +2107,7 @@ int isCompressed(const char * file, rpmC
12      ssize_t nb;
13      int rc = -1;
14      unsigned char magic[13];
15 +    char *end, *ext;
16  
17      *compressed = COMPRESSED_NOT;
18  
19 @@ -2131,6 +2133,11 @@ int isCompressed(const char * file, rpmC
20  
21      rc = 0;
22  
23 +    /* Tar archives will be recognized by filename. */
24 +    end = strchr(file, '\0');
25 +    ext = end - 4;
26 +    if (ext > file && !strcasecmp(ext, ".tar")) return rc;
27
28      if (magic[0] == 'B' && magic[1] == 'Z')
29         *compressed = COMPRESSED_BZIP2;
30      else
This page took 0.024606 seconds and 3 git commands to generate.