Commit Graph

30 Commits

Author SHA1 Message Date
Juan RP
ed67cad564 xbps-query(8): added local search mode support (-s [-p]). 2014-09-11 01:15:51 +02:00
Juan RP
0b116a0f3f xbps-query(8): --search --property now works with <number> objects.
For example to find a package where its binpkg file is bigger than 1GB:

	$ xbps-query --regex -s [0-9][0-9][0-9][0-9]MB -p filename-size
2014-08-02 12:11:28 +02:00
Juan RP
36ad783f07 xbps-query/search: handle vpkg matches into its own conditional; a small performance improvement. 2014-07-06 09:33:59 +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
0fbab93383 xbps-query/search.c: simplify regex matching code. 2014-05-26 08:36:33 +02:00
Juan RP
1f0605810c xbps-query: added -S, --search-regex to match EREs against pkg props in repos. 2014-05-25 11:03:31 +02:00
Juan RP
bb491e2667 libxbps: detect and ignore incorrect deps of a pkg if those are virtual pkgs. 2014-04-20 16:54:50 +02:00
Juan RP
cb66092fbc xbps-query: added support for -p/--property argument in search mode.
See the NEWS file for more information.
2014-03-21 13:19:40 +01:00
Juan RP
5eea259c13 Remove the config.h kludge and override vasprintf detection via HAVE_VASPRINTF. 2014-01-20 18:50:33 +01: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
4428cac154 xbps-query: ignore non working repos; misc fixes. 2013-07-27 20:02:07 +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
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
5c3985ddf1 xbps-query: search: simplify and use xbps_match_virtual_pkg_in_dict(). 2013-06-14 09:40:10 +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
7e171b67cf xbps-query: in search mode also count blanks for the output string. 2013-02-28 16:07:11 +01:00
Juan RP
3cc8f66f64 xbps-query: in -s do not print "[virtual]" on vpkg matches. 2013-02-18 14:25:15 +01:00
Juan RP
be1086f8fb xbps-query: -s, --search is able to find pkgs by matching virtual pkgnames. 2013-02-15 08:30:11 +01:00
Juan RP
da957433cb xbps-query: align -s output based in collected results not globally. 2013-02-11 16:18:43 +01:00
Juan RP
942db86eb5 xbps-query/search.c: add missing assert.h. 2012-12-06 10:58:11 +01:00
Juan RP
924ef35a07 xbps-query: fixed some issues found by pancake and valgrind. 2012-12-05 08:47:53 +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
c7402a9176 xbps-query/search.c: fix a memleak found by cppcheck. 2012-11-06 09:13:05 +01:00
Juan RP
b05ce9fe57 New utilities: xbps-{install,pkgdb,query,reconfigure,rindex} (WIP). 2012-11-02 15:04:25 +01:00