GNOME Bugzilla – Bug 668654
[patch] updated bindings for libarchive
Last modified: 2016-10-08 19:33:01 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
Review of attachment 206083 [details] [review]: Thanks for the patch. delegate_target_pos must not have the same value for two parameters.
We should really support this. Lots of libraries do this...
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?
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.
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)
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.)
When they get removed, probably there will be another vapi. For now please keep the current functions, otherwise they break backward compatibility.
Created attachment 276680 [details] [review] vapi: Update libarchive.vapi to version 3 If you wish so. Here's the patch.
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 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. :)
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.
Sorry I forgot there's another patch in this bug. If you remove the delegate_target_pos 0.9 part I can push it.
Created attachment 277002 [details] [review] Add ReadDisk to libarchive vapi
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.
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!)
commit 1eb03e19fa31d98e8b7f83b38790e882c338fccd Author: Daniel Pfeifer <daniel@pfeifer-mail.de> Date: Thu May 22 20:07:21 2014 +0200 libarchive: Add ReadDisk