michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone
a5e32e
diff --git a/rpm2cpio.c b/rpm2cpio.c
a5e32e
index 89ebdfa..ae999ff 100644
a5e32e
--- a/rpm2cpio.c
a5e32e
+++ b/rpm2cpio.c
a5e32e
@@ -84,7 +84,12 @@ int main(int argc, char *argv[])
a5e32e
 	exit(EXIT_FAILURE);
a5e32e
     }
a5e32e
 
a5e32e
-    rc = (ufdCopy(gzdi, fdo) == payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
a5e32e
+    /*
a5e32e
+     * XXX HACK for #1142949: should be equality test, but archive size
a5e32e
+     * short by cpio trailer size in packages built with rpm 4.12.0
a5e32e
+     * and its pre-releases.
a5e32e
+     */
a5e32e
+    rc = (ufdCopy(gzdi, fdo) >= payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
a5e32e
 
a5e32e
     Fclose(fdo);
a5e32e