]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-tar_as_secondary_source.patch
- versioned Provides rpmbuild(find_lang)
[packages/rpm.git] / rpm-tar_as_secondary_source.patch
1 --- rpm-4.4.9/rpmio/macro.c.old 2007-11-10 10:29:08.000000000 +0100
2 +++ rpm-4.4.9/rpmio/macro.c     2007-11-10 10:37:25.000000000 +0100
3 @@ -21,6 +21,7 @@
4  #include <stdio.h>
5  #include <stdlib.h>
6  #include <string.h>
7 +#include <strings.h>
8  #define rpmError fprintf
9  #define RPMERR_BADSPEC stderr
10  #undef _
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.088937 seconds and 3 git commands to generate.