Commit Graph

89 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
5de4fb1f0a xbps-install: -f will also overwrite pkg files. 2012-11-19 20:50:58 +01:00
Juan RP
6094bbc6ea pkg_metadir: fix some issues I've found while finding obsolete files. 2012-11-18 12:07:43 +01:00
Juan RP
fcdb6b0930 unpack: use pkg dictionary from metadir to find obsoletes! 2012-11-17 15:14:11 +01:00
Juan RP
34bd49f85a New pkg metadata structure for 0.18. See the NEWS file for info. 2012-11-16 16:55:35 +01:00
Juan RP
db4b542d40 unpack: typo in previous. 2012-11-15 09:27:41 +01:00
Juan RP
ce2f45a3df unpack: don't extract pkg props.plist, we use pkg data from repo index. 2012-11-15 09:25:31 +01:00
Juan RP
ce3d4f1764 unpack: externalize pkg props dictionary from index. 2012-11-13 14:41:04 +01:00
Juan RP
4945755d53 unpack: don't assert if target file of a symlink doesn't exist, it may happen. 2012-11-12 17:10:02 +01:00
Juan RP
df0d5d7330 Get rid of pkg state half-unpacked; not-installed state is good enough. 2012-11-11 09:42:30 +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
310e619ea3 Remove unnecessary variable assignments reported by cppcheck. 2012-11-06 09:28:34 +01:00
Juan RP
03567ecb70 unpack: correctly take into account rootdir while checking symlinks. 2012-10-27 10:36:39 +02:00
Juan RP
978013bfbf unpack: match correctly symlinks with absolute path. 2012-10-27 09:42:26 +02:00
Juan RP
264c704529 unpack: do not use realpath(3) on uninstalled symlinks. 2012-10-27 09:36:28 +02:00
Juan RP
c28f882d5c unpack: misc improvements for previous. 2012-10-26 14:32:04 +02:00
Juan RP
c58ca952a8 unpack: convert printf added in previous to xbps_dbg_printf. 2012-10-26 14:22:18 +02:00
Juan RP
7fdae2d6dc unpack: handle another case of relative symlink. 2012-10-26 14:17:31 +02:00
Juan RP
d31a3d205a unpack: use lstat() for symlinks, respect uid/gid if euid == 0, some fixes. 2012-10-26 11:25:17 +02:00
Juan RP
4023c8115b unpack: improvements to handle more cases of modified files.
- Do not unpack unmodified symlinks.
- Do not unpack files that only differ in mode, just chmod(2) new perms.
- Do not create pkg's metadata dir if this already exists.
2012-10-26 10:27:24 +02:00
Juan RP
863f12e349 Improved finding obsolete files while upgrading pkgs. 2012-10-24 07:45:00 +02:00
Juan RP
d38dfdd19a libxbps: unpack: before extracting re-set entry_pname. 2012-10-01 16:41:50 +02:00
Juan RP
bdeeaa46b8 libxbps: unpack: simplify file hash matching code. 2012-09-30 17:07:51 +02:00
Juan RP
9c15f103e1 lib/package_unpack: simplify and externalize pkg's plists uncompressed. 2012-09-29 20:49:51 +02:00
Juan RP
2f13afe7a6 lib/package_unpack.c: fixed build error caused by cherry-pick conflict. 2012-09-29 19:18:32 +02:00
Juan RP
0f17197627 libxbps: use a struct allocated from stack for the unpack cb.
(cherry picked from commit a658586f27fd0a0c2c78ea96f89b54055e1e73be)
2012-09-29 19:00:04 +02:00
Juan RP
a756060d38 libxbps: [unpack] fixed passing dangling pointer to unpack cb. 2012-07-21 10:41:19 +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
412d4b7280 libxbps: switch to archive_read_{close,free}. 2012-06-12 22:22:46 +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
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
e9945dc345 Before unpacking pkg files always remove INSTALL/REMOVE scripts (if they exist). 2012-06-04 14:14:46 +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
f7f4e0bec0 Extend 'soft replace' and also remove obsolete files. 2012-05-25 22:44:58 +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
ef6d1adf91 xbps_set_pkg_state_installed: simplify (API change).
The third optional argument "pkgver" clearly is useless because we can
create it internally with "pkgname" and "version" arguments instead.

Also make the "version" argument mandatory.
2012-04-10 09:43:59 +02:00
Juan RP
06745b70ae Fixed issue 22: always set perms from binpkg to existing files while unpacking. 2012-03-07 12:00:08 +01:00
Juan RP
001947d9bb Only enable support for gzip, bzip2 and xz compression formats.
After looking at profiling output I saw that a not so small of time spent
was in libarchive trying to know if archive is zip compressed... so
I've enabled the three compression formats supported by xbps-src.
2012-02-22 04:16:36 +01:00
Juan RP
c965c27dfb Skip removing obsolete files in some cases. 2012-02-20 20:23:33 +01:00
Juan RP
d075411049 Improve API documentation round 1. 2012-01-20 12:17:27 +01:00
Juan RP
6940505de9 regpkgdb rototill: renamed to pkgdb, improve the public API. 2012-01-20 11:10:52 +01:00
Juan RP
f2b05d6438 Improved pkg best matching in rpool, and support for exact pkgver matches.
- xbps_repository_pool_find_pkg in best match case, now returns the
  newest package version available in rpool.
- Added xbps_repository_pool_find_pkg_exact that returns a package
  by exact matching a pkgver.
- Removed xbps_handle_alloc(), the user is free to use memory
  allocated from heap or stack.
- Improved API documentation in preparation for 0.12.

Bumped XBPS_API_VERSION again.
2012-01-17 16:17:03 +01:00
Juan RP
39d064aff8 xbps_unpack_binary_pkg: handle EPERM more efficiently. 2011-12-24 12:07:30 +01:00
Juan RP
3b7491d29b Merged purge code in remove, configurable transaction regpkgdb flushing.
See the NEWS file for info.
2011-12-24 01:05:26 +01:00
Juan RP
5a892023f4 Be a bit more paranoid by checking allocs and expected types. 2011-12-22 08:23:11 +01:00
Juan RP
c40c40e08e Always preserve current conffiles while installing new packages. 2011-12-19 11:20:27 +01:00
Juan RP
70e95786dc libxbps: pass xhp->conffile as last argument when execing INSTALL/REMOVE scripts. 2011-12-15 12:24:59 +01:00
Juan RP
b0ceeaa58e New configuration file via confuse: xbps.conf. 2011-12-15 11:19:20 +01:00
Juan RP
f3099fa2c6 Added success states for state_cb, move some descriptions to the client cb. 2011-11-25 09:44:49 +01:00
Juan RP
3ccfec7054 Improved callback/states support to make libxbps std{err,out} printf free.
This is a major API/ABI change, documentation has been updated accordingly.
2011-11-24 11:23:08 +01:00