diff options
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/macro.c | 3 | ||||
-rw-r--r-- | rpmio/rpmfileutil.c | 3 | ||||
-rw-r--r-- | rpmio/rpmfileutil.h | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c index 98830d28a..9444283eb 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -959,6 +959,9 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn, case COMPRESSED_XZ: sprintf(be, "%%__xz -dc %s", b); break; + case COMPRESSED_LZIP: + sprintf(be, "%%__lzip -dc %s", b); + break; } b = be; } else if (STREQ("getenv", f, fn)) { diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c index f44eb35e3..60fe292e8 100644 --- a/rpmio/rpmfileutil.c +++ b/rpmio/rpmfileutil.c @@ -369,6 +369,9 @@ int rpmFileIsCompressed(const char * file, rpmCompressedMagic * compressed) (magic[4] == 0x5a) && (magic[5] == 0x00)) { /* new style xz (lzma) with magic */ *compressed = COMPRESSED_XZ; + } else if ((magic[0] == 'L') && (magic[1] == 'Z') && + (magic[2] == 'I') && (magic[3] == 'P')) { + *compressed = COMPRESSED_LZIP; } else if (((magic[0] == 0037) && (magic[1] == 0213)) || /* gzip */ ((magic[0] == 0037) && (magic[1] == 0236)) || /* old gzip */ ((magic[0] == 0037) && (magic[1] == 0036)) || /* pack */ diff --git a/rpmio/rpmfileutil.h b/rpmio/rpmfileutil.h index 496d7fda0..c6714151e 100644 --- a/rpmio/rpmfileutil.h +++ b/rpmio/rpmfileutil.h @@ -23,7 +23,8 @@ typedef enum rpmCompressedMagic_e { COMPRESSED_BZIP2 = 2, /*!< bzip2 can handle */ COMPRESSED_ZIP = 3, /*!< unzip can handle */ COMPRESSED_LZMA = 4, /*!< lzma can handle */ - COMPRESSED_XZ = 5 /*!< xz can handle */ + COMPRESSED_XZ = 5, /*!< xz can handle */ + COMPRESSED_LZIP = 6 /*!< lzip can handle */ } rpmCompressedMagic; /** \ingroup rpmfileutil |