Commit Graph

57 Commits

Author SHA1 Message Date
Juan RP
f0c96aac65 xbps-repo: index-clean now also removes obsolete pkgs found in repo. 2012-07-22 10:21:49 +02:00
Juan RP
adc6ce9d22 xbps-repo: [index] use proper arch obj to remove old entry. 2012-07-21 22:23:45 +02:00
Juan RP
29f9724ba0 xbps-repo: properly remove (no)arch old entry/binpkg from index. 2012-07-21 21:50:16 +02:00
Juan RP
674adf64a3 xbps-repo: remove old binpkg symlinks too, fix index-files. 2012-07-17 13:10:34 +02:00
Juan RP
8eba2d7ea3 xbps-repo: replaced 'genindex' target with 'index-{add,clean}'.
See the NEWS file for more information.
2012-07-17 12:31:04 +02:00
Juan RP
f1ad8a95de xbps-repo: fixed issue 24 (xbps-src make-repoidx is doing something wrong). 2012-06-30 11:10:00 +02:00
Juan RP
068cab8d20 libxbps: performance improvements by caching the most accessed paths.
1- We can cache the result of the first xbps_pkgdb_init() when it fails
   and avoid the malloc/free/access from it.
2- We cache the uname(2) result into a private var in xbps_handle and
   use it in xbps_pkg_arch_match().

This improves performance by ~5% approx and it's close as it was before
introducing the repository index format 1.5.
2012-06-15 15:33:11 +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
efefa000b2 xbps_dictionary_metadata_plist_by_url: only accept exact matches. 2012-06-05 20:53:15 +02:00
Juan RP
21060384d3 xbps-repo/index.c: misc cosmetic change. 2012-06-02 16:51:22 +02:00
Juan RP
06034ea928 xbps-repo: index: don't write plist if no changes were made. 2012-06-01 17:03:05 +02:00
Juan RP
3399184511 xbps-repo: genindex target now removes any obsolete binpkg not registered in index. 2012-06-01 16:37:44 +02:00
Juan RP
b20dffd2c0 xbps-repo: misc fixes/improvements to index{,-files}.c code. 2012-06-01 10:57:58 +02:00
Juan RP
7289547432 Welcome "repository index format 1.5". See NEWS for information. 2012-05-31 16:29:56 +02:00
Juan RP
fe1e8d14c8 xbps-repo: [genindex] print to stdout when obsolete entry is removed. 2012-01-24 09:47:40 +01:00
Juan RP
9a088937b5 Repository index 1.4 -- see NEWS file for info. 2012-01-19 12:26:40 +01:00
Juan RP
4fdf675249 xbps-repo: index.c: oldpkgver might be undefined if entry is removed from index. 2012-01-17 11:25:45 +01:00
Juan RP
beb7284681 xbps-repo: faster 'genindex' target implementation for index-files.plist. 2012-01-17 10:50:35 +01:00
Juan RP
de4504c248 Update refs to pkg-index, which aren't true anymore. 2011-11-10 09:21:17 +01:00
Juan RP
662b5acc08 Implemented "New repository scheme and configuration file" from issue 16. 2011-11-07 20:28:35 +01:00
Juan RP
508f119bc9 Moved install transaction code to libxbps, see NEWS file. 2011-07-27 17:13:54 +02:00
Juan RP
33d6d2e166 libxbps: API/ABI break changes to fix issues with virtual packages.
Please see the NEWS file for info about this commit.
2011-07-15 18:22:58 +02:00
Juan RP
f7918ec5aa xbps-repo: ignore pkgs providing virtualpkgs in genindex target. 2011-07-11 10:12:42 +02:00
Juan RP
b62f1f0396 xbps-repo: remove unused pkgname var for previous commit. 2011-07-09 13:33:48 +02:00
Juan RP
cdf4640246 xbps-repo(8): 'genindex' now removes entries for unexistent pkgs.
Packages that were previously registered in repository's pkg-index.plist
and are now unaccessible are removed.

This fixes issue #1 in github.com/vanilla/xbps.
2011-07-09 13:18:11 +02:00
Juan RP
81d5bdd79a xbps-repo: fix the 'genindex' target with missing directories.
This fixes issue #3 in github.com/vanilla/xbps.
2011-07-09 11:21:17 +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
cfa637db48 Repository package index format 1.2.
The pkg index now stores all package objects from props.plist, so that
xbps-repo(8) doesn't have to access the target binpkg anymore.
2011-05-27 17:32:42 +02:00
Juan RP
73200498a5 xbps-repo: do not add build_date, homepage and license objs into the index. 2011-05-27 07:10:33 +02:00
Juan RP
fca3d6b9bf Use xbps_{error,warn}_printf() everywhere. 2011-01-30 18:23:33 +01:00
Juan RP
faad0a6597 Make xbps_remove_pkg_from_* use shared code, and add another variant.
The functions have been renamed to really match what they do.
2011-01-27 18:22:57 +01:00
Juan RP
1c21a98545 Rename some symbols in repository_plist.c.
xbps_repository_get_pkg_plist_dict_from_url -> xbps_repository_plist_find_pkg_dict_from_url
xbps_repository_get_pkg_plist_dict -> xbps_repository_plist_find_pkg_dict
2011-01-27 13:53:33 +01:00
Juan RP
b017f6d024 xbps-repo: fix the 'genindex' target due to 0.7.0 API changes. 2010-12-16 11:37:31 +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
8b222fd093 xbps-repo/index.c: fix a typo. 2010-05-18 23:06:27 +02:00
Juan RP
754ec6ebb1 xbps-repo: fix genindex target to not return error when a package is already
registered in the index.
2010-05-18 02:42:21 +02:00
Juan RP
7976ac3707 xbps-repo/index.c: fix warnings found by clang.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100428211333-wi7id42b9ol7g2ae
2010-04-28 23:13:33 +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
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
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
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
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
fa7e3a3a7e xbps-repo: genindex: also remove the "conf_files" object.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091125074221-iccaravanpovtjgd
2009-11-25 07:42:21 +00:00
Juan RP
4c1ae5d3d6 xbps-repo: improve genindex target, reorganize main.c file.
- genindex: use new recently added function, remove some objects from
  generated pkg dictionaries, they will be fetched remotely.
- moved some code from main.c into repository.c.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091125043204-nbtdtaxkga3dad2h
2009-11-25 04:32:04 +00:00
Juan RP
2693e54ef6 xbps-repo: genindex: optimization change.
While looking at the archive for the XBPS_PKGPROPS file, it's unlikely
that it will have it after reading 6 entries, so discard it completely
and show an error message.

The XBPS_PKGPROPS it's always there at index <= 4.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091125001733-i46wnqdxp497km6s
2009-11-25 00:17:33 +00:00
Juan RP
4e7bb3b451 xbps-repo: genindex: print error msg if required dirs to store
binpkgs are not there.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124234531-a80dunrglt6st72i
2009-11-24 23:45:31 +00:00
Juan RP
ea882fca0b xbps-repo: make xbps_repo_addpkg_index() static.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124111123-1e8hxb9ry42oq9wr
2009-11-24 11:11:23 +00:00
Juan RP
3a65c45de3 Refactored shared code between xbps-bin(8) and xbps-repo(8).
- xbps-repo: move protos to defs.h and remove index.h and util.h.
- xbps-bin: move code that belongs to it from xbps-repo to show-info-files.c.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124110539-nsdjp0ajr7nn8pa3
2009-11-24 11:05:39 +00:00
Juan RP
d7987e8e32 xbps-repo genindex: fix use after free, remove outdated binpkg files
by default.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124030606-3y34svrtnad21kgk
2009-11-24 03:06:06 +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