Enno Boland
7485659687
libxbps: use strlcpy instead of strncpy
2014-05-13 11:58:51 +02:00
Enno Boland
295cfcea76
libxbps: insert space after conditionals
2014-05-13 11:44:49 +02:00
Enno Boland
152ec0354f
libxbps: file including in xbps.conf supports relative paths.
2014-05-13 11:37:09 +02:00
Juan RP
4070255529
pkgdb: added "repository-origin" obj to know its origin repository.
2014-05-11 10:03:17 +02:00
Juan RP
1e273bf575
lib/initend.c: move prototype to the correct place.
2014-05-06 10:21:44 +02:00
Juan RP
42a569b05c
lib/initend.c: add Enno Boland to copyright.
2014-05-06 09:29:26 +02:00
Enno Boland
e5d64d6319
lib/initend.c: include now supports file globbing.
2014-05-05 23:10:18 +02:00
Juan RP
96778da60c
libxbps: detect and fix pkgs that depend on itself.
2014-04-20 18:17:23 +02:00
Juan RP
bb491e2667
libxbps: detect and ignore incorrect deps of a pkg if those are virtual pkgs.
2014-04-20 16:54:50 +02:00
Juan RP
dacbb2f22f
Fixed some warnings reported by clang.
2014-04-20 10:02:54 +02:00
Juan RP
ada3483acc
lib/repo.c: fix two memleaks in error paths found by clang.
2014-04-19 16:07:29 +02:00
Juan RP
4bc6ba2b1c
lib/package_configure.c: fix use-after-free reported by clang.
2014-04-19 15:49:02 +02:00
Juan RP
4530c79bb2
Make sure that root symlinks in void are never removed or detected as obsoletes.
...
Added/improved test cases to detect those conditions work as expected.
2014-03-31 10:16:18 +02:00
Juan RP
d0a9bbb912
Fix #34 (make libfetch always add "Accept: */*" in the HTTP header).
2014-03-18 14:08:40 +01:00
Juan RP
d01d2edf5b
Optimize most common path when resolving package dependencies.
...
Before that change the code would do the following:
1- if dependency is installed, continue
2- if dependency is queued, continue
3- get dependency from repos
After that change the code does this:
1- if dependency is queued, continue
2- if dependency is installed, continue
3- get dependency from repos
So the dependency is checked if it has been queued as the first phase, which
seems to be the most common path in most cases.
2014-03-16 18:08:59 +01:00
Juan RP
cbbdc4c8bc
xbps_configure_pkg: try to use pkgname if possible to configure a pkg.
...
In pwwka's case for some reason the transaction was trying to configure
'man-pages-3.62_1' while in pkgdb there was only 'man-pages-3.55_1'.
By using the pkgname the pkg stored in pkgdb will be configured, without
caring what version it is.
2014-03-13 21:28:31 +01:00
Juan RP
56786ed315
xbps_remove_pkg: misc debugging tweaks.
2014-03-13 21:07:44 +01:00
Juan RP
67b5ba0dc3
xbps_transaction_commit: add some more debugging.
2014-03-13 20:49:54 +01:00
Juan RP
62888d3103
xbps_transaction_commit: add some debugging in error paths.
2014-03-13 20:35:26 +01:00
Juan RP
ef3b6278a6
Added support to pass native machine architecture to pkg scripts (6th arg).
2014-03-12 10:16:37 +01:00
Juan RP
51bdbe41ac
lib/initend.c: ignore -Wformat-nonliteral with clang.
2014-03-11 09:28:50 +01:00
Juan RP
ed4a33e4d0
xbps_pkgdb_init: initialize xhp->pkgdb_plist if it wasn't before.
2014-03-04 14:59:58 +01:00
Juan RP
0416b067d0
Use a POSIX lock for pkgdb and only issue pkgdb writes in exact points.
...
- Rather than using a POSIX named semaphore use a POSIX lock (lockf(3))
for pkgdb for writers. Writers that cannot acquire the pkgdb lock will
get EAGAIN rather then being blocked.
- Due to using a file lock we cannot write the pkgdb every time a package
is being unpacked, configured or removed. Instead pkgdb is only written
at the end of a specific point in the transaction (unpack, configure, remove)
or via xbps_pkgdb_unlock().
2014-03-04 14:37:10 +01:00
Enno Boland
59ee6b6733
Adding xbps_fetch_file_dest().
...
This function is similiar to xbps_fetch_file(). In contrast to xbps_fetch_file()
xbps_fetch_file_dest has an extra paramenter which allow to define an output file
for the request.
2014-03-04 14:19:52 +01:00
Juan RP
f20694a5bf
xbps_entry_install_conf_file: use archive_entry_copy to set new entry pathname.
2014-03-04 09:44:58 +01:00
Juan RP
9101241b20
Fix pkg symlink removal introduced in the two phase package removal feature.
2014-02-26 10:05:19 +01:00
Juan RP
8c47021ec3
Fix #31 and add new test case to reproduce it.
2014-02-25 22:55:39 +01:00
Juan RP
a511292316
lib/plist_find.c: do not return a false positive while matching vpkgs.
2014-02-25 18:43:33 +01:00
Juan RP
f74bf1c1c8
New custom configuration file format that does not need confuse.
2014-02-25 16:42:52 +01:00
Juan RP
1ad01b952a
xbps_transaction_commit: reset var value if binpkg/signature was downloaded successfully.
2014-02-24 11:35:28 +01:00
Juan RP
4d38311fbe
xbps_configure_pkg: show/return proper return value in an error path.
2014-02-23 10:32:21 +01:00
Juan RP
4d1cdcac0c
Fix concurrency issues in pkgdb: only allow 1 write transaction at the same time.
...
This implementation relies on a POSIX named semaphore, which is also
required by xbps-rindex(8).
2014-02-23 08:23:14 +01:00
Juan RP
187d635447
xbps_transaction_commit: return error if downloading binpkg/signature fails.
2014-02-23 08:15:32 +01:00
Juan RP
2fa0d56658
Fixed a xbps_pkgpattern_name() crash and a test to reproduce it (found by Gottox).
2014-02-15 01:26:42 +01:00
Juan RP
596a8c199f
Improve two phase pkg removal: do the check for all entry types.
2014-02-09 12:53:15 +01:00
Juan RP
61fa9b8c7e
Improve package removal by using a two phase approach: check and removal.
2014-02-09 11:54:49 +01:00
Juan RP
27f7bbd44d
xbps_verify_file_signature: there's no repo->hexfp anymore, compute it instead.
2014-01-30 19:34:26 +01:00
Juan RP
3405866ae2
lib/repo_pkgdeps.c: check correctly for errno after our call, not after free(3).
...
The issue was that xbps_pkgdb_get_pkg() did not find any package,
and the code was free(3)ing heap allocated memory before checking for
errno. I suspect that free(3) has touched errno and this errno value
has been propagated to the next code.
Found after a bit of testing on repo.voidlinux.eu.
2014-01-30 17:47:59 +01:00
Juan RP
d08e76a386
Keep repo metadata if possible when updating repodata (xbps-rindex -a/-c).
...
API/ABI incompat changes, you've been warned.
2014-01-30 13:07:34 +01:00
Juan RP
fb5fb91fa3
lib/transaction_commit.c: fix a double free (reported by Hanspolo).
2014-01-28 20:51:57 +01:00
Juan RP
c03505b13e
Fix #30 (segment fault in xbps-rindex)
2014-01-22 11:53:08 +01:00
Juan RP
e9bc52a01b
Fix #28 (Verification fails due to missing signature).
2014-01-21 10:06:48 +01:00
Juan RP
5eea259c13
Remove the config.h kludge and override vasprintf detection via HAVE_VASPRINTF.
2014-01-20 18:50:33 +01:00
Juan RP
16fc064aef
Remove obsolete files also on package reinstalls (and downgrades).
2014-01-15 21:52:35 +01:00
Juan RP
6943eedd26
Partial revert of 36adf15
(lib code is not yet ready).
2014-01-15 21:03:53 +01:00
Juan RP
36adf15c6b
tests: new test to verify obsolete files code works in updates and reinstalls.
2014-01-15 20:59:49 +01:00
Juan RP
98a3723902
Respect installation mode also on reinstall (and downgrade).
2014-01-15 16:17:41 +01:00
Juan RP
292be5c420
Make sure that all symlinks in a package are removed, not just dangling symlinks.
2014-01-12 17:10:07 +01:00
Juan RP
804a39c63b
Added XBPS_ARCH environment var to override uname(2) machine result.
2014-01-09 11:41:25 +01:00
Juan RP
ae81cd1ea9
lib/initend.c: define _BSD_SOURCE for strlcpy() with musl.
2014-01-07 21:20:42 +01:00