Commit Graph

18 Commits

Author SHA1 Message Date
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
ffc255b715 Starting to clean up the public API, move private stuff into xbps_api_impl.h. 2010-11-13 03:18:58 +01:00
Juan RP
c3afb4f4fb New function: xbps_get_pkg_dict_from_metadata_plist.
This function returns and internalized dictionary from a package's metadata
plist file as specified by its arguments.

Update all code to use it where appropiate.
2010-11-08 03:14:41 +01:00
Juan RP
679833156a Always release the object dictionary returned by xbps_find_pkg_dict_installed().
Document this in the public API header and update all code accordingly.
2010-11-08 02:02:35 +01:00
Juan RP
ec7cdde1e0 Misc cleanups and performance improvements.
- There's no need to check rval for prop_dictionary_get_*, we are sure the
  objects are there at prop_dictionary_set_* time.
- Avoid two chdir(2) calls per INSTALL/REMOVE run.
- Avoid using access(2) to check for existence of INSTALL/REMOVE scripts,
  just try to run the executable directly and check for ENOENT.
2010-11-06 06:44:00 +01:00
Juan RP
b04a0230cd xbps-bin/check.c: remove dead code, fix warnings found by clang.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100428211107-nvoflpkfkz37y3us
2010-04-28 23:11:07 +02:00
Juan RP
6256b34ccc Some changes that will appear in 0.5.0:
* Add proplib-0.4.1 source and use it in XBPS. This is to avoid
   an external dependency, so that we depend on the features of the
   internal library. This also means that proplib is not required anymore.

 * Added support to read/write gzip compressed plists by default, thanks
   to proplib-0.4 that gained new functionality.

That means that from now, XBPS will be able to write compressed gzip
plist files for all metadata related work. This will vastly reduce
bandwidth required for fetching remote repo's pkg index file and
binary packages.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100420122238-zcb85rudt9p34e10
2010-04-20 14:22:38 +02:00
Juan RP
bf6b96c651 xbps-bin/check.c: simplify exit paths.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125151533-z7ub7xlqbhg97ij2
2010-01-25 16:15:33 +01:00
Juan RP
c0b280c118 Mega-commit to document the API with doxygen.
Some changes were made to the API when making the documentation:

- A few exported functions are now hidden, because they were only used
  internally in the library.
- A few exported symbols were renamed to document them better than
  previously.
- Cosmetic changes all along the way, as well as some fixes here and there.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100121021019-onbsivlrhdb7t3ou
2010-01-21 03:10:19 +01:00
Juan RP
a165d20193 Error and warning messages should go to stderr, make it so.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100115141916-tpg2rga1i4pm42kj
2010-01-15 15:19:16 +01:00
Juan RP
87a216fd11 Major changes in libxbps to implement caching in some cases.
libxbps:
 - Moved repolist code to lib/repository_pool.c.
 - Renamed xbps_{prepare,release}_repolist_data() to
   xbps_repository_pool_{init,release} respectively.
 - Moved regpkgdb dict code to lib/regpkgs_dictionary.c.
 - Renamed xbps_{prepare,release}_regpkgdb_dict() to
   xbps_regpkgs_dictionary_{init,release} respectively.
 - Use a global reference count for repository_pool and regpkgs_dictionary,
   this gives a substantial performance gain while looking for dependencies
   in repository pool, among other things.
 - Make xbps_find_pkg_* functions return errno and use it to detect
   for spurious errors in code using them.
 - Add code to detect when a dependency is already unpacked.

xbps-bin:
 - Do not set pkg state to unpacked in the transaction, it's set already
   while a package is unpacked.
 - While installing or updating packages, it now knows when a dependency
   is already unpacked and shows it as "unconfigured".

Bump XBPS_RELVER to 20091126.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091126022250-uu8x0fa86l4scb5x
2009-11-26 02:22:50 +00:00
Juan RP
bf82b6512d Extensively verified that all functions have its return value
checked for any spurious error, this should make the core more safer :-)

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091123094651-5prw0bkqmt3y8h23
2009-11-23 09:46:51 +00:00
Juan RP
adbd3d727c Added support for shell (and csh as well) patterns for required
dependencies, as specified in blueprint "improved-version-matching".

It's possible now to require greater, greater or equal than,
less, less or equal than, and equal pkg versions, as well as using
'{}' and '[^!]' csh patterns in dependencies.

Code lifted from FreeBSD, thanks! :-)

Change XBPS_RELVER to 20091107 to match latest additions.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091107035620-3051wcwrirqn2g14
2009-11-07 04:56:20 +01:00
Juan RP
dce1283e88 xbps-bin: improve 'check all' target output.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091101063206-s6kl51gqfugiapkl
2009-11-01 07:32:06 +01:00
Juan RP
dc258f4e20 Use xbps_get_root() directly where appropiate.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027111547-tb38qz51ejakn3jc
2009-10-27 12:15:47 +01:00
Juan RP
3d8fb79e94 xbps-bin: add support to check integrity of all installed packages,
through "xbps-bin check all".

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091005224237-plr75i3wveirhu4p
2009-10-06 00:42:37 +02:00
Juan RP
042084b306 xbps-bin: do not mark package as broken if the any task in the check
target failed, just print the info.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091005220111-m2xkbbeupq2v7ccn
2009-10-06 00:01:11 +02:00
juan
3f3b6d00dd Initial import of xbps with code as August '09.
--HG--
extra : convert_revision : juan%40xbps-20090817170720-amxxac4a2e8bza1j
2009-08-17 19:07:20 +02:00