After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771916 - libarchive.vapi: archive_read_finish is deprecated
libarchive.vapi: archive_read_finish is deprecated
Status: RESOLVED DUPLICATE of bug 795079
Product: vala
Classification: Core
Component: Bindings
0.32.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-24 13:38 UTC by Jens Mühlenhoff
Modified: 2018-04-22 19:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jens Mühlenhoff 2016-09-24 13:38:08 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;
}
Comment 1 Al Thomas 2016-09-24 15:05:59 UTC
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.)"
Comment 2 Rico Tzschichholz 2018-04-22 19:24:45 UTC

*** This bug has been marked as a duplicate of bug 795079 ***