[Rpm-maint] [rpm-software-management/rpm] Replace rpm2cpio with rpm2archive (PR #2758)
Michal Domonkos
notifications at github.com
Fri Nov 10 12:32:24 UTC 2023
@dmnks commented on this pull request.
> @@ -141,10 +163,20 @@ static int process_package(rpmts ts, const char * filename)
exit(EXIT_FAILURE);
}
}
- if (archive_write_set_format_pax_restricted(a) != ARCHIVE_OK) {
- fprintf(stderr, "Error: Format pax restricted is not supported\n");
+
+ if (rstreq(format, "pax")) {
+ format_code = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+ } else if (rstreq(format, "cpio")) {
+ format_code = ARCHIVE_FORMAT_CPIO_SVR4_NOCRC;
+ } else {
+ rc = ARCHIVE_FAILED;
+ }
+
+ if (archive_write_set_format(a, format_code) != ARCHIVE_OK) {
+ fprintf(stderr, "Error: Format %s is not supported\n", format);
... as I suppose using `format_code` wouldn't be optimal either as it's just an integer code.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2758#discussion_r1389339140
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2758/review/1724685344 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20231110/ffb3c260/attachment.html>
More information about the Rpm-maint
mailing list