Commit Graph

13 Commits

Author SHA1 Message Date
Juan RP
092be04783 pkgdb: flush uncompressed pkgdb for performance reasons. 2012-09-29 20:28:39 +02:00
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
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
7289547432 Welcome "repository index format 1.5". See NEWS for information. 2012-05-31 16:29:56 +02:00
Juan RP
732ce45b86 libxbps: new function xbps_pkgdb_get_pkgd_by_pkgver().
Finds a pkg dictionary in pkgdb by matching its pkgver object.
2012-04-05 10:57:15 +02:00
Juan RP
9bada162a1 New "metadir" member in xbps_handle to override default metadata dir. 2012-03-13 10:22:35 +01:00
Juan RP
a166d6a2a3 Simplify xbps_transaction_prepare()/commit() and related API changes.
- xbps_handle::transd -> new member with transaction dictionary.
- xbps_transaction_prepare: returns an int.
- xbps_transaction_commit: doesn't need any arg now.
- xbps_repository_pool_sync: doesn't need any arg now.
- xbps_pkgdb_update: removed xbps_handle * arg.
- xbps_transaction_missingdeps_get: removed, missing_deps array is in
  xbps_handle::transd("missing_deps") array object.
2012-01-22 10:00:46 +01:00
Juan RP
38db570c19 pkgdb: foreach_xxx_pkg_cb -> foreach_xxx_cb. 2012-01-21 10:30:20 +01:00
Juan RP
8c8273d3ed pkgdb: update copyright year, shorter conditional. 2012-01-20 18:37:08 +01:00
Juan RP
99f5549a29 xbps_pkgdb_replace_pkgd: fix bool vs int confusion in returned value. 2012-01-20 12:38:24 +01:00
Juan RP
d075411049 Improve API documentation round 1. 2012-01-20 12:17:27 +01:00
Juan RP
8d23ace0da Rename lib/regpkgdb_dictionary.c to lib/pkgdb.c. 2012-01-20 11:12:53 +01:00