Commit Graph

48 Commits

Author SHA1 Message Date
Juan RP
0677678387 Added LTO support and fix warnings (maybe-uninitialized). 2019-06-27 18:09:26 +02:00
Juan RP
042ab422b2 xbps-dgraph/main.c: simplify logic.
Thanks to clang-analyzer for reporting a dead assignment
that lead me to rework the logic.
2019-06-18 18:49:29 +02:00
Juan RP
a9a889c54d fulldeptree: return a proper error if deps can't be resolved.
xbps_get_pkg_fulldeptree() now returns NULL and sets errno to ENODEV
when there are missing dependencies, rather than assert()ing.

Added another test case to check returned error codes.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-15 18:04:20 +02:00
Juan RP
0c860d1db0 xbps-dgraph: fix regresion introduced by the fulldeptree changes.
This now works as expected again, see https://i.imgur.com/pr2XO70.png
for the full dependency graph of the sway pkg installed on my system.

Closes: #80 [via git-merge-pr]
2019-04-22 14:49:19 +02:00
Juan RP
769a997afb Introduce xbps_plist_{array,dictionary}_from_file().
Those are a wrapper around xbps_{array,dictionary}_internalize_from_zfile()
that prints a debugging msg when the plist file cannot be internalized.

Update xbps to use these wrappers.
2015-05-28 10:15:05 +02:00
Juan RP
9aaff4e2d0 xbps-dgraph: -m --metadata was documented but not enabled in getopt (oops). 2015-01-11 08:58:02 +01:00
Juan RP
f890a17b84 xbps-dgraph: update options to match other utils. 2014-11-29 08:06:26 +01:00
Juan RP
7e6b38f951 xbps-dgraph: take into account virtual pkgs in fulldepgrah mode (-f). 2014-11-20 19:49:57 +01:00
Juan RP
edb613f1d5 xbps-dgraph: remove dead code; use more saner defaults. 2014-11-20 17:15:43 +01:00
Juan RP
4b3a4159a0 xbps-dgraph: update graph label for -f mode 2014-11-20 16:28:47 +01:00
Juan RP
8c4d41ccfd xbps-dgraph: simplify. 2014-11-20 16:24:43 +01:00
Juan RP
0b50672a33 xbps-dgraph: added support to generate full dependency graphs.
- Full dependency graphs can be generated with -f in pkgdb or repository
  mode (-R).
- Removed -o and writing dot files by default, the generated dot file
  is written to stdout.
- Misc tweaks that I cannot remember right now.
2014-11-20 13:32:21 +01:00
Juan RP
2e3213de25 xbps-dgraph: remove code to colorize optional objs (unmaintanable). 2014-11-20 10:48:28 +01:00
Juan RP
2c01994497 xbps-dgraph: random changes as anticipation of more features.
* Rather than requiring a config file to be generated with -g, if -c
  is unset and default config file does not exist, use builtin defaults.
* Always process all available pkg objs.
* -R is now used to enable repository mode rather than checking revdeps.
* -o removed; simply use <pkgname>.dot.
2014-11-19 18:21:32 +01:00
Juan RP
5b522109f7 Replaced config/system {repo,preserve,virtualpkg}.d with a single directory.
See the NEWS file for more information.
2014-11-06 09:58:04 +01:00
Juan RP
01dbb968dd Welcome pkgdb-0.38. 2014-09-11 00:12:12 +02:00
Juan RP
878d2bf7e2 xbps-dgraph: only set rootdir it was set (fix #33). 2014-03-10 10:20:04 +01:00
Juan RP
2a21354a1c Make some reorganization in struct xbps_handle.
The variables to set cachedir, rootdir and metadir have been
changed to "array of chars", this way there are no extra allocations.

Update clients accordingly and bump API version.
2013-12-16 11:46:39 +01: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
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
8a05bc5f24 xbps-dgraph: installed_size obj is in bytes; fix a comment. 2013-06-14 05:12:15 +02:00
Juan RP
7b2942e789 xbps-dgraph: only add revdeps when it's necessary. 2013-06-13 17:44:44 +02:00
Juan RP
6b397198bf xbps-dgraph: completely updated and working as before. 2013-06-13 17:41:16 +02:00
Juan RP
f868dd7816 xbps-dgraph: make this work again; needs more changes yet. 2013-06-12 10:34:01 +02:00
Juan RP
ea2f2c7297 Silence -Wformat-nonliteral warning with clang. 2013-01-04 10:35:00 +01:00
Juan RP
e2176ec4b6 bin: no point in cleaning up resources when it's exiting... 2012-12-14 11:58:30 +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
7714f0f6c5 bin: print usage() in stdout.
(cherry picked from commit b090e1a0bd32cabd8fe81bd756d419ee4b170ef7)
2012-09-29 19:08:03 +02: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
6940505de9 regpkgdb rototill: renamed to pkgdb, improve the public API. 2012-01-20 11:10:52 +01:00
Juan RP
d0e1477eeb Simplify xbps_end() and don't continue if xbps_init() did not succeed. 2012-01-17 16:56:17 +01:00
Juan RP
f2b05d6438 Improved pkg best matching in rpool, and support for exact pkgver matches.
- xbps_repository_pool_find_pkg in best match case, now returns the
  newest package version available in rpool.
- Added xbps_repository_pool_find_pkg_exact that returns a package
  by exact matching a pkgver.
- Removed xbps_handle_alloc(), the user is free to use memory
  allocated from heap or stack.
- Improved API documentation in preparation for 0.12.

Bumped XBPS_API_VERSION again.
2012-01-17 16:17:03 +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
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
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
d88b852843 xbps-dgraph: add two new optional objs: homepage and license. 2011-05-27 09:26:50 +02:00
Juan RP
870ad18d58 xbps_init() now sets rootdir, cachedir and flags.
That means that the following functions were removed:
	- xbps_set_{cachedir,flags,rootdir}.
	- xbps_get_{cachedir,flags,rootdir}.

With this change fixed an obvious typo that made -c argument to not work,
and now the cache directory is an absolute path not relative to rootdir.
2011-02-21 17:42:47 +01:00
Juan RP
097b50b3c2 Fix all warnings found by clang analyzer as reported by ojab in issue 3. 2011-02-03 17:49:43 +01:00
Juan RP
7b159d6f33 xbps-dgraph: parse the "provides" obj for virtual packages. 2011-01-31 16:40:33 +01:00
Juan RP
6051eb29ab Added another bunch of compiler warnings and fix code. 2011-01-15 11:59:44 +01:00
Juan RP
e3b86d5ff6 xbps-dgraph: use PRIu64 to printf uint64_t from <inttypes.h>. 2010-12-23 17:23:14 +01:00
Juan RP
fdec663855 API clean up (part 2), plus misc changes and improvements.
- Rename regpkgs_dictionary to regpkgdb_dictionary to better describe what is is.
- Change some funcs in plist.c to return a boolean rather than int.
- Hide more internal funcs off the API.
- Simplify xbps_repository_update_pkg() and remove its second arg.
- Hide implementation details in xbps_repository_pool, now to iterate over the
  pool you have to use xbps_repository_pool_foreach and its struct
  repository_pool_index.
- Introduce xbps_{init,end}, to initialize/destroy some stuff in the library.
- Introduce xbps_dbg_printf to printf stuff for debugging purposes.
- xbps-{bin,repo}:  added -d arg to enable debugging output.
- Before checking if a config file needs to be installed or such, check that
  package contains the "conf_files" array.
- Remove obsolete dirs as well while updating packages.
- If transaction dictionary is ready remove the "missing_deps" array.

Bump XBPS_RELVER to 20101118.

--HG--
rename : lib/regpkgs_dictionary.c => lib/regpkgdb_dictionary.c
2010-11-19 13:40:13 +01:00
Juan RP
420225d414 xbps-dgraph: new utility to generate dot(1) graphs for package metadata properties. 2010-11-08 23:27:15 +01:00