Commit Graph

48 Commits

Author SHA1 Message Date
Juan RP
6b84d75dc1 lib/transaction_dictionary.c: fix dead assignment.
Found by clang-analyzer.

Bug Summary
File: lib/transaction_dictionary.c
Warning: line 68, column 2
Value stored to 'rootdir_free_size' is never read
2019-06-18 18:49:29 +02:00
Duncaen
5aabfe3ad9 fix indention 2019-04-14 12:37:24 +02:00
Juan RP
a13a7fa896 Implemented reverse conflicts for pkgs in pkgdb and transaction. 2015-10-28 05:23:42 +01:00
Juan RP
c457b594aa libxbps: fix eudev-libgudev -> libgudev fallout.
Packages to be replaced must be collected *before* checking for
broken reverse dependencies, otherwise them will always be detected
as broken.
2015-10-14 11:46:56 +02:00
Juan RP
00149d0f37 xbps_transaction_prepare: if ENOSPC, keep the transaction dictionary.
... we need this in xbps-install to print required/free space on rootfs.

Close #101
2015-06-20 09:48:21 +02:00
Juan RP
d607655371 libxbps: globally check for unresolved reverse dependencies.
Close #46. See NEWS for more information.
2015-02-03 10:20:13 +01:00
Juan RP
076b3f8c44 libxbps: add pkgs on hold mode to the transaction, but ignore them.
Those are there mostly to be shown by the clients and notify that
there's an update in repos that is being ignored.

Idea by @chneukirchen.
2015-01-28 12:07:47 +01:00
Juan RP
74c30556fc xbps_transaction_prepare: check for unresolved shlibs a bit early.
It's just better if we check for unresolved shlibs earlier because
the transaction array will be smaller if there are replaced packages.
2014-11-13 11:39:20 +01:00
Juan RP
e884270e06 xbps_transaction_prepare: ignore pkgs that will be removed. 2014-10-18 16:07:52 +02:00
Juan RP
ff189fd210 Replaced redundant dependency sorting code with a simpler implementation.
This fixes the issue found by "xbps-src bootstrap" when a package
without "provides" was declared as a virtual package.
2014-10-18 12:35:47 +02:00
Juan RP
f52eea34d4 xbps-install: abort transaction if there's insufficient disk space on rootdir.
The free disk space wasn't computed correctly and xbps-install(8) wasn't
handling ENOSPC rval in xbps_transaction_prepare().
2014-09-18 12:11:02 +02:00
Juan RP
39aca1bbc9 Implement shlib checks for all pkg revdeps in the transaction.
Added three new test cases to verify its correctness.
2014-09-12 11:49:34 +02:00
Juan RP
01dbb968dd Welcome pkgdb-0.38. 2014-09-11 00:12:12 +02:00
Juan RP
fb9c94fab9 Added support to use pkg shlib-{provides,requires} objects.
This effectively checks that all pkgs in a transaction to be installed
or updated, have not unmatched shared libraries, which might happen with
pkgs that had major soname bumps.

This implementation slow downs xbps_transaction_prepare() 2x, due to
the use of xbps_pkgdb_get_pkg_metadata(). A new pkgdb format is required
that adds the pkg shlib-provides objects to pkgdb, avoiding the need
to use xbps_pkgdb_get_pkg_metadata().
2014-09-09 11:08:54 +02:00
Juan RP
472f622f6f Finally fixed vpkg02 test (vpkg provider in transaction).
Rather than collecting dependencies for a pkg that has been added to the
transaction dictionary, do this for all pkgs in transaction once all
packages are already there.
2014-09-04 10:13:02 +02:00
Juan RP
0a7ea3250a lib/transaction_dictionary.c: fix rootdir free size on 32bit systems. 2014-07-18 12:44:32 +02:00
Juan RP
607f01b2f5 If statvfs() fails don't consider this a critical error; compute free space correctly. 2014-07-14 10:09:34 +02:00
Juan RP
26fca48da2 xbps-install(8): added support to list pkgs that will be downloaded from remote repos. 2014-07-14 09:30:28 +02:00
Juan RP
4356b6fd65 Abort transaction if there's not enough free space on disk.
Close #7.
2014-07-13 11:45:04 +02:00
Juan RP
79fe312302 Gather proper transaction stats (take into account binpkgs in cachedir, and "preserved" pkgs). 2014-07-13 09:56:06 +02:00
Juan RP
ea234f095f xbps_transaction_init: small memleaks found by valgrind. 2014-05-22 10:41:07 +02:00
Juan RP
cc19818680 Improve stats in the transaction dictionary. 2013-12-16 07:24:17 +01:00
Juan RP
ec6f7a3013 lib/transaction_dictionary.c: modify how transaction stats are computed. 2013-12-14 04:54:52 +01:00
Juan RP
f09eab62cd Fix #18. An ATF test-case will be imported in a while. 2013-11-01 18:05:11 +01:00
Juan RP
789165339a Drop useless/unused xbps_add_obj_to_{array,dict} functions. 2013-08-18 10:25:17 +02:00
Juan RP
505a933097 Added support to verify reverse dependencies in a transaction.
See https://plus.google.com/106812073015308749022/posts/ZXMHimd8iKd
2013-06-27 16:52:31 +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
80de70d0cf lib/transaction_dictionary.c: get installed_size obj from pkg metadata correctly.
This lead to incorrect sizes or no size when computing freed/installed size
in the transaction dictionary.
2013-04-04 10:40:32 +02: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
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
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
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
c61ba8dfcc Added support for package conflicts. 2012-06-11 16:14:03 +02:00
Juan RP
9441f9f14b libxbps: multiple random changes for overall performance increase. 2012-06-04 23:22:33 +02:00
Juan RP
7265ea0e4e trans: do not increase download_size if binpkgs are in local repos. 2012-06-04 10:09:46 +02:00
Juan RP
7dfc01b7a6 Calculate required/freed size for updates in transactions too. 2012-01-25 05:10:24 +01:00
Juan RP
1a73b93d63 Calculate properly required/freed size in transactions. 2012-01-25 04:56:54 +01: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
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
9d731ffe09 Introduce xbps_transaction_remove_pkg() and use it for xbps-bin(8). 2011-11-27 09:05:18 +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
19f4cbd995 Generate transaction pkg count stats in the transaction dictionary.
This removes a chunk in frontends to compute number of installed,
updated, configured and removed pkgs in transaction.
2011-07-24 17:43:17 +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
d5c2a3266f Rename the transaction object key to "transaction" rater than "trans-action". 2011-02-05 12:21:04 +01:00
Juan RP
0bb0838982 Start moving code from repository_find* to transaction_*.
--HG--
rename : lib/sortdeps.c => lib/transaction_sortdeps.c
2011-01-24 16:55:58 +01:00