I'm planning to do some cleanup by time to time sending small patches on
pkg_install. My very first goal is to remove most of the system call, and to
understand the way the code works, not to rewrite everything.
Here is the first patch :
- modification of the unpack function to use libarchive to extract data
- it does not modify the way things works: it does exactly the same thing
without the system call
- I also removed two unused function from lib/file.c
It is my first patch for src, I don't know the good process for that.
Hope to send more patches soon.
This is not another attempt to rewrite pkgtools, I just want to improve them the
time that people working on the different rewrites finish their work.
the patch is join to this mail, or can be found at the following link:
http://etoilebsd.net/~bapt/pkgtools-libarchive-patch1.patch
regards
Bapt
This is great! It's good to see somebody taking this on.
If you get no response within the next day or two, please submit this as
a PR (using either send-pr or the web form) - so that this does not get
lost.
Thanks,
Gavin
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"
Great!
This looks good, but I have a few suggestions:
You should be a little more careful about error handling.
In particular, after any failure, archive_error_string(a)
will hold an error message that you probably want to
print out for the user's benefit.
In particular, you should print the error message
after a failure of archive_read_open_filename(),
archive_read_extract(), or archive_read_next_header().
You can also simplify slightly by omitting calls to
archive_read_data_skip() (it's never needed).
Tim