Commit Graph

19 Commits

Author SHA1 Message Date
Juan RP
63c1883201 Major API/ABI cleanup bringing performance improvements and fixes.
These are the core interfaces in the new API:

rpool - Interface to interact with the repository pool.
rindex - Interface to interact with repository indexes.
pkgdb - Interface to interact with local packages.
transaction - Interface to interact with a transaction.

This also brings new repository index format, making the index file
per architecture and being incompatible with previous versions.

The transaction frequency flush option has been removed, and due to
the nature of package states it was causing more harm than good.

More changes coming soon, but the API shall remain stable from now on.
2012-11-30 07:11:51 +01:00
Juan RP
bdd93b7aa7 Introduce xbps_pkgdb_get_virtualpkgd() and use in xbps_metadir_get_pkgd(). 2012-11-19 21:46:54 +01:00
Juan RP
f81d8ac1f0 xbps_pkgdb_update: if pkgdb cannot be internalized, create it to simplify code. 2012-11-11 10:03:14 +01:00
Juan RP
d6735d5685 xbps_xasprintf: do not return NULL anymore; remove checks for this. 2012-11-11 09:37:27 +01:00
Juan RP
e3d876ade0 pkgdb: some fixes for e545429fa1. 2012-10-26 11:05:17 +02:00
Juan RP
e545429fa1 pkgdb: if plist from storage and memory do not differ do not flush to storage. 2012-10-26 10:25:14 +02:00
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