Commit Graph

348 Commits

Author SHA1 Message Date
Juan RP
24ff0472dd Use fs blksize from stat(2)ed file when reading archives. 2013-08-29 14:30:14 +02:00
Juan RP
789165339a Drop useless/unused xbps_add_obj_to_{array,dict} functions. 2013-08-18 10:25:17 +02:00
Juan RP
1999fbd771 Relax libarchive version requirement to 2.8.0. 2013-08-16 10:26:36 +02:00
Juan RP
84d14286a8 More libarchive-2.x compat. 2013-08-15 11:55:20 +02:00
Juan RP
0c7701f2bc Introduce xbps_array_foreach_cb() and use it in random code.
This routine will spawn a thread per core to process N items stored
in the specified array, the last thread gets the remainder of items left.

Results have shown that xbps benefits if there is a considerable amount
of items and number of threads being spawned.

Use it in xbps_pkgdb_foreach_cb(), xbps-pkgdb(8), xbps-query(8)
and xbps-rindex(8).

On UP systems there's no overhead because pthread(3) is not used at all.

WIP! investigate if it can be used in libxbps (xbps_rpool_foreach()),
and finish conversion of xbps-rindex(8) -c.
2013-07-27 09:47:16 +02:00
Juan RP
432067de48 Remove three unused API functions. 2013-07-27 06:12:59 +02:00
Juan RP
1d0a5faff0 include/xbps.h.in: xbps_api.h -> xbps.h 2013-06-29 06:46:46 +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
09e116b7f0 xbps_api.h -> xbps.h 2013-06-20 12:31:02 +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
4ef66d99bb Drop requirement of confuse header for the public API; it's only used by libxbps. 2013-06-19 11:29:04 +02:00
Juan RP
d419f8ac2a Move fetch.h to lib/fetch. 2013-06-19 11:03:03 +02:00
Juan RP
0d22fe362c Increase default libfetch cache limits. 2013-06-19 09:39:39 +02:00
Juan RP
3abe48b68a Introduce xbps_repo_get_pkg_plist() and use it in xbps-query -R. 2013-06-14 10:22:10 +02:00
Juan RP
5f2bba7f4e Move functionality to resolve revdeps from repos to libxbps. 2013-06-14 08:13:51 +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
5fd7565e6c xbps-install(8): -R now overrides the repository list set in a configuration file.
Now -R can be used independently if a configuration file exists or not.
2013-04-18 18:17:14 +02:00
Juan RP
57bb7baf5e unpack: use archive_entry_{filetype,uid,gid,mode} rather than stored struct stat. 2013-03-15 13:18:30 +01:00
Juan RP
b9888fd7be xbps_match_virtual_pkg_in_dict: add support to match vpkgs with exact version. 2013-03-10 10:07:54 +01:00
Juan RP
b976a45aed New code to find pkg obsolete files, with a proper kyua test.
Previous code incorrectly found obsolete files in this case:

(curpkg) - in files: /etc/foo.conf
(newpkg) - in conf_files: /etc/foo.conf

and removed this file because the code couldn't find it in the same
array. The new code fixes this case and compares the whole pkg filelist.
2013-03-09 13:30:56 +01:00
Juan RP
c504a73f08 Re-use pkgname from unpack to handle config files. 2013-03-08 10:11:16 +01:00
Juan RP
50ea03df2a Revert code to update xbps independently; I'll use another way to implement this. 2013-03-08 09:44:57 +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
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
90b6803825 Introduce XBPS_STATE_CONFIGURE_DONE and use it in xbps-reconfigure(8). 2013-03-07 09:24:04 +01:00
Juan RP
5533259557 Also version XBPS_PKGINDEX to 1.7. 2013-03-05 07:34:37 +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
460e2e07fe include/xbps_api.h.in: drop __{BEGIN,END}_DECLS. 2013-03-03 11:21:26 +01:00
Juan RP
5471c7f46c Add libarchive compat definitions for 3.1.2. 2013-02-20 14:52:01 +01:00
Juan RP
ae7b76e245 xbps_fetch_file: don't fsync(3) before closing fd; slowdowns considerably slow storage. 2013-02-20 10:46:21 +01:00
Juan RP
2b5d3bb8f4 libxbps: when resolving deps, ignore all of them that depend on the origin pkg. 2013-02-07 18:50:55 +01:00
Juan RP
178a6b58ae Remove another transaction obj from pkgdb and make xbps-pkgdb catch it. 2013-02-07 17:49:28 +01:00
Juan RP
d8769c4873 Workaround fix for 'xbps-install -yf xbps <-> xbps-git'. 2013-02-05 12:10:24 +01:00
Juan RP
5c1688944d xbps-install: make -f preserve conf files; use it twice to overwrite all files. 2013-02-02 11:30:42 +01:00
Juan RP
66cf15f1c2 Update API docs. 2012-12-19 01:01:27 +01:00
Juan RP
22adf99e40 Faster generation of dynamic reverse dependencies and do this exactly once. 2012-12-15 07:33:49 +01:00
Juan RP
1d42986b75 libxbps: finish support for rindex 1.6. 2012-12-07 17:11:52 +01:00
Juan RP
2c1e4e502d XBPS can now be built on NetBSD (and probably any other BSD variant). 2012-12-06 12:58:17 +01:00
Juan RP
e277823268 xbps_api.h.in: don't redefine __{BEGIN,END}_DECLS; which is true on BSD. 2012-12-06 10:54:01 +01:00
Juan RP
2e2da80cfc find_repo_deps: find pkgd from pkgdb by name as it checks for version later. 2012-12-02 16:34:01 +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
7f577e005c metadir: replace uthash simply with a dictionary. 2012-11-21 23:07:38 +01:00
Juan RP
ddca33b4a9 XBPS_RELVER: embed the latest git rev hash. 2012-11-20 00:38:23 +01:00
Juan RP
bdd93b7aa7 Introduce xbps_pkgdb_get_virtualpkgd() and use in xbps_metadir_get_pkgd(). 2012-11-19 21:46:54 +01:00
Juan RP
5de4fb1f0a xbps-install: -f will also overwrite pkg files. 2012-11-19 20:50:58 +01:00
Juan RP
a311294f0a libxbps: added support to "inject" vpkg config files at initialization time. 2012-11-19 15:42:24 +01:00
Juan RP
1147e7ce3c xbps_find_pkg_orphans: there's no need to check pkg state, any state is ok. 2012-11-19 14:07:05 +01:00
Juan RP
46f7a808b4 xbps_metadir: use an hash table (via uthash): 15s vs 1m10s. 2012-11-18 02:38:24 +01:00
Juan RP
fcdb6b0930 unpack: use pkg dictionary from metadir to find obsoletes! 2012-11-17 15:14:11 +01:00