Commit Graph

172 Commits

Author SHA1 Message Date
Juan RP
bbfd2813b2 libxbps: renamed xbps_repository_{install,update}_xxx to xbps_transaction_xxx. 2011-11-25 10:12:03 +01:00
Juan RP
f3099fa2c6 Added success states for state_cb, move some descriptions to the client cb. 2011-11-25 09:44:49 +01:00
Juan RP
ab17573692 Split XBPS_FLAG_FORCE into CONFIGURE and REMOVE_FILES, bump XBPS_API_VERSION. 2011-11-24 11:50:53 +01:00
Juan RP
3ccfec7054 Improved callback/states support to make libxbps std{err,out} printf free.
This is a major API/ABI change, documentation has been updated accordingly.
2011-11-24 11:23:08 +01:00
Juan RP
19664f624a libxbps: return success when requiredby entry already exists. 2011-11-17 12:57:43 +01:00
Juan RP
86f1f18571 libxbps: revamped trans states/cb to be more generic, not just for transactions. 2011-11-11 09:41:48 +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
e46dd09127 Faster binary package unpacking, see the NEWS file for info. 2011-11-09 21:01:25 +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
7b251477e5 Bump XBPS_API_VERSION for recent changes. 2011-10-31 21:30:08 +01:00
Juan RP
cf1b893995 libxbps: there's no need to look for vpkgs in xbps_repository_update_*(). 2011-10-31 21:01:53 +01:00
Juan RP
c5d6ccde46 libxbps: make check_is_installed_pkg_* use only find_virtualpkg_dict_installed.
xbps_find_virtualpkg_dict_installed() also finds real packages, so there's no
need to use both in xbps_check_is_installed_pkg_by_{name,pattern}.

Bump XBPS_API_VERSION.
2011-10-30 16:24:56 +01:00
Juan RP
2a8b74484e libxbps: improve xbps_purge_pkg() in case that metadata dir doesn't exist. 2011-10-30 11:12:03 +01:00
Juan RP
858e616f41 libxbps: preserve config file if they exist for replaced pkgs. 2011-10-30 10:32:56 +01:00
Juan RP
1c4d486396 xbps-{bin,repo}: new -o flag for the 'show' target, to print specific objs value. 2011-10-29 08:17:54 +02:00
Juan RP
9034df9bc2 libxbps: added xbps_match_any_virtualpkg_in_rundeps(array rundeps, array provides).
Matches any pkgdep from provides array in the rundeps array with
pkgpatterns. True on match, false otherwise.
2011-10-27 18:48:59 +02:00
Juan RP
43ab2ec083 libxbps: fixed a bug with virtualpkgs as dependencies in a transaction. 2011-10-27 10:54:28 +02:00
Juan RP
c6636d1b79 libxbps: xbps_pkgpattern_xxx extend set of chars to be detected. 2011-10-24 10:03:45 +02:00
Juan RP
9281e9625f libxbps: xbps_pkgpattern_{name,version}: match for dewey and glob patterns.
The match code used by libxbps now will only match for dewey patterns
and glob patterns (fnmatch).

Bumped XBPS_API_VERSION due to changed behaviour.
2011-10-24 09:28:43 +02:00
Juan RP
5ade2f37c7 libxbps: xbps_configure_pkg: ignore pkgs in config-files state. 2011-10-20 16:13:16 +02:00
Juan RP
51b45a0d08 libxbps: improve code to match replaced package patterns.
The replaces code now checks all package dictionaries in the
transaction dictionary, and the sorting algorithm will put packages
to be removed at the head of the tailq.

This should fix issue 11 in googlecode.
2011-10-20 14:39:58 +02:00
Juan RP
0a041cdd2e libxbps: new func xbps_array_replace_dict_by_name(array, dict, pkgname)
This function replaces a dictionary in an array matched by pkgname,
with the dictionary passed in as 2nd argument.
2011-10-19 00:37:36 +02:00
Juan RP
931a03b806 New configuration schemas changes, round 3.
struct xbps_handle::conffile has been renamed to confdir, and it now
expects the path to a directory, where the configuration files are
stored.

Change xbps-bin(8) and xbps-repo(8) along with its manpages to mention
that -C expects a directory.
2011-10-17 15:11:54 +02:00
Juan RP
08f7169eff New configuration scheme changes, round 2 (virtual pkgs).
- XBPS now expects to read individual virtual pkg settings from
  .plist files in PREFIX/etc/xbps/virtualpkg.d.wants.

This really implements the missing part in issue #12 in
googlecode: http://code.google.com/p/xbps/issues/detail?id=12
2011-10-17 14:24:30 +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
b6da7393c1 libxbps: make the xbps_find_*pkg_dict_installed work as expected.
Bump XBPS_API_VERSION due to semantics change in virtual and non virtual
functions.
2011-10-16 17:21:43 +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
104bec27e5 libxbps: handle the case to replace a vpkg with a pkg with same name.
This for example fixes reinstalling jpeg and libjpeg-turbo multiple
times. Also if the "automatic-install" obj is in the pkg to be
replaced, copy it to the new pkg to be preserved.

Bumped XBPS_API_VERSION.
2011-10-16 10:28:03 +02:00
Juan RP
ead8d2460f libxbps: respect reqdby obj when replacing a pkg with a virtual pkg.
Reverse dependencies weren't respected when replacing a pkg with
another pkg that is providing a virtual pkg for the former.

This resulted in reversedeps being completely lost when new pkg
is installed.
2011-10-15 16:43:27 +02:00
Juan RP
c3395a2f3b Bump XBPS_API_VERSION for last libxbps change. 2011-10-12 09:28:50 +02:00
Juan RP
3c61de45aa xbps_api.h: fix xbps_transaction_cb_data::repourl descr. 2011-08-18 10:42:37 +02:00
Juan RP
ba5913cbb9 libxbps: [unpack] only extract files if they have been modified. 2011-08-01 12:35:47 +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
5e390b8839 Introduce new pkg state: half-unpacked.
Packages in this state shall be re-installed and re-unpacked because its
files weren't unpacked properly.
2011-07-28 16:25:01 +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
d7d077a377 xbps_api.h: fixed some comments. 2011-07-27 23:18:25 +02:00
Juan RP
508f119bc9 Moved install transaction code to libxbps, see NEWS file. 2011-07-27 17:13:54 +02:00
Juan RP
e26b6e23e6 xbps-bin(8): make 'show{,-deps,-revdeps}' target work with virtual pkgs. 2011-07-25 16:40:34 +02:00
Juan RP
59ddc58187 xbps_api.h: fix descr in xbps_cmpver(). 2011-07-22 18:05:21 +02:00
Juan RP
17829cd6b4 libxbps: add xbps_find_virtualpkg_in_array_by_{name,pattern} and use it. 2011-07-15 18:45:38 +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
0a2abb3f3d xbps-repo(8): 'search' target is now case insensitive.
Along with this change, compat code has been added (from NetBSD)
for systems that don't have it. The compat code has been reorganized
to be in a common place and its prototypes in compat.h.

The configure scripts checks if strcasestr() is available, and
uses compat code if not found.

This fixes issue #2 on github.com/vanilla/xbps.
2011-07-09 10:50:44 +02:00
Juan RP
f897ffa431 Do not redefine strlc{at,py} prototypes. 2011-06-29 12:16:04 +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
fbfa9c5960 New option in conffile to set libfetch's limit (seconds) in timed out connections. 2011-06-22 09:53:44 +02:00
Juan RP
0bc77f86fa xbps_pkg_epoch is not supported anymore with NetBSD's dewey. 2011-06-14 11:26:00 +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
2d6140f65b Rename: xbps_read_dict_from_archive_entry() -> xbps_dictionary_from_archive_entry(). 2011-06-02 09:54:59 +02:00