Commit Graph

68 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
8ef8d86c12 Some changes for the XBPS libfetch's frontend code.
1) Raise the cache connection settings to more sane defaults (8->6, 16->2).
2) Introduce xbps_fetch_unset_cache_connection() to drop the caches.
2010-11-03 12:23:57 +01:00
Juan RP
28f997bdf7 libxbps: fixed all warnings found by clang.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100428213056-p1b7bh0llq8393r0
2010-04-28 23:30:56 +02:00
Juan RP
088baa7699 Add defs for default fetch cache connection limits and use them in
xbps_fetch_cache_connection() if 0 is passed as argument.

xbps-bin: enable fetch cached connection when downloading binpkgs.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124153156-4updprik11nwi7c1
2010-01-24 16:31:56 +01:00
Juan RP
801785cbab Add xbps_fetch_set_cache_connection() to set libfetch's cache connection limits.
Use it in xbps_fetch_file(), by default set with 8 and 16.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124144829-hqsr2bl6uflf0nhu
2010-01-24 15:48:29 +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
c676622869 Some changes to know if a file was downloaded successfully or not.
Improved xbps-repo sync/add and xbps-fetch to print informative
messages when a transfer was not necessary because local/remote size
and/or mtime matched.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124050326-owez7140fdxwepuk
2009-11-24 05:03:26 +00:00
Juan RP
83f71f3d2b xbps_fetch_file: in refetch case, do nothing if local/remote size match.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091124035440-qhbft4gqlgbgc554
2009-11-24 03:54:40 +00:00
Juan RP
4f80bddbb2 xbps-repo: print error if pkg-index file cannot be fetched.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091122060446-sc4na9qa2k2bk5f6
2009-11-22 07:04:46 +01:00
Juan RP
bc14a026a5 Improve download code, as well as fixing refetching when syncing to a
remote package index. Bump XBPS_RELVER to 20091118.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091118062814-3pqbs9n1797einhm
2009-11-18 07:28:14 +01:00
Juan RP
79d3f446fe xbps_fetch_file: return proper error if connection failed,
fix SSP problem with fetchflags!

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091107052101-ao6nqq8xrzb06tvr
2009-11-07 06:21:01 +01:00
Juan RP
748cc9c6b1 Improve xbps_fetch_file() and friends, one more time by Daft Punk.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091031140925-rjlkhq0v6fvmtawo
2009-10-31 15:09:25 +01:00
Juan RP
10e76c6420 xbps_fetch_file: erm fix previous, FETH_UNCHANGED is the correct one.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091031105541-8v2qt83jxazsxean
2009-10-31 11:55:41 +01:00
Juan RP
a9b7ffa94a xbps_fetch_file(): check for local/remote mtime, add some more
checks for errors, add some printfs.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091031104055-fy64xd6g6m938dxh
2009-10-31 11:40:55 +01:00
Juan RP
4e83deb0cc libxbps: avoid fetchStat() and use only fetchXGet().
Some HTTP servers (observerd with googlecode.com), issue a 404
if the headers are checked before issuing a GET transfer.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091030162044-ng8o944bajwdudg8
2009-10-30 17:20:44 +01:00
Juan RP
3905c2106c Properly build shared/static libxbps and utils.
xbps-fetch: added -v flag to see verbose messages in libfetch.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091030111726-axf9paz2k01ntqzz
2009-10-30 12:17:26 +01:00
Juan RP
79f9f34775 libxbps: added xbps_fetch_error_string(), that returns libfetch
fetchLastErrString.

Hook xbps-fetch to the tree and use the new function to print errors.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091030021303-6wu9sri5o8kgvfwl
2009-10-30 03:13:03 +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