Commit Graph

33 Commits

Author SHA1 Message Date
Juan RP
010e5df415 lib/transaction_commit.c: add missing arg to xbps_dbg_printf(). 2013-08-29 15:49:23 +02:00
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
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
7c4f20ba89 lib/transaction_commit.c: fix a use-after-free in state cb (found by ojab). 2013-03-26 10:35:20 +01:00
Juan RP
5eddf04898 Ignore executing install/remove scripts if XBPS_TARGET_ARCH is set.
Instead a two stage approach is necessary when packages for target arch
are installed:

	- XBPS_TARGET_ARCH=arch xbps-install foo <- only unpack
	- xbps-reconfigure -a <- configure natively or via an emulator
2013-03-07 18:08:12 +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
d8769c4873 Workaround fix for 'xbps-install -yf xbps <-> xbps-git'. 2013-02-05 12:10:24 +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
e861cb5331 xbps_transaction_commit: add a dbg printf. 2012-11-19 14:38:06 +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
a77727887d Improvements for xbps_fetch_file and xbps_repository_sync_index.
xbps_fetch_file:
	- A temp file is created with .part extension to improve resuming.
	- Files are downloaded in cwd.
	- Switch to futimens(2) and fsync(2).

xbps_repository_sync_index:
	- Do not create local repodir in metadir if it already exists.
	- Simplify the code thanks to new xbps_fetch_file().
2012-11-11 11:29:49 +01: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
6a4de0127d libxbps: introduce the concept of "soft replace"; see the NEWS file. 2012-05-25 17:24:36 +02:00
Juan RP
8a4b143bf3 Show a proper error message if download of a binpkg fails in a transaction. 2012-05-06 09:09:09 +02:00
Juan RP
bfe7ab1c5a xbps_configure_pkg: simplify and remove "version" arg (API change).
The "version" argument (being optional) clearly is not needed and it
can be fully removed. This simplifies the internal implementation as well
as the API.
2012-04-10 10:02:27 +02:00
Juan RP
a166d6a2a3 Simplify xbps_transaction_prepare()/commit() and related API changes.
- xbps_handle::transd -> new member with transaction dictionary.
- xbps_transaction_prepare: returns an int.
- xbps_transaction_commit: doesn't need any arg now.
- xbps_repository_pool_sync: doesn't need any arg now.
- xbps_pkgdb_update: removed xbps_handle * arg.
- xbps_transaction_missingdeps_get: removed, missing_deps array is in
  xbps_handle::transd("missing_deps") array object.
2012-01-22 10:00:46 +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
a7ef059673 Bump copyright year for changed files. 2012-01-04 17:56:52 +01:00
Juan RP
a31c20e52a Make xbps_configure_pkg/packages accept a flush bool arg for frontends. 2012-01-04 17:41:36 +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
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
b0ceeaa58e New configuration file via confuse: xbps.conf. 2011-12-15 11:19:20 +01:00
Juan RP
0ff0aee226 libxbps: added xbps_transaction_autoremove_pkgs(bool purge).
This is to add package orphans into the transaction dictionary.
2011-11-25 11:20:03 +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
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
51b45a0d08 libxbps: improve code to match replaced package patterns.
The replaces code now checks all package dictionaries in the
transaction dictionary, and the sorting algorithm will put packages
to be removed at the head of the tailq.

This should fix issue 11 in googlecode.
2011-10-20 14:39:58 +02:00
Juan RP
a80df68b15 libxbps: simplify xbps_transaction_commit(). 2011-10-19 16:25:49 +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
20b0b4ce12 libxbps: when replacing a pkg, also fully purge the pkg(s). 2011-10-12 09:28:11 +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