Commit Graph

816 Commits

Author SHA1 Message Date
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
a1100fd00d libxbps: when updating ignore pkgs in config-files state. 2011-06-23 11:40:11 +02:00
9468520e69 libxbps: fixed a bug in virtual pkg handling.
When resolving dependencies it didn't take into account virtual packages
in some cases.
2011-06-23 11:30:04 +02:00
5847a11570 xbps_fetch_file: remove local file if bigger than remote and refetch. 2011-06-23 00:06:50 +02:00
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
12d488ec47 xbps_repository_pool_init: return errno value if a repo sync fails. 2011-06-22 10:54:06 +02:00
6fe2c61c59 xbps_init: missing argument in a printf. 2011-06-22 10:53:20 +02:00
e9fa37bc2f xbps_repository_sync_index: preserve errno in error path and add debug printfs. 2011-06-22 10:52:46 +02:00
fbfa9c5960 New option in conffile to set libfetch's limit (seconds) in timed out connections. 2011-06-22 09:53:44 +02:00
092c832e6c mkpath: indent some comments. 2011-06-21 10:43:52 +02:00
0bc77f86fa xbps_pkg_epoch is not supported anymore with NetBSD's dewey. 2011-06-14 11:26:00 +02:00
3bd48a8521 lib/dewey.c: minor cosmetic changes. 2011-06-14 11:25:28 +02:00
cb7b44bc13 Rename property in conf file for virtual packages to "virtual-packages". 2011-06-04 11:30:21 +02:00
ebae4fbfca xbps_init: fix logic. 2011-06-04 17:12:26 +02:00
5a355ed6d9 It's now possible to set rootdir, cachedir, and fetch caches in the conf file. 2011-06-04 17:08:44 +02:00
b2840a3f16 plist_fetch: add some debugging printfs to know when network access is working. 2011-06-04 16:05:19 +02:00
20c36d73ef xbps_init: don't panic if conf_dictionary cannot be internalized, just continue. 2011-06-04 15:51:32 +02:00
51bee11bfa Switch xbps_cmpver() to use NetBSD's dewey code. 2011-06-04 15:42:50 +02:00
47e3a3f39b xbps_init: add a debug printf if repository array in conf file is empty. 2011-06-04 15:08:50 +02:00
36346a7ca0 xbps_init: add a debug printf. 2011-06-04 14:17:11 +02:00
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
2d6140f65b Rename: xbps_read_dict_from_archive_entry() -> xbps_dictionary_from_archive_entry(). 2011-06-02 09:54:59 +02:00
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
ef28101203 xbps_register_pkg: remove 'automatic' boolean argument.
It should be provided in the proplib dictionary with key 'automatic-install'.
This fixes a regression not respecting the 'automatic-install' value stored
in regpkgdb.
2011-04-11 14:42:06 +02:00
d9eb0341cd Some dead stores and build fixes reported by LLVM 2.9. 2011-04-07 12:24:20 +02:00
6a91c2894e xbps_unpack_binary_pkg: fix wrong path to metadata files! 2011-03-04 10:48:39 +01:00
0452c7c9dd Fix a dup'ed word. 2011-03-03 17:56:18 +01:00
8191a1511c Make it possible to overwrite the "automatic-install" pkg object via xbps_init().
Two new booleans were added to struct xbps_handle: install_reason_{auto,manual}.
The backend is able to force auto or manual installation for a package (and
dependencies that were installed/updated) by setting to true any of those
booleans. Bump XBPS_RELVER.
2011-02-26 11:11:45 +01:00
2c644c6587 Treat pkgs with NULL or empty requiredby arrays as orphans. 2011-02-26 11:08:58 +01:00
0435772097 Fix chdir(2) path in previous. 2011-02-25 11:21:12 +01:00
ce24ff488c xbps_file_exec: if chroot(2) returns EPERM, don't error out and try chdir(2).
This makes possible to install a base system with fakeroot (of course
some things won't probably work fully).
2011-02-25 11:17:13 +01:00
9759a62e3f Do not printf a warning if remove(3) returns EEXIST/ENOTEMPTY/EBUSY. 2011-02-25 10:51:43 +01:00
0a6299318e Revert revision 581: "Inline some very common functions in the API."
Some compilers yet don't support fully the inline C99 keyword and
there's little benefit anyway.
2011-02-24 15:48:50 +01:00
17be7bab81 configure: misc compiler flags fixes.
- Don't use -Wp, some compilers don't understand it. Simply use -D__BLAH___.
- Check for -Wl,--export-dynamic and if that fails try -rdynamic.
2011-02-24 15:33:53 +01:00
a252df4a8b xbps_humanize_number: increase by one the output digits. 2011-02-24 10:46:10 +01:00
e4c24e5fea xbps_read_dict_from_archive_entry: handle all erros returned by zlib's inflate(). 2011-02-24 10:00:21 +01:00
7c6119427c While installing a pkg, remove files with wrong hash before unpacking. 2011-02-24 00:24:11 +01:00
7e4118a6e2 Added xbps_get_file_hash_from_dict(), returns the sha256 string obj in a dictionary. 2011-02-24 00:21:40 +01:00
d357dfed90 Inline some very common functions in the API. 2011-02-23 17:27:51 +01:00
8baad7b5da Simplify setting pkg state in transaction's dictionary. 2011-02-23 17:14:33 +01:00
a306cebc96 xbps_set_pkg_state_installed: added two new optional arguments: version and pkgver.
This can be used to avoid some rare cases where the pkg dictionary is regpkgdb
is in a state where code can be faulty if those objects are not found.
2011-02-22 11:09:39 +01:00
15d164c70a xbps_repository_{install,update}_pkg: respect pkg state in regpkgdb. 2011-02-22 10:31:16 +01:00
511dbffa9e Simplify find_pkg_in_array(). 2011-02-21 23:21:53 +01:00
bdfa81c29d package_unpack.c: fix a comment. 2011-02-21 17:57:46 +01:00
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
afe0f3e2f0 Make the xbps_handle struct const internally. 2011-02-21 14:03:08 +01:00
22ae7aa2e8 Introduce struct xbps_handle and use it for xbps_init().
This structure sets up function callbacks for fetching files and
unpacking binary packages, as well as setting the debug boolean.

This way the affected functions (xbps_fetch_file() and
xbps_unpack_binary_pkg()) do not need to accept the fn cb pointers
and data as arguments.

Bump XBPS_RELVER.
2011-02-21 13:38:44 +01:00
078f9f1cda Fixed finally another real case when updating and replacing pkgs. 2011-02-18 16:39:42 +01:00
8b58b88a5f xbps_repository_{install,update}_pkg: fixed a stupid logic error. 2011-02-18 16:37:16 +01:00
032f993a53 xbps_repository_pool_init: do not fail to internalize all repos when the first one fails.
If the first registered repo couldn't be internalized, all other repositories
were also failing because it returned error, so simply skip them and return
error when all them cannot be internalized.
2011-02-17 09:24:57 +01:00