Commit Graph

39 Commits

Author SHA1 Message Date
Duncan Overbruck
de484e9369
lib: change xbps_dbg_printf to not require xbps_handle
This allows to simplify a lot of code by not having to pass around
the xbps handle everywhere just to print some debug information.
2022-12-24 14:29:23 +01:00
Duncan Overbruck
44cd938115
Revert "Use shared LICENSE file for all xbps code."
This reverts commit be7d8cfaf1.

This commit missed some previous copyrights mentioned,
in general I think its better to have this per-file to
follow who wrote what and when.
2020-04-29 14:12:10 +02:00
Juan RP
be7d8cfaf1
Use shared LICENSE file for all xbps code. 2020-04-24 11:44:19 +02:00
Juan RP
0677678387 Added LTO support and fix warnings (maybe-uninitialized). 2019-06-27 18:09:26 +02:00
Foxlet
0f33859701 Fix namespace violation 2018-09-25 22:11:30 -04:00
Christian Neukirchen
034d3591b3 xbps-query: generate -o output from a single printf.
Else parts written by multiple threads can become mixed up.
2016-01-20 13:41:13 +01:00
Juan RP
0c208bb744 xbps-query(8): ownedby: do not follow symlinks and print target file too. 2015-01-29 17:32:14 +01:00
Juan RP
94d0e4e131 xbps-query(8): --regex now matches EREs in case insensitive mode. 2015-01-18 17:50:26 +01:00
Juan RP
cdf7fc81af xbps-query(8): performance improvement to the ownedby mode with --regex.
Only compile the ERE once, rather than on any file. Found and suggested
by Christian Neukirchen (@chneukirchen).
2015-01-08 10:32:08 +01:00
Juan RP
1789e527a9 Gratuitous ABI break: xbps_binpkg_get_xxx() -> xbps_archive_fetch_xxx(). 2014-11-21 09:51:57 +01:00
Juan RP
a6516505e9 xbps-query(8: added --cat=FILE mode support.
- This mode prints to stdout the matching FILE stored in a binary package.
- ABI break: renamed xbps_get_pkg_plist_from_binpkg() xbps_binpkg_get_plist().
- Added xbps_binpkg_get_file() as a generic way to get pkg file contents.
- Removed useless comments from xbps_api_impl.h.
2014-11-17 15:45:46 +01:00
Juan RP
3afb9d709d Get rid of repodata index-files; the archive is now 8x smaller.
See the NEWS file for more information.
2014-11-13 17:09:43 +01:00
Juan RP
b306adf52b bin/xbps-query/ownedby.c: take into account pkgs with no files. 2014-09-11 18:10:04 +02:00
Juan RP
01dbb968dd Welcome pkgdb-0.38. 2014-09-11 00:12:12 +02:00
Juan RP
a3c253d03c xbps-query: check regcomp() return value. 2014-06-03 12:50:34 +02:00
Juan RP
0eadaab19d xbps-query: added --regex to use EREs in ownedby and search modes.
This replaces previous -S, --search-regex option. The regex option
can now be used in the ownedby and search modes.

Also added -S, --show option which is the default mode if no other
mode set, and defaults to it to preserve compatibility.
2014-05-26 17:30:44 +02:00
Juan RP
e8c454f3d2 xbps-query: do not print pkg dirs in local ownedby mode, it's unnecessary. 2013-12-12 15:34:37 +01:00
Juan RP
1f270e3a1a xbps-query: adapt to the new libxbps API. 2013-10-07 10:22:45 +02:00
Juan RP
8d5c48b861 Added support for the long awaited feature: RSA signed repositories. 2013-10-05 11:38:04 +02:00
Juan RP
023484ca0b Introduce xbps_{array,pkgdb}_foreach_cb_multi() and use it where appropiate.
In some tasks the single threaded implementation outperms the multithreaded
one. Use it where it really makes a difference. The _multi() routines do not
spawn any thread if _SC_NPROCESSORS_ONLN == 1.

Bump XBPS_API_VERSION.
2013-09-17 16:30:13 +02:00
Juan RP
4057e4961c Use C99 for loop initializers.
That means that a C99 compiler is now mandatory.
2013-09-15 10:06:49 +02:00
Juan RP
a039330f3c Misc cleanups: use __attribute__((__unused__)); remove dead code. 2013-08-29 10:45:30 +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
e0643acbb0 xbps-query(8): fixed some memleaks in local/remote ownedby mode. 2013-07-21 10:49:30 +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
db1efb3aa6 Relax memory requirements on 64bit platforms; fix two memleaks. 2013-06-12 10:04:10 +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
91c08bfe75 bin/xbps-query/ownedby.c: simply match patterns with fnmatch(3). 2013-05-13 15:10:47 +02:00
Juan RP
70b89a88cc xbps-query: make -o (ownedby) follow symlinks; close issue #4 from github. 2013-03-17 10:59:40 +01:00
Juan RP
a81316a248 xbps-query: ownedby.c: ignore unexistent files in pkg metadata. 2013-03-05 08:52:40 +01:00
Juan RP
cc068b2b39 xbps-query: do not sync repo index-files; use xbps-install -S instead. 2013-01-31 10:44:27 +01:00
Juan RP
23e7f317f8 xbps-query: ownedby: simplify and avoid xbps_pkgpattern_match, fnmatch is enough. 2012-12-15 19:19: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
d6735d5685 xbps_xasprintf: do not return NULL anymore; remove checks for this. 2012-11-11 09:37:27 +01:00
Juan RP
2a1e4fe137 xbps-query: sync XBPS_PKGINDEX_FILES with ownedby in repository mode. 2012-11-07 10:45:10 +01:00
Juan RP
b05ce9fe57 New utilities: xbps-{install,pkgdb,query,reconfigure,rindex} (WIP). 2012-11-02 15:04:25 +01:00