Commit Graph

308 Commits

Author SHA1 Message Date
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
092c832e6c mkpath: indent some comments. 2011-06-21 10:43:52 +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
3bd48a8521 lib/dewey.c: minor cosmetic changes. 2011-06-14 11:25:28 +02:00
Juan RP
cb7b44bc13 Rename property in conf file for virtual packages to "virtual-packages". 2011-06-04 11:30:21 +02:00
Juan RP
ebae4fbfca xbps_init: fix logic. 2011-06-04 17:12:26 +02:00
Juan RP
5a355ed6d9 It's now possible to set rootdir, cachedir, and fetch caches in the conf file. 2011-06-04 17:08:44 +02:00
Juan RP
b2840a3f16 plist_fetch: add some debugging printfs to know when network access is working. 2011-06-04 16:05:19 +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
51bee11bfa Switch xbps_cmpver() to use NetBSD's dewey code. 2011-06-04 15:42:50 +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
36346a7ca0 xbps_init: add a debug printf. 2011-06-04 14:17:11 +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
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
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
Juan RP
d9eb0341cd Some dead stores and build fixes reported by LLVM 2.9. 2011-04-07 12:24:20 +02:00
Juan RP
6a91c2894e xbps_unpack_binary_pkg: fix wrong path to metadata files! 2011-03-04 10:48:39 +01:00
Juan RP
0452c7c9dd Fix a dup'ed word. 2011-03-03 17:56:18 +01:00
Juan RP
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
Juan RP
2c644c6587 Treat pkgs with NULL or empty requiredby arrays as orphans. 2011-02-26 11:08:58 +01:00
Juan RP
0435772097 Fix chdir(2) path in previous. 2011-02-25 11:21:12 +01:00
Juan RP
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
Juan RP
9759a62e3f Do not printf a warning if remove(3) returns EEXIST/ENOTEMPTY/EBUSY. 2011-02-25 10:51:43 +01:00
Juan RP
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
Juan RP
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
Juan RP
a252df4a8b xbps_humanize_number: increase by one the output digits. 2011-02-24 10:46:10 +01:00
Juan RP
e4c24e5fea xbps_read_dict_from_archive_entry: handle all erros returned by zlib's inflate(). 2011-02-24 10:00:21 +01:00
Juan RP
7c6119427c While installing a pkg, remove files with wrong hash before unpacking. 2011-02-24 00:24:11 +01:00
Juan RP
7e4118a6e2 Added xbps_get_file_hash_from_dict(), returns the sha256 string obj in a dictionary. 2011-02-24 00:21:40 +01:00
Juan RP
d357dfed90 Inline some very common functions in the API. 2011-02-23 17:27:51 +01:00
Juan RP
8baad7b5da Simplify setting pkg state in transaction's dictionary. 2011-02-23 17:14:33 +01:00
Juan RP
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
Juan RP
15d164c70a xbps_repository_{install,update}_pkg: respect pkg state in regpkgdb. 2011-02-22 10:31:16 +01:00
Juan RP
511dbffa9e Simplify find_pkg_in_array(). 2011-02-21 23:21:53 +01:00
Juan RP
bdfa81c29d package_unpack.c: fix a comment. 2011-02-21 17:57:46 +01: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
Juan RP
afe0f3e2f0 Make the xbps_handle struct const internally. 2011-02-21 14:03:08 +01:00
Juan RP
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
Juan RP
078f9f1cda Fixed finally another real case when updating and replacing pkgs. 2011-02-18 16:39:42 +01:00
Juan RP
8b58b88a5f xbps_repository_{install,update}_pkg: fixed a stupid logic error. 2011-02-18 16:37:16 +01:00
Juan RP
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
Juan RP
d5c2a3266f Rename the transaction object key to "transaction" rater than "trans-action". 2011-02-05 12:21:04 +01:00
Juan RP
8803bfd7d8 Move plist find/remove functions into its own files. 2011-02-05 12:06:03 +01:00
Juan RP
f4cdbaf17d Move xbps_read_dict_from_archive_entry() and friends into its own file. 2011-02-05 11:57:13 +01:00
Juan RP
de296d8192 Added the concept of package properties in the API.
See the NEWS file and xbps-bin(8) for more information.
2011-02-05 11:25:04 +01:00
Juan RP
ec7549fa04 xbps_sort_pkg_deps: change an assertion into a real check. 2011-02-04 16:17:47 +01:00
Juan RP
097b50b3c2 Fix all warnings found by clang analyzer as reported by ojab in issue 3. 2011-02-03 17:49:43 +01:00
Juan RP
0a26497b50 xbps_repository_update_allpkgs: return ENOENT if regpkgdb dict cannot be internalized. 2011-02-03 09:34:38 +01:00
Juan RP
692caea1cd xbps_get_pkg_state_*: if state object is not available return EINVAL. 2011-02-02 09:53:56 +01:00