Commit Graph

59 Commits

Author SHA1 Message Date
Juan RP
42c0766c00 Get rid of libfetch and proplib external dependencies.
The list of required external deps is now confuse, libarchive and openssl.

libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
2013-06-20 10:26:12 +02:00
Juan RP
9d80524a34 Minor optimization: no need to check if obj is NULL, prop_object_type() does that already. 2013-06-14 12:22:29 +02:00
Juan RP
99be698979 Use a single file to store repository data.
This is just the starting point to extend repositories with PGP signatures.
2013-06-10 10:28:39 +02:00
Juan RP
0a1859987a Respect automatic-install mode from pkgdb in transaction updates.
Also simplify register/unregister and remove useless state definitions.
2013-03-07 10:03:59 +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
eb61aabca8 xbps_remove_pkg: fix a double free. 2013-02-19 14:58:56 +01:00
Juan RP
a8e8e8fd5d xbps_remove_pkg: ignore ELOOP in realpath() when checking symlinks.
Probably it is a broken symlink, so we don't have to care about it.
2013-02-04 16:35:15 +01:00
Juan RP
b5bb1debe4 Partial revert of 5d59a15faf.
Error out if "pre-remove" script action fails, otherwise package is
removed but its files are still there (ouch).
2013-01-14 14:01:35 +01:00
Juan RP
5d59a15faf libxbps: even if executing a pre-remove action fails, continue removing pkg.
This is no reason to stop removing a pkg, so just continue and fully
remove the pkg.
2012-12-29 07:13:49 +01:00
Juan RP
0f22579a34 libxbps: fixed regression executing "pre-remove" action in installed pkgs. 2012-12-28 10:42:13 +01:00
Juan RP
f45352dbf8 Added support for dynamic generation of revdeps for installed packages. 2012-11-30 17:40:52 +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
85c0641cc8 xbps_{configure,remove}_pkg: do not use meta cache when executing scripts.
This fixes executing INSTALL/REMOVE scripts with the right version currently
installed, i.e kernel post-install failed to execute correctly its kernel
hooks due to passing a wrong version.
2012-11-26 23:25:41 +01:00
Juan RP
0edba07106 xbps_remove_pkg: fix dbg printf args. 2012-11-19 14:45:09 +01:00
Juan RP
34ae90f1c3 xbps_remove_pkg: force pkgdb flush after unregister. 2012-11-19 14:40:41 +01:00
Juan RP
5397dd4937 xbps_remove_pkg: handle all cases where pkg meta plist is unavail. 2012-11-19 14:08:01 +01:00
Juan RP
556bbd495e xbps_remove_pkg: recover from an assertion if pkg meta plist doesn't exist. 2012-11-19 13:29:09 +01:00
Juan RP
e08c258967 xbps_remove_pkg: no need to release pkgd from metadir. 2012-11-18 12:06:46 +01:00
Juan RP
b0fab7a3ee Implemented a cache to get pkg dicts from metadir.
This improves xbps-pkgdb -a marginally, but still seems to be a bit slow.
2012-11-16 21:50:52 +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
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
abdf6e710d xbps_remove_pkg: do not pass dangling pointers to state cb after removing pkgdict. 2012-07-04 09:52:51 +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
20bb1af589 xbps_remove_pkg: return proper error if metadata files cannot be removed. 2012-06-09 10:05:29 +02:00
Juan RP
6a4de0127d libxbps: introduce the concept of "soft replace"; see the NEWS file. 2012-05-25 17:24:36 +02:00
Juan RP
d075f7182a When removing pkg files, remove only dangling symlinks after regular files.
This is required for the upcoming eglibc package.
2012-05-25 14:31:42 +02:00
Juan RP
9acec7883b xbps_remove_pkg: do not error out if files.plist not found, just continue. 2012-05-21 23:03:29 +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
6940505de9 regpkgdb rototill: renamed to pkgdb, improve the public API. 2012-01-20 11:10:52 +01:00
Juan RP
a7f3a56e19 Make xbps_(un)register_pkg() accept a boolean arg to flush regpkgdb on success. 2011-12-28 05:57:04 +01:00
Juan RP
9d767f19cb xbps_remove_pkg: issue a XBPS_STATE_REMOVE_FAIL state cb if access(2) failed. 2011-12-24 01:30:57 +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
1a4c13e1bf xbps_remove_pkg: fix path to REMOVE script. 2011-12-16 10:34:05 +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
dcac4ec153 xbps_remove_pkg: only issue XBPS_STATE_REMOVE in no update case. 2011-11-25 15:08:33 +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
ab17573692 Split XBPS_FLAG_FORCE into CONFIGURE and REMOVE_FILES, bump XBPS_API_VERSION. 2011-11-24 11:50:53 +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
Juan RP
9fb3c38aa2 Extend assertions by checking passed in proplib type. 2011-10-19 16:53:38 +02:00
Juan RP
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
Juan RP
508f119bc9 Moved install transaction code to libxbps, see NEWS file. 2011-07-27 17:13:54 +02:00
Juan RP
9673c4bd09 XBPS major changes in June 2011.
- A configuration file "xbps-conf.plist" replaces the (un)register target
  in xbps-repo(8) and (un)set-prop in xbps-bin(8). For now, you can set
  the repositories and prefered virtual packages.

- New package pattern matching code from NetBSD. Supports more ways of
  matching patterns in packages.

- Multiple bugs fixed in virtual packages related matching code.

--HG--
rename : LICENSE => COPYING
2011-06-04 13:37:53 +02:00
Juan RP
841c9e2d51 API/ABI break for June 2011.
Rename some functions to reflect its description a bit better.

--HG--
rename : lib/repository_plist.c => lib/plist_fetch.c
2011-06-01 09:37:32 +02:00
Juan RP
9759a62e3f Do not printf a warning if remove(3) returns EEXIST/ENOTEMPTY/EBUSY. 2011-02-25 10:51:43 +01:00
Juan RP
a306cebc96 xbps_set_pkg_state_installed: added two new optional arguments: version and pkgver.
This can be used to avoid some rare cases where the pkg dictionary is regpkgdb
is in a state where code can be faulty if those objects are not found.
2011-02-22 11:09:39 +01:00
Juan RP
870ad18d58 xbps_init() now sets rootdir, cachedir and flags.
That means that the following functions were removed:
	- xbps_set_{cachedir,flags,rootdir}.
	- xbps_get_{cachedir,flags,rootdir}.

With this change fixed an obvious typo that made -c argument to not work,
and now the cache directory is an absolute path not relative to rootdir.
2011-02-21 17:42:47 +01:00
Juan RP
da607becf9 Make some xbps_warn_printf dependent of XBPS_FLAG_VERBOSE. 2011-01-30 18:38:16 +01:00