Commit Graph

557 Commits

Author SHA1 Message Date
Juan RP
974b2fe8ad libxbps: simplify pkgdb_get_pkgd and find_pkg_dict_installed internals.
There's no need to prop_dictionary_copy the returned dictionary to
later have to free it again, just return directly the dictionary and
avoid the free(3)s.
2012-06-16 09:02:07 +02:00
Juan RP
068cab8d20 libxbps: performance improvements by caching the most accessed paths.
1- We can cache the result of the first xbps_pkgdb_init() when it fails
   and avoid the malloc/free/access from it.
2- We cache the uname(2) result into a private var in xbps_handle and
   use it in xbps_pkg_arch_match().

This improves performance by ~5% approx and it's close as it was before
introducing the repository index format 1.5.
2012-06-15 15:33:11 +02:00
Juan RP
506625a716 libxbps: also match vpkgs in previous commit. 2012-06-14 12:12:05 +02:00
Juan RP
302b216d8d libxbps: do not add dups to transaction dictionary due to virtual pkgs. 2012-06-14 11:53:27 +02:00
Juan RP
3e9e87fc2a libxbps: require a pointer to xbps_handle in functions that need it.
This removes 2 global vars from lib/initend.c and easier to know
what functions require access to xbps_handle.
2012-06-14 08:22:11 +02:00
Juan RP
a3adbcda95 libxbps: use prop_array_get_cstring_nocopy(). 2012-06-13 09:23:48 +02:00
Juan RP
412d4b7280 libxbps: switch to archive_read_{close,free}. 2012-06-12 22:22:46 +02:00
Juan RP
c61ba8dfcc Added support for package conflicts. 2012-06-11 16:14:03 +02:00
Juan RP
81610697df xbps_transaction_install_pkg: proper pkg find order in rpool.
Previously it was preferring virtual packages from
configuration file before real packages.
2012-06-09 10:09:46 +02:00
Juan RP
20bb1af589 xbps_remove_pkg: return proper error if metadata files cannot be removed. 2012-06-09 10:05:29 +02:00
Juan RP
e75a524ee3 xbps_transaction_install_pkg: on exact match properly detect if it's installed. 2012-06-05 22:54:46 +02:00
Juan RP
efefa000b2 xbps_dictionary_metadata_plist_by_url: only accept exact matches. 2012-06-05 20:53:15 +02:00
Juan RP
a0f91f3342 xbps_file_hash_check_dictionary: fixed for rootdir != /. 2012-06-05 20:51:00 +02:00
Juan RP
a00a450fe0 unpack: make sure to use exact file when checking for hash matches. 2012-06-05 20:23:12 +02:00
Juan RP
84c6850c28 xbps_file_hash_dictionary: only process exact matches. 2012-06-05 20:22:47 +02:00
Juan RP
cc30039c60 xbps_unpack_binary_pkg: handle ARCHIVE_{EOF,FATAL,RETRY} and use archive_read_{close,free}. 2012-06-05 16:46:50 +02:00
Juan RP
c37026d4c6 libxbps: require an underscore in strings to detect correctly pkgname/version. 2012-06-05 10:58:39 +02:00
Juan RP
9441f9f14b libxbps: multiple random changes for overall performance increase. 2012-06-04 23:22:33 +02:00
Juan RP
fa73de309f libxbps: remove xbps_find_pkg_dict_from_plist_by_xxx (unused). 2012-06-04 21:34:21 +02:00
Juan RP
e9945dc345 Before unpacking pkg files always remove INSTALL/REMOVE scripts (if they exist). 2012-06-04 14:14:46 +02:00
Juan RP
7265ea0e4e trans: do not increase download_size if binpkgs are in local repos. 2012-06-04 10:09:46 +02:00
Juan RP
34c1269504 Fixed installing exact pkg versions on pkgs with hyphens, we use equal sign as delimiter now. 2012-06-03 07:26:48 +02:00
Juan RP
f9c72e1d06 xbps_transaction_install_pkg: properly fix previous commit. 2012-06-02 17:39:36 +02:00
Juan RP
bd3a8982cc xbps-bin: added support to install exact pkg version, i.e 'foo-1.0'. 2012-06-02 17:35:21 +02:00
Juan RP
40864bcdce Improve xbps_transaction_update_pkg/packages and misc cosmetic changes. 2012-06-02 16:52:01 +02:00
Juan RP
c7e4630056 xbps_rpool_sync: ignore fetch errors, they will be reported by state_cb. 2012-06-01 16:04:47 +02:00
Juan RP
642e6fca3a xbps_rpool_sync: also fetch repository files index, removed accidently in previous. 2012-06-01 15:45:49 +02:00
Juan RP
981b13bd5a xbps-repo: 'sync' and 'pkg-list' target now accept a repository URI argument.
If set, only the matching repository will be used for the task.
2012-06-01 15:02:06 +02:00
Juan RP
652e9afcef libxbps: fixed xbps_remove_pkg_from_array_by_{name,pattern,pkgver}.
The correct index wasn't being passed to prop_array_remove.
2012-06-01 10:53:28 +02:00
Juan RP
7289547432 Welcome "repository index format 1.5". See NEWS for information. 2012-05-31 16:29:56 +02:00
Juan RP
1bfb1ae028 libxbps: move xbps_pkgpattern_match to util.c and simplify. 2012-05-30 22:38:35 +02:00
Juan RP
27aacf97f4 xbps_file_exec: simplify and don't chroot when rootdir == /.
Before that change we were chroot(2)ing even when rootdir was set to /.
2012-05-30 17:44:39 +02:00
Juan RP
a94dd5dbfa Revert "libxbps: implement xbps_file_exec() with posix_spawn()."
This reverts commit 5aa05f4c72.
2012-05-30 17:26:25 +02:00
Juan RP
5aa05f4c72 libxbps: implement xbps_file_exec() with posix_spawn(). 2012-05-30 14:45:47 +02:00
Juan RP
c93d1637ae lib/package_unpack.c: remove dead assignments found by clang-analyzer. 2012-05-30 14:22:16 +02:00
Juan RP
f40759aabe libxbps: use same order strategy when checking for deps queued in transaction. 2012-05-30 12:54:28 +02:00
Juan RP
922ee1f1b6 libxbps: rename xbps_repository_pool_xxx to xbps_rpool_xxx. 2012-05-30 10:56:32 +02:00
Juan RP
da4b8b7427 rpool: improve the order while resolving dependencies.
See the NEWS file for more information. After that change you don't have
to set a virtual pkg in conf file, if required virtual pkg is in rpool.
2012-05-30 10:22:53 +02:00
Juan RP
f7f4e0bec0 Extend 'soft replace' and also remove obsolete files. 2012-05-25 22:44:58 +02:00
Juan RP
da9b6774c3 Fix previous: propagate "softreplace" obj to pkg being replaced. 2012-05-25 17:58:36 +02:00
Juan RP
6a4de0127d libxbps: introduce the concept of "soft replace"; see the NEWS file. 2012-05-25 17:24:36 +02:00
Juan RP
d075f7182a When removing pkg files, remove only dangling symlinks after regular files.
This is required for the upcoming eglibc package.
2012-05-25 14:31:42 +02:00
Juan RP
9acec7883b xbps_remove_pkg: do not error out if files.plist not found, just continue. 2012-05-21 23:03:29 +02:00
Juan RP
28767f2ea8 Added support to put packages "on hold". 2012-05-08 09:19:43 +02:00
Juan RP
5e0b06dc00 xbps-bin: improve def unpack cb to print more meaningful messages. 2012-05-06 16:48:47 +02:00
Juan RP
bbd0d893d0 xbps_repository_sync_index: print the plist file being downloaded in cb. 2012-05-06 09:10:25 +02:00
Juan RP
8a4b143bf3 Show a proper error message if download of a binpkg fails in a transaction. 2012-05-06 09:09:09 +02:00
Juan RP
934bc4869e rpool: make xbps_handle::repo_pool array immutable after initialization. 2012-04-13 10:06:08 +02:00
Juan RP
8b2c4ed47e xbps_dictionary_from_metadata_plist: if vpkg not found, look for a real pkg. 2012-04-13 09:23:35 +02:00
Juan RP
83bda174ab libxbps: make xbps_find_virtualpkg_* only look for virtual pkgs.
Before this commit they also looked for non virtual packages, which
is not what it was meant when those functions were added.
2012-04-12 11:57:21 +02:00