Commit Graph

78 Commits

Author SHA1 Message Date
310e619ea3 Remove unnecessary variable assignments reported by cppcheck. 2012-11-06 09:28:34 +01:00
03567ecb70 unpack: correctly take into account rootdir while checking symlinks. 2012-10-27 10:36:39 +02:00
978013bfbf unpack: match correctly symlinks with absolute path. 2012-10-27 09:42:26 +02:00
264c704529 unpack: do not use realpath(3) on uninstalled symlinks. 2012-10-27 09:36:28 +02:00
c28f882d5c unpack: misc improvements for previous. 2012-10-26 14:32:04 +02:00
c58ca952a8 unpack: convert printf added in previous to xbps_dbg_printf. 2012-10-26 14:22:18 +02:00
7fdae2d6dc unpack: handle another case of relative symlink. 2012-10-26 14:17:31 +02:00
d31a3d205a unpack: use lstat() for symlinks, respect uid/gid if euid == 0, some fixes. 2012-10-26 11:25:17 +02:00
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
863f12e349 Improved finding obsolete files while upgrading pkgs. 2012-10-24 07:45:00 +02:00
d38dfdd19a libxbps: unpack: before extracting re-set entry_pname. 2012-10-01 16:41:50 +02:00
bdeeaa46b8 libxbps: unpack: simplify file hash matching code. 2012-09-30 17:07:51 +02:00
9c15f103e1 lib/package_unpack: simplify and externalize pkg's plists uncompressed. 2012-09-29 20:49:51 +02:00
2f13afe7a6 lib/package_unpack.c: fixed build error caused by cherry-pick conflict. 2012-09-29 19:18:32 +02:00
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
a756060d38 libxbps: [unpack] fixed passing dangling pointer to unpack cb. 2012-07-21 10:41:19 +02:00
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
412d4b7280 libxbps: switch to archive_read_{close,free}. 2012-06-12 22:22:46 +02:00
a00a450fe0 unpack: make sure to use exact file when checking for hash matches. 2012-06-05 20:23:12 +02:00
cc30039c60 xbps_unpack_binary_pkg: handle ARCHIVE_{EOF,FATAL,RETRY} and use archive_read_{close,free}. 2012-06-05 16:46:50 +02:00
e9945dc345 Before unpacking pkg files always remove INSTALL/REMOVE scripts (if they exist). 2012-06-04 14:14:46 +02:00
c93d1637ae lib/package_unpack.c: remove dead assignments found by clang-analyzer. 2012-05-30 14:22:16 +02:00
f7f4e0bec0 Extend 'soft replace' and also remove obsolete files. 2012-05-25 22:44:58 +02:00
5e0b06dc00 xbps-bin: improve def unpack cb to print more meaningful messages. 2012-05-06 16:48:47 +02:00
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
06745b70ae Fixed issue 22: always set perms from binpkg to existing files while unpacking. 2012-03-07 12:00:08 +01:00
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
c965c27dfb Skip removing obsolete files in some cases. 2012-02-20 20:23:33 +01:00
d075411049 Improve API documentation round 1. 2012-01-20 12:17:27 +01:00
6940505de9 regpkgdb rototill: renamed to pkgdb, improve the public API. 2012-01-20 11:10:52 +01:00
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
39d064aff8 xbps_unpack_binary_pkg: handle EPERM more efficiently. 2011-12-24 12:07:30 +01:00
3b7491d29b Merged purge code in remove, configurable transaction regpkgdb flushing.
See the NEWS file for info.
2011-12-24 01:05:26 +01:00
5a892023f4 Be a bit more paranoid by checking allocs and expected types. 2011-12-22 08:23:11 +01:00
c40c40e08e Always preserve current conffiles while installing new packages. 2011-12-19 11:20:27 +01:00
70e95786dc libxbps: pass xhp->conffile as last argument when execing INSTALL/REMOVE scripts. 2011-12-15 12:24:59 +01:00
b0ceeaa58e New configuration file via confuse: xbps.conf. 2011-12-15 11:19:20 +01:00
f3099fa2c6 Added success states for state_cb, move some descriptions to the client cb. 2011-11-25 09:44:49 +01:00
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
e46dd09127 Faster binary package unpacking, see the NEWS file for info. 2011-11-09 21:01:25 +01:00
858e616f41 libxbps: preserve config file if they exist for replaced pkgs. 2011-10-30 10:32:56 +01:00
9fb3c38aa2 Extend assertions by checking passed in proplib type. 2011-10-19 16:53:38 +02:00
5642ffa86e New configuration scheme changes, round 1.
- Configuration file 'xbps-conf.plist' has been splitted off into
  two files: conf.plist and repositories.plist. By default they
  are stored in etc/xbps.
- Changed some members in xbps_handle struct, mostly to make it easy
  to change its value in {cache,root}dir and conffile.
- Made xbps_init() release proplib objects as soon as we don't need
  them, that way it uses 35% less of memory or in some cases even more.

There will be another commit that will implement to read new virtualpkg
settings by the user, as specified in:

	http://code.google.com/p/xbps/issues/detail?id=12
2011-10-17 12:37:15 +02:00
ba5913cbb9 libxbps: [unpack] only extract files if they have been modified. 2011-08-01 12:35:47 +02:00
890bdd368f xbps_unpack_binary_pkg: remove redudant error printf, cosmetic changes. 2011-07-29 23:28:36 +02:00
5e390b8839 Introduce new pkg state: half-unpacked.
Packages in this state shall be re-installed and re-unpacked because its
files weren't unpacked properly.
2011-07-28 16:25:01 +02:00
508f119bc9 Moved install transaction code to libxbps, see NEWS file. 2011-07-27 17:13:54 +02:00
900e35a15e xbps_unpack_binary_pkg: printf existents entries iff XBPS_FLAG_VERBOSE is set. 2011-07-05 17:47:37 +02:00
979c585652 Preserve files on disk while installing a binary package.
While installing packages, if any file that is going to be unpacked
exists on disk don't remove it. Always preserve them to avoid missing
files on currently installed package if there are file conflicts.
2011-07-03 17:12:02 +02:00
fe2bbb675f xbps_unpack_binary_pkg: fix previous and also handle ERANGE after unlink. 2011-06-25 18:19:56 +02:00