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 668654 - [patch] updated bindings for libarchive
[patch] updated bindings for libarchive
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-25 11:32 UTC by Daniel Pfeifer
Modified: 2016-10-08 19:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.64 KB, patch)
2012-01-25 11:32 UTC, Daniel Pfeifer
needs-work Details | Review
vapi: Update libarchive.vapi to version 3 (7.58 KB, patch)
2014-05-16 09:05 UTC, Lasse Schuirmann
needs-work Details | Review
vapi: Update libarchive.vapi to version 3 (7.13 KB, patch)
2014-05-16 16:40 UTC, Lasse Schuirmann
committed Details | Review
Add ReadDisk to libarchive vapi (1.70 KB, patch)
2014-05-22 18:09 UTC, Lasse Schuirmann
committed Details | Review

Description Daniel Pfeifer 2012-01-25 11:32:16 UTC
Created attachment 206083 [details] [review]
patch

* fixed cname of function Read.read_data_block
* added function Write.set_compression_lzma
* added function Write.set_compression_xz
* added class ReadDisk
Comment 1 Luca Bruno 2012-01-26 16:07:50 UTC
Review of attachment 206083 [details] [review]:

Thanks for the patch. delegate_target_pos must not have the same value for two parameters.
Comment 2 Evan Nemerson 2012-02-04 23:04:25 UTC
We should really support this. Lots of libraries do this...
Comment 3 Lasse Schuirmann 2014-05-16 09:05:20 UTC
Created attachment 276655 [details] [review]
vapi: Update libarchive.vapi to version 3

Good morning,

I am currently writing a libarchive wrapper for gnome boxes. In order to do this I had to update the libarchive.vapi.

This patch also deprecated several methods. This is important since these deprecated methods will disappear from libarchive in version 4.

A word about the wrapper: I have read that there is interest for a vala wrapper for libarchive. I wrote a very minimal one (extracting and modifiyng archves) but I can probably extend it in a few months or so when I have more time so that everyone can profit from my work. Where would this package go?
Comment 4 Luca Bruno 2014-05-16 09:14:16 UTC
Review of attachment 276655 [details] [review]:

Thanks for the patch. Can we keep archive_*_finish instead of archive_*_free?

::: vapi/libarchive.vapi
@@ +163,2 @@
 	[Compact]
+	[CCode (cname="struct archive", free_function="archive_read_free")]

This seems a backward compatibility breakage. Is archive_read_free a new function? In case, please keep archive_write_finish.

@@ +257,3 @@
 	}
 
+	[CCode (cname = "struct archive", free_function="archive_write_free")]

Same here.

@@ +337,2 @@
 	[Compact]
+	[CCode (cname = "struct archive", free_function="archive_write_free")]

Same here.
Comment 5 Lasse Schuirmann 2014-05-16 10:03:35 UTC
The *_finish functions are deprecated and they will be removed in version 4.

(You can see this also in the code, they have:

#if ARCHIVE_VERSION_NUMBER < 4000000
/* Synonym for archive_read_free() for backwards compatibility. */
__LA_DECL int		 archive_read_finish(struct archive *) __LA_DEPRECATED;
#endif

in archive.h)
Comment 6 Lasse Schuirmann 2014-05-16 10:07:37 UTC
Another thing: my patch does not do these issues which the original one does:

> * added class ReadDisk
[...]
> * fixed cname of function Read.read_data_block

(I dont want to take credit for someone elses work so I didnt include his changes.)
Comment 7 Luca Bruno 2014-05-16 16:33:43 UTC
When they get removed, probably there will be another vapi. For now please keep the current functions, otherwise they break backward compatibility.
Comment 8 Lasse Schuirmann 2014-05-16 16:40:57 UTC
Created attachment 276680 [details] [review]
vapi: Update libarchive.vapi to version 3

If you wish so. Here's the patch.
Comment 9 Luca Bruno 2014-05-16 18:16:31 UTC
lethal@lethal:~/projects/vala (master)$ git log
commit b63ed8da54ede17b927f4bd1de641cdbde9f54f9
Author: Lasse Schuirmann <lasse@schuirmann.net>
Date:   Fri May 16 10:54:23 2014 +0200

    libarchive: Update to version 3
    
    Fixes bug 668654

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 10 Zeeshan Ali 2014-05-17 11:37:10 UTC
Comment on attachment 276680 [details] [review]
vapi: Update libarchive.vapi to version 3

Luca, If you use `git bz push` instead of `git push`, it's easy to change patch statuses. :)
Comment 11 Luca Bruno 2014-05-17 15:11:32 UTC
git bz does not work very well with chrome cookies apparently. Also, patches from fixed bugs are not visible in the list of unreviewed patches.
Comment 12 Luca Bruno 2014-05-18 18:29:55 UTC
Sorry I forgot there's another patch in this bug. If you remove the delegate_target_pos 0.9 part I can push it.
Comment 13 Lasse Schuirmann 2014-05-22 18:09:33 UTC
Created attachment 277002 [details] [review]
Add ReadDisk to libarchive vapi
Comment 14 Lasse Schuirmann 2014-05-22 18:10:52 UTC
I can't obsolete the old patch since I am not the author. Please push this change not on my name but Daniel Pfeifer who seems to be the original author of this patch.
Comment 15 Lasse Schuirmann 2015-04-24 15:58:41 UTC
Hi,

I have done the work to update that patch that isn't even mine, could you take a look if its still valid and push it in case its good? (Ping!)
Comment 16 Rico Tzschichholz 2016-10-08 19:32:56 UTC
commit 1eb03e19fa31d98e8b7f83b38790e882c338fccd
Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
Date:   Thu May 22 20:07:21 2014 +0200

    libarchive: Add ReadDisk