Commit Graph

13 Commits

Author SHA1 Message Date
Juan RP
65f241a081 xbps_repository_get_pkg_plist_dict_from_url: stop processing the archive
once that 4 entries are checked for the plist file.

Processing 6 entries is too much, we can be sure that plist file will
always be in the first 4 entries.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100122225433-u440x01bf8io3vd3
2010-01-22 23:54: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
023841b060 Implemented blueprint 'install-pkg-by-pkgmatch' as specified in
https://blueprints.launchpad.net/xbps/+spec/install-pkg-by-pkgmatch

The implementation works as expected, it was easier that I thought.
Bump XBPS_RELVER because the API was changed slightly.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114011431-xv5q6bgahm6v9dbq
2010-01-14 02:14:31 +01:00
Juan RP
6c2a648510 repository_plist.c: fix lp bug #494905 "xbps build failure on x86_64".
fetchIO_read returns ssize_t not int, applied patch from submitter.
Thanks.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091210081328-cxkzuxjapaven6a3
2009-12-10 09:13:28 +01:00
Juan RP
94bb169c88 Rename lib/repository_plist.c exported functions.
xbps_get_path_from_pkg_dict_repo -> xbps_repository_get_path_from_pkg_dict
xbps_get_pkg_plist_dict_from_repo -> xbps_repository_get_pkg_plist_dict
xbps_get_pkg_plist_dict_from_url -> xbps_repository_get_pkg_plist_dict_from_url

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091130113538-bji65cydf3bkwxkw
2009-11-30 12:35:38 +01:00
Juan RP
d90a248244 Rename struct repository_data to repository_pool.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091130112404-mlrt6x08thdvmrsn
2009-11-30 12:24:04 +01:00
Juan RP
a85073f6e8 xbps-repo: also print binpkg compression type in the show target.
Now it looks like:

$ xbps-repo show xbps-devel
Fetching info from: /storage/xbps/packages
Filename: xbps-devel-20091128.i686.xbps (size: 69K)
SHA256: 2c54a61fbd128097692edc19a7c17bfb10d93b3f055b04171cd1e4d97cde79df
Compression type: xz
Package: xbps-devel
Installed size: 216K
Maintainer: Juan RP [xtraeme@gmail.com]
Architecture: i686
Version: 20091128
Description: The XBPS package system (development branch)
 The XBPS package system. A new, fast, from scratch and simple
 binary package manager. This packages includes code from a development
 branch available from https://launchpad.net/xbps
$

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128051134-qzqqnwd76tcxgxb0
2009-11-28 06:11:34 +01:00
Juan RP
f3d2481c31 xbps-repo: if fetching info from remote repo for the 'show' and 'show-files'
targets and the binary package exists in cachedir, use it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128022129-y6y2tr0vtvy2w745
2009-11-28 03:21:29 +01:00
Juan RP
572068d3df xbps_get_path_from_pkg_dict_repo: adding rootdir wasn't correct for
a local repository, remove it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091126034026-gufqt4x1uwme5675
2009-11-26 04:40:26 +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
04d9ab2322 xbps_get_path_from_pkg_dict_repo: new function that returns a malloc'ed
string with the full path to a binary package file.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091125042953-x2nhwi8kxg75ukyq
2009-11-25 04:29:53 +00:00
Juan RP
787416a0cd xbps_get_pkg_plist_dict_from_repo: split reading the pkg plist dict
from an url into a new function, xbps_get_pkg_plist_dict_from_url.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091125025258-dnq0lstx67xj6w8t
2009-11-25 02:52:58 +00:00
Juan RP
c11094d5dd Added xbps_get_pkg_plist_dict_from_repo().
This function will fetch a requested plist file in a binary
package matching its 'pkgname' object by searching in repository pool.

This works in any kind of repository, local and remote. Some code
was Taken from NetBSD's pkg_install HEAD. Oh, and it's on-the-fly!
doesn't need to download the binpkg first!

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091125020936-7uf2ncrf1692c5hz
2009-11-25 02:09:36 +00:00