pkg_generate_checsum: make it more robust
With some buggy metadata, when parsing the manifest we may end up requesting
to generate the checksum for a package with files informations but no
checksum associated with the files, which mean f->sum would be NULL.
Accept to generate checksum in this case by processing an empty string instead of
crashing because process NULL.
Fixes: #2560
libpkg: improve curl fetch error reporting
Currently all errors that occur in curl_do_fetch() are reported to the
user as "Failed to fetch X: No Error" which is both incorrect and very
unhelpful.
With this patch, the correct error message from libcurl is reported
to the user, for example "Failed to fetch X: Could not resolve hostname"
This patch does not fix all the error handling done by the libcurl
fetching code, but it does fix the case that seems to be most commonly
hit by users.
Closes: https://github.com/freebsd/pkg/issues/2498
Sponsored by: The FreeBSD Foundation
db: replace va_args with type safe arguments
With va_args, we got bitten several times by forgetting to cast to int64_t,
but with this change, that won't happen anymore.
As a bonus, we no longer need to specify types when declaring SQL code.
pkg-triggers.5: Clean up
Rewrite the introductory paragraph to be more clear, and include the
(new) default value of PKG_TRIGGERS_DIR. This also fixes an incorrect
use of .Nm which caused rendering errors.
Copyedit the UCL object definition, and be more explicit about the
type of each key.
Remove a blank line.
compat: .pkg is there for long enough, remove forward compat.
All supported versions of FreeBSD knows how to deal with .pkg files.
Remove the last bits of forward compatibility which create the .t*
symlinks. If one still need this they can do it themselves via a script
post pkg repo.
db: replace va_args with type safe arguments
With va_args, we got bitten several times by forgetting to cast to int64_t,
but with this change, that won't happen anymore.
As a bonus, we no longer need to specify types when declaring SQL code.
pkg-triggers.5: Clean up
Rewrite the introductory paragraph to be more clear, and include the
(new) default value of PKG_TRIGGERS_DIR. This also fixes an incorrect
use of .Nm which caused rendering errors.
Copyedit the UCL object definition, and be more explicit about the
type of each key.
Remove a blank line.