Commit Graph

98 Commits

Author SHA1 Message Date
Juan RP
bcae7e83aa lib/package_unpack.c: pass pkgver to xbps_pkg_exec_buffer() not pkgname. 2013-03-07 12:01:07 +01:00
Juan RP
7e2d5344d3 lib/package_unpack.c: pass correct number of args to xbps_set_cb_state(). 2013-03-07 11:52:47 +01:00
Juan RP
e36bedb036 Fix regressions in xbps_unpack_binary_pkg(). 2013-03-05 06:42:25 +01:00
Juan RP
7c1a0ac3e8 New pkgdb (0.21) and repo index (1.7) format, see NEWS for info. 2013-03-05 04:08:42 +01:00
Juan RP
e525e2c251 Drop posix_fadvise(3) completely before unpacking.
Some systems with small memory might fail to make the preallocation,
as seen in the rpi. It doesn't give us too much gain anyway.
2013-02-20 12:59:11 +01:00
Juan RP
d8769c4873 Workaround fix for 'xbps-install -yf xbps <-> xbps-git'. 2013-02-05 12:10:24 +01:00
Juan RP
5c1688944d xbps-install: make -f preserve conf files; use it twice to overwrite all files. 2013-02-02 11:30:42 +01:00
Juan RP
b75cd05c37 Use posix_fadvise(2) only if it's available. 2012-12-15 10:47:30 +01:00
Juan RP
5dab658d09 xbps_unpack_binary_pkg: use posix_fadvise(2). 2012-12-15 09:51:44 +01:00
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