Commit Graph

19 Commits

Author SHA1 Message Date
Juan RP
494504dbec Added support for a cachedir to store downloaded binpkgs.
libxbps:
 * Added xbps_set_cachedir() and xbps_get_cachedir(). By default it's
   set to /var/cache/xbps if not specified and it's always relative
   to the root directory.
 * Move mkpath() code from sync_remote_pkgidc.c into its own file mkpath.c
   to use it in another parts of the code.
 * Added xbps_get_binpkg_local_path(), that returns the local path to
   a binary package file, stored in cachedir or local repo.
 * Remote pkg index files are now stored directly in metadir/repodir,
   skipping the arch directory because binpkgs are now in cachedir.

xbps-bin:
 * Added -c flag to set the cachedir.
 * Check sha256 hashes in the download stage so that it can check
   a downloaded binpkg immediately once is stored.
 * If a binpkg doesn't match the hash it will be refetched.

Bump XBPS_RELVER to 20091128.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128013841-kkcvk07lsqdr26w8
2009-11-28 02:38:41 +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
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
3d24672e58 Improve dependency matching via repos and use the "pkgver" object
in pkg dictionary to improve performance in some cases.

Bumped XBPS_RELVER to 20091121.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091122041547-oywx4db75j8uttl3
2009-11-22 05:15:47 +01:00
Juan RP
2b790a4c2f xbps-bin: rename 'show-manual' target to 'list-manual', it's a better
name IMHO :-)

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091109015919-fl3jr6eehyy1ff1v
2009-11-09 02:59:19 +01:00
Juan RP
e479879e9f xbps-bin: use exit(2) rather than _exit(2).
This was causing premature exiting when piping the program!

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091030004257-l94g3e88qroulfym
2009-10-30 01:42:57 +01:00
Juan RP
3a2f421109 xbps-bin: added "show-manual" target.
This targets shows the list of packages that were installed manually,
i.e not as dependencies.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091028023913-i4qh7ky1puezyhrt
2009-10-28 03:39:13 +01:00
Juan RP
b689725270 xbps-bin: use a single point to cleanup resources.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023120154-wj4937kmu6ryacpk
2009-10-23 14:01:54 +02:00
Juan RP
ca39d1667e xbps-bin: use a signal handler for SIGINT, SIGTERM and SIGQUIT to
free resources used by libxbps.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091023092025-gav4w23f1oc7mgjy
2009-10-23 11:20:25 +02:00
Juan RP
fdc561dfb2 xbps-{bin,repo,pkgdb}: added -V flag that prints the current XBPS
release version as defined in xbps_api.h.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091018084204-1xzyptqkjm5dwfjc
2009-10-18 10:42:04 +02:00
Juan RP
f7689695d1 xbps-bin/install.c: use only a function for install/update/autoupdate.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016153732-gbcr30fahvveu2u9
2009-10-16 17:37:32 +02:00
Juan RP
cb1f10d415 xbps-bin: don't initialize repolist data unless we want to update.
xbps_find_new_pkg: always initialize repolist data.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016150435-wpjfd453hpwr5k89
2009-10-16 17:04:35 +02:00
Juan RP
e1f2a8b7bd xbps-bin: multiple fixes to update packages.
* Fix 'autoupdate' target to look for new packages in ALL repos, not
  just the first one that has the package.
* Fix 'update' target to work correctly.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016133157-asvkv5jb6i9q2ibe
2009-10-16 15:31:57 +02: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
06f70e182c xbps-bin: rename the 'files' target to 'show-files' for consistency.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091005220659-l3rdop78ju04mi9v
2009-10-06 00:06:59 +02:00
Juan RP
10531d7d45 Fix xbps_configure_pkg() reporting old version when upgrading packages.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20090825040302-azurxpyalot07j81
2009-08-25 06:03:02 +02:00
Juan RP
6d84cde6f1 xbps-bin: add two new targets 'show-deps' and 'show-revdeps" to print
dependencies and reverse dependencies of a package, respectively.

'xbps-bin show' no longer prints the deps anymore.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20090821231219-n26o21xcxor46nk1
2009-08-22 01:12:19 +02:00
Juan RP
ecfa25833f Improve marginally configuring/purging all packages by looking at its
state in the object dictionary rather than opening and externalizing
the dictionary of every package.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20090821093126-0xw980x0pqtq59q2
2009-08-21 11:31:26 +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