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
98a2508c2e
xbps_repository_sync_pkg_index: fix copy/paste in trans err_cb.
2011-07-28 09:34:29 +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
ce0b21a062
xbps_dictionary_from_metadata_plist: fix this with empty regpkgdb.plist.
...
If regpkgdb wasn't initialized it failed to properly internalize the
dictionary from the plist file.
2011-07-27 11:23:25 +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
19f4cbd995
Generate transaction pkg count stats in the transaction dictionary.
...
This removes a chunk in frontends to compute number of installed,
updated, configured and removed pkgs in transaction.
2011-07-24 17:43:17 +02:00
Juan RP
32be850c9d
libxbps: make dewey code be aware of XBPS pkg revisions.
...
This makes the comparision "1.4.11.1" greater than "1.4.11_1", that
previously thought they were the same version.
2011-07-22 07:30:40 +02:00
Juan RP
a22a6c3be1
libxbps: move hash funcs from util.c into its own file.
2011-07-19 21:21:28 +02:00
Juan RP
468366b1b2
libxbps: move match funcs from plist_find.c into its own file.
2011-07-19 21:07:04 +02:00
Juan RP
5dfe493a88
xbps_check_is_installed_pkg_by_name: also check for virtual pkgs.
2011-07-17 01:43:56 +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
5585b98ac6
libxbps: take into account virtual-pkg settings in conf file when updating.
2011-07-08 15:28:57 +02:00
Juan RP
900e35a15e
xbps_unpack_binary_pkg: printf existents entries iff XBPS_FLAG_VERBOSE is set.
2011-07-05 17:47:37 +02:00
Juan RP
979c585652
Preserve files on disk while installing a binary package.
...
While installing packages, if any file that is going to be unpacked
exists on disk don't remove it. Always preserve them to avoid missing
files on currently installed package if there are file conflicts.
2011-07-03 17:12:02 +02:00
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