Commit Graph

24 Commits

Author SHA1 Message Date
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
d7a32a7eca Introduce regpkgdb_foreach_reverse_pkg_cb, switch to regpkgdb_foreach_xxx. 2011-12-23 08:16:25 +01:00
Juan RP
b232ca1815 libxbps: cache regpkgdb just when it's needed not via xbps_init(). 2011-12-22 12:56:56 +01:00
Juan RP
c60ab726a3 xbps_configure_pkg: fix path to INSTALL script. 2011-12-15 14:46:59 +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
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
86f1f18571 libxbps: revamped trans states/cb to be more generic, not just for transactions. 2011-11-11 09:41:48 +01:00
Juan RP
5ade2f37c7 libxbps: xbps_configure_pkg: ignore pkgs in config-files state. 2011-10-20 16:13:16 +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
6f783389dd Share transaction callbacks for xbps-{bin,repo}, reposync cb support. 2011-07-28 09:25:30 +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
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
984eae1578 Make xbps_fetch_file accept a callback to update its progress.
This also makes xbps_unpack_binary_pkg follow this convention by avoiding
static variables.

--HG--
branch : progress_callback
rename : bin/xbps-repo/util.c => bin/xbps-bin/util.c
2011-01-22 12:40:19 +01:00
Juan RP
efea94bec6 Fixed API documentation comments for doxygen. 2011-01-19 00:31:22 +01:00
Juan RP
fdec663855 API clean up (part 2), plus misc changes and improvements.
- Rename regpkgs_dictionary to regpkgdb_dictionary to better describe what is is.
- Change some funcs in plist.c to return a boolean rather than int.
- Hide more internal funcs off the API.
- Simplify xbps_repository_update_pkg() and remove its second arg.
- Hide implementation details in xbps_repository_pool, now to iterate over the
  pool you have to use xbps_repository_pool_foreach and its struct
  repository_pool_index.
- Introduce xbps_{init,end}, to initialize/destroy some stuff in the library.
- Introduce xbps_dbg_printf to printf stuff for debugging purposes.
- xbps-{bin,repo}:  added -d arg to enable debugging output.
- Before checking if a config file needs to be installed or such, check that
  package contains the "conf_files" array.
- Remove obsolete dirs as well while updating packages.
- If transaction dictionary is ready remove the "missing_deps" array.

Bump XBPS_RELVER to 20101118.

--HG--
rename : lib/regpkgs_dictionary.c => lib/regpkgdb_dictionary.c
2010-11-19 13:40:13 +01:00
Juan RP
ffc255b715 Starting to clean up the public API, move private stuff into xbps_api_impl.h. 2010-11-13 03:18:58 +01:00
Juan RP
ec7cdde1e0 Misc cleanups and performance improvements.
- There's no need to check rval for prop_dictionary_get_*, we are sure the
  objects are there at prop_dictionary_set_* time.
- Avoid two chdir(2) calls per INSTALL/REMOVE run.
- Avoid using access(2) to check for existence of INSTALL/REMOVE scripts,
  just try to run the executable directly and check for ENOENT.
2010-11-06 06:44:00 +01:00
Juan RP
99d38bf176 Rename some files in the library to better describe what they do.
--HG--
rename : lib/config_files.c => lib/package_config_files.c
rename : lib/configure.c => lib/package_configure.c
rename : lib/orphans.c => lib/package_orphans.c
rename : lib/purge.c => lib/package_purge.c
rename : lib/register.c => lib/package_register.c
rename : lib/remove.c => lib/package_remove.c
rename : lib/remove_obsoletes.c => lib/package_remove_obsoletes.c
rename : lib/requiredby.c => lib/package_requiredby.c
rename : lib/state.c => lib/package_state.c
rename : lib/unpack.c => lib/package_unpack.c
2010-11-03 20:08:33 +01:00