Juan RP
f0745120f6
Fix sorting algorithm to add same pkgs with different transaction reasons.
2011-06-25 22:53:16 +02:00
Juan RP
fe2bbb675f
xbps_unpack_binary_pkg: fix previous and also handle ERANGE after unlink.
2011-06-25 18:19:56 +02:00
Juan RP
f29bbc7029
Backed out changeset 2d5467e382fd
...
This broke some dependency patterns, revert it for now.
2011-06-25 12:45:17 +02:00
Juan RP
a984c60437
xbps_cmpver: test for DEWEY_GT because it's most commonly used.
...
Also some code that handled "netbsd" pkg revisions have been removed,
we don't/won't use it.
2011-06-25 12:37:10 +02:00
Juan RP
e218e710f9
xbps_unpack_binary_pkg: in remove_file_wrong_hash() handle ENOENT errors.
2011-06-25 11:47:42 +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
a1100fd00d
libxbps: when updating ignore pkgs in config-files state.
2011-06-23 11:40:11 +02:00
Juan RP
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
Juan RP
5847a11570
xbps_fetch_file: remove local file if bigger than remote and refetch.
2011-06-23 00:06:50 +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
6fe2c61c59
xbps_init: missing argument in a printf.
2011-06-22 10:53:20 +02:00
Juan RP
e9fa37bc2f
xbps_repository_sync_index: preserve errno in error path and add debug printfs.
2011-06-22 10:52:46 +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
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