Commit Graph

16 Commits

Author SHA1 Message Date
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
Juan RP
9e062cec4f xbps-repo: do the right thing in some error paths.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091118231106-xxbg5oyvnojv1ykd
2009-11-19 00:11:06 +01:00
Juan RP
d5f9366bfc xbps-repo: fix previous, writing a dangling string and a leak in exit path.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091118061745-xirdogil114siw2c
2009-11-18 07:17:45 +01:00
Juan RP
f859663a4b xbps-repo: made 'genindex' code run ~60% faster than before!
Rather than externalizing the package index plist file to storage every
time a package is registered, only do it one time once all packages
have been processed. Creating an index with 700 pkgs now takes 14s
in a VM, where before it took 39s. As consequence of this, the 'add-pkgidx'
target is no longer relevant or useful, remove it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091118053439-ct1chn4hdeir1pdo
2009-11-18 06:34:39 +01:00
Juan RP
7aebea684b Implemented support for working with remote repositories.
libfetch from NetBSD's pkgsrc has been imported into lib/fetch, but
the objects are embedded into libxbps. Only a public function to fetch
files has been implemented: xbps_fetch_file().

The library now is built with -fvisibility=hidden by default, and
exported symbols are the ones that use the SYMEXPORT macro.

The code works well enough, but will need many more cleanups.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091027004600-0lq9aao67lisbzxv
2009-10-27 01:46:00 +01:00
Juan RP
deedf07d4e xbps-repo: fix swapped args in xbps_repo_addpkg_index().
--HG--
extra : convert_revision : xtraeme%40gmail.com-20090818140504-ea3rvio2ipbs501i
2009-08-18 16:05:04 +02:00
Juan RP
ca9d72d460 Implement blueprint 'xbps-repo-list-via-cmdline'.
A new target (add-pkgidx) has been added to the xbps-repo command,
that takes two args, local repository dir and path to binpkg.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20090818121244-pfdagkfqeukn1t2r
2009-08-18 14:12:44 +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