GNOME Bugzilla – Bug 771916
libarchive.vapi: archive_read_finish is deprecated
Last modified: 2018-04-22 19:24:45 UTC
Since Version 3.0.2 the function `archive_read_finish` is deprecated. https://github.com/libarchive/libarchive/wiki/ReleaseNotes#Libarchive_302 If you try to write a program against libarchive, you will get GCC deprecated warnings. Test code: void check_ok (Archive.Result r) throws IOError { if (r == Archive.Result.OK) return; if (r == Archive.Result.WARN) return; throw new IOError.FAILED ("libarchive returned an error"); } int main () { try { var a = new Archive.Read (); check_ok (a.support_filter_all ()); check_ok (a.support_format_all ()); check_ok (a.open_filename ("archive.zip", 10240)); unowned Archive.Entry entry; while (a.next_header (out entry) == Archive.Result.OK) { stdout.printf ("%s\n", entry.pathname ()); a.read_data_skip (); } } catch (IOError e) { stderr.printf (e.message + "\n"); return 1; } return 0; }
Please see https://bugzilla.gnome.org/show_bug.cgi?id=668654#c5 and comment 7 libarchive 4 doesn't seem to be any where on the horizon. As the libarchive release notes say "Some libarchive 2.x APIs have been deprecated; they'll continue to be supported until libarchive users have had plenty of time to migrate to the newer interfaces. (In particular, function names have changed to prefer "free" to "finish", "filter" to "compression", and a few other small adjustments.)"
*** This bug has been marked as a duplicate of bug 795079 ***