Subpackages without main package installed wasn't reported
at all. This can produce duplicates in output, but checkvers'
output isn't good to loop over without passing through
./xbps-src sort-dependencies anyway.
Closes: #404 [via git-merge-pr]
It should be HAVE_HUMANIZE_NUMBER instead of HAVE_HUMANIZE_HUMBER, from
the name of humanize_number(3).
It's mispelt only in this file, the configure script gets it correctly.
Closes: #334 [via git-merge-pr]
Using fmemopen here wasn't necessary, since memcpy could have been used
with way lower overhead. We don't use a dedicated function, because
turning a data field into a string is an inefficient operation and
shouldn't be encouraged.
Also don't initialize data when it's declared, it isn't necessary.
- use less intermediate variables
- assert that archive_read_new managed to allocate memory for itself:
not ideal, but if we ever want to move from assertions it shows us
where we need to change things
- use libarchive's archive_error_string for better error messages
Closes: #345 [via git-merge-pr]
HTTP connections are cached for performance, but they end up being
leaked when running configure scripts. To avoid this, close the
connection cache after all downloads are finished.
Closes: #326 [via git-merge-pr]
Both CFLAGS and LDFLAGS need to be passed during linkage as CFLAGS may
contain things that influence linkage (e.g. ssp_nonshared may be
necessary to link when using strong stack protector).
Pointed out by q66.
Closes: #330 [via git-merge-pr]
The HTTP_REDIRECT() macro already included this case, but the
switch-case with the return value of http_get_reply(conn) didn't. This
made it so that a server returning HTTP_TEMP_REDIRECT (307) would
generate a failure, unless libfetch was used in verbose mode, in which
case the headers would be parsed (in order to report errors), then the
'Location' header would be found and a new connection would be made.
Fixes#348
Initializing structs with '{}' is supported on most compilers, but not
defined in the standard. The correct initializer for this is '{0}'.
Spotted with cproc.
The width of unsigned long matching the width of a pointer isn't
guaranteed by any standard, though it is a requirement of the Linux
syscall API. Using uintptr_t directly is always correct.
This reverts commit be7d8cfaf1.
This commit missed some previous copyrights mentioned,
in general I think its better to have this per-file to
follow who wrote what and when.
- Added transaction stats for pkgs on hold.
- Always add packages on hold to the transaction dictionary,
its type will be set to XBPS_TRANS_HOLD.
- Changed xbps_transaction_update_pkg() to have a new "force"
bool argument to force an update with a pkg on hold.
- As discussed in #274 with @Duncaen the only way to update a
pkg on hold is by using `-f`, i.e `xbps-install -f foo`.
Closes#265Closes#274
I noticed that while updating a pkg that is on hold
or in repolock mode, does not keep those properties.
Always set those props in the new pkg dictionary to respect
this behaviour. If there's a pkg on hold and you update it,
you want to keep it in this state unless you tell it to change.
Added new test case to verify.