Commit Graph

67 Commits

Author SHA1 Message Date
Juan RP
34bd49f85a New pkg metadata structure for 0.18. See the NEWS file for info. 2012-11-16 16:55:35 +01:00
Juan RP
05984a31b1 xbps_rpool_sync: new arg to specify the file; bump XBPS_API_VERSION. 2012-11-07 10:37:58 +01:00
Juan RP
15e43e550b xbps_rpool_release: fix a memleak found by valgrind.
(cherry picked from commit 90e24f4b18fdde44958584cdc038ff8a88e919a0)
2012-09-29 19:10:28 +02:00
Juan RP
8abd275bfb libxbps: xbps_rpool_release: don't release repo_pool, it's already released. 2012-06-18 10:49:36 +02:00
Juan RP
c24ce8e4da libxbps: use memcpy in critical paths for performance, fixed some memleaks. 2012-06-18 10:43:05 +02:00
Juan RP
974b2fe8ad libxbps: simplify pkgdb_get_pkgd and find_pkg_dict_installed internals.
There's no need to prop_dictionary_copy the returned dictionary to
later have to free it again, just return directly the dictionary and
avoid the free(3)s.
2012-06-16 09:02:07 +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
c7e4630056 xbps_rpool_sync: ignore fetch errors, they will be reported by state_cb. 2012-06-01 16:04:47 +02:00
Juan RP
642e6fca3a xbps_rpool_sync: also fetch repository files index, removed accidently in previous. 2012-06-01 15:45:49 +02:00
Juan RP
981b13bd5a xbps-repo: 'sync' and 'pkg-list' target now accept a repository URI argument.
If set, only the matching repository will be used for the task.
2012-06-01 15:02:06 +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
922ee1f1b6 libxbps: rename xbps_repository_pool_xxx to xbps_rpool_xxx. 2012-05-30 10:56:32 +02:00
Juan RP
934bc4869e rpool: make xbps_handle::repo_pool array immutable after initialization. 2012-04-13 10:06:08 +02:00
Juan RP
53d28fcb35 rpool: miscellaneous improvements to _init() and _release().
xbps_repository_pool_init:
 - Avoid unnecessary extra access(2) syscall when internalizing
   repository index plist files.
xbps_repository_pool_release:
 - Make sure to release internalized repository index arrays.
2012-04-12 11:54:11 +02:00
Juan RP
d8e7ed0a23 xbps_repository_pool_foreach: simplify internals. 2012-02-01 02:30:23 +01:00
Juan RP
a166d6a2a3 Simplify xbps_transaction_prepare()/commit() and related API changes.
- xbps_handle::transd -> new member with transaction dictionary.
- xbps_transaction_prepare: returns an int.
- xbps_transaction_commit: doesn't need any arg now.
- xbps_repository_pool_sync: doesn't need any arg now.
- xbps_pkgdb_update: removed xbps_handle * arg.
- xbps_transaction_missingdeps_get: removed, missing_deps array is in
  xbps_handle::transd("missing_deps") array object.
2012-01-22 10:00:46 +01:00
Juan RP
1781231454 xbps_repository_pool_init: make registered index arrays immutable. 2012-01-21 10:20:45 +01:00
Juan RP
6940505de9 regpkgdb rototill: renamed to pkgdb, improve the public API. 2012-01-20 11:10:52 +01:00
Juan RP
9a088937b5 Repository index 1.4 -- see NEWS file for info. 2012-01-19 12:26:40 +01:00
Juan RP
233d9f4803 Do not treat repositories with trailing '/' chars as invalid. 2012-01-15 17:23:50 +01:00
Juan RP
2186e16a5e Fixed issue 21 "xbps-repo find-files is awfully slow" reported by ojab. 2012-01-15 14:24:44 +01:00
Juan RP
ca0905925f xbps_end: don't continue if we don't have a valid xbps_handle pointer. 2011-12-22 16:55:35 +01:00
Juan RP
3d81d497bd Redo xbps_repository_pool internals, it's a bit faster now. 2011-12-22 16:38:05 +01:00
Juan RP
8fd5253e31 xbps_repository_pool_init: check repo arch before plist access(2), faster. 2011-12-22 12:56:49 +01:00
Juan RP
b0ceeaa58e New configuration file via confuse: xbps.conf. 2011-12-15 11:19:20 +01:00
Juan RP
43d85c76b3 xbps-repo: implement new target 'pkg-list' to list pkgs from target repo. 2011-12-03 10:37:31 +01:00
Juan RP
a470e6a1af libxbps: xbps_repository_pool_sync: show proper error on dbg printf. 2011-11-11 00:31:56 +01:00
Juan RP
94b6458415 libxbps: skip unfetched repos in xbps_repository_pool_init and simplify. 2011-11-11 00:07:26 +01:00
Juan RP
c2eed68471 libxbps: add xbps_repository_pool_sync, to sync repoidx from all remotes. 2011-11-10 23:14:50 +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
85c58e77c2 libxbps: rpool printf tweaks. 2011-10-29 09:45:51 +02:00
Juan RP
5642ffa86e New configuration scheme changes, round 1.
- Configuration file 'xbps-conf.plist' has been splitted off into
  two files: conf.plist and repositories.plist. By default they
  are stored in etc/xbps.
- Changed some members in xbps_handle struct, mostly to make it easy
  to change its value in {cache,root}dir and conffile.
- Made xbps_init() release proplib objects as soon as we don't need
  them, that way it uses 35% less of memory or in some cases even more.

There will be another commit that will implement to read new virtualpkg
settings by the user, as specified in:

	http://code.google.com/p/xbps/issues/detail?id=12
2011-10-17 12:37:15 +02:00
Juan RP
d551713c01 Move repository_pool_find code into its own file. 2011-10-16 14:31:53 +02:00
Juan RP
12af2370da libxbps: separate virtualpkg conf stuff from repository_pool_find_pkg.
Now to find a virtualpkg set by the user in conf file, there is a new
function: xbps_repository_pool_find_virtualpkg(). Use it in some
places to make jpeg -> libjpeg-turbo (and other pkgs that can be
replaced with other virtual pkgs) work correctly even if installed
multiple times.
2011-10-16 12:22:46 +02:00
Juan RP
a59f48585f repository_pool_find_pkg: added some dbg printf, calloc -> malloc.
There's no need to use calloc here because some members are being
initialized anyway, so fully initialize all members and skip the memset
syscall via calloc.
2011-10-16 10:03:27 +02:00
Juan RP
2857214afa libxbps: improve returned errnos for repository API functions.
- xbps_repository_update_packages: return ENOENT if regpkgdb is NULL
  (no packages currently registered).
- xbps_repository_update_packages: return EEXIST if no updates are
  available.
- xbps_repository_pool: return ENOTSUP if no repositories were
  registered.
- make xbps-{bin,repo} handle ENOTSUP errors.
2011-07-29 11:17:34 +02:00
Juan RP
6f783389dd Share transaction callbacks for xbps-{bin,repo}, reposync cb support. 2011-07-28 09:25:30 +02: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
f6476e210c libxbps: do not loop forever on errors while syncing a remote repo. 2011-07-14 00:13:25 +02:00
Juan RP
5585b98ac6 libxbps: take into account virtual-pkg settings in conf file when updating. 2011-07-08 15:28:57 +02:00
Juan RP
532edaddda libxbps: only initialize repository pool in repository_pool_foreach, fix a bug.
In xbps_repository_pool_init, xbps_fetch_file() returns 1 when a file is
successfully fetched and that var was used to check for successful initialization.
2011-06-24 21:20:06 +02:00
Juan RP
74ce033d45 Don't initialize repository pool via xbps_init, instead in repository_pool public funcs.
That way we can avoid having to sync all remote repositories for any code
using xbps_init()!
2011-06-22 11:55:02 +02:00
Juan RP
12d488ec47 xbps_repository_pool_init: return errno value if a repo sync fails. 2011-06-22 10:54:06 +02:00
Juan RP
20c36d73ef xbps_init: don't panic if conf_dictionary cannot be internalized, just continue. 2011-06-04 15:51:32 +02:00
Juan RP
47e3a3f39b xbps_init: add a debug printf if repository array in conf file is empty. 2011-06-04 15:08:50 +02:00
Juan RP
9673c4bd09 XBPS major changes in June 2011.
- A configuration file "xbps-conf.plist" replaces the (un)register target
  in xbps-repo(8) and (un)set-prop in xbps-bin(8). For now, you can set
  the repositories and prefered virtual packages.

- New package pattern matching code from NetBSD. Supports more ways of
  matching patterns in packages.

- Multiple bugs fixed in virtual packages related matching code.

--HG--
rename : LICENSE => COPYING
2011-06-04 13:37:53 +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
870ad18d58 xbps_init() now sets rootdir, cachedir and flags.
That means that the following functions were removed:
	- xbps_set_{cachedir,flags,rootdir}.
	- xbps_get_{cachedir,flags,rootdir}.

With this change fixed an obvious typo that made -c argument to not work,
and now the cache directory is an absolute path not relative to rootdir.
2011-02-21 17:42:47 +01:00