- enable extension-based-compression-detection in prep (rpm is misdetecting plain...
[packages/rpm.git] / extension-based-compression-detection.patch
1 --- rpm-5.4.15/rpmio/macro.c~   2018-08-19 13:11:28.000000000 +0200
2 +++ rpm-5.4.15/rpmio/macro.c    2018-08-19 13:18:39.102655981 +0200
3 @@ -3122,7 +3122,7 @@
4      ssize_t nb;
5      int rc = -1;
6      unsigned char magic[13];
7 -#if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) /* extension-based-compression-detection */
8 +#if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_PLD) /* extension-based-compression-detection */
9      size_t file_len;
10  #endif
11  
12 @@ -3139,7 +3139,7 @@
13         return 0;
14  #endif
15  
16 -#if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) /* extension-based-compression-detection */
17 +#if defined(RPM_VENDOR_OPENPKG) || defined(RPM_VENDOR_FEDORA) || defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_PLD) /* extension-based-compression-detection */
18      file_len = strlen(file);
19      if ((file_len > 4 && strcasecmp(file+file_len-4, ".tbz") == 0)
20       || (file_len > 4 && strcasecmp(file+file_len-4, ".bz2") == 0)) {
21 @@ -3208,7 +3208,7 @@
22       &&        magic[2] == 'Z' && magic[3] == 'O')     /* lzop */
23         *compressed = COMPRESSED_LZOP;
24      else
25 -#if !defined(RPM_VENDOR_OPENPKG) && !defined(RPM_VENDOR_FEDORA) && !defined(RPM_VENDOR_MANDRIVA) /* extension-based-compression-detection */
26 +#if !defined(RPM_VENDOR_OPENPKG) && !defined(RPM_VENDOR_FEDORA) && !defined(RPM_VENDOR_MANDRIVA) && !defined(RPM_VENDOR_PLD) /* extension-based-compression-detection */
27      /* XXX Ick, LZMA has no magic. See http://lkml.org/lkml/2005/6/13/285 */
28      if (magic[ 9] == (unsigned char) 0x00 && magic[10] == (unsigned char) 0x00 &&
29         magic[11] == (unsigned char) 0x00 && magic[12] == (unsigned char) 0x00) /* lzmash */
This page took 0.037665 seconds and 3 git commands to generate.