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
0f0c66fafb
xbps_dictionary_from_metadata_plist: if pkgname not found try from a
...
virtual pkg.
2011-10-16 10:27:02 +02:00
a59f48585f
repository_pool_find_pkg: added some dbg printf, calloc -> malloc.
...
There's no need to use calloc here because some members are being
initialized anyway, so fully initialize all members and skip the memset
syscall via calloc.
2011-10-16 10:03:27 +02:00
e37a9efb74
libxbps: check in virtual pkgs when matching replaced pkgs.
2011-10-15 20:01:55 +02:00
d3e1c0dcf2
libxbps: when sorting deps take into account transaction reason.
2011-10-15 20:00:41 +02:00
f2ede44c80
libxbps: make xbps_find_virtualpkg_user *only* look for virtual pkgs.
2011-10-15 19:59:54 +02:00
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
20b0b4ce12
libxbps: when replacing a pkg, also fully purge the pkg(s).
2011-10-12 09:28:11 +02:00
024bec0045
Fixed HTTP repositories in non standard HTTP port (80).
...
The code didn't take into account for different ports and simply ignored
them, now they work correctly. This fixes issue 10 in googlecode.
2011-10-06 19:05:16 +02:00
4b68af989e
libxbps: xbps_repository_sync_index: return proper return value in error path.
2011-08-18 10:43:30 +02:00
ba5913cbb9
libxbps: [unpack] only extract files if they have been modified.
2011-08-01 12:35:47 +02:00
890bdd368f
xbps_unpack_binary_pkg: remove redudant error printf, cosmetic changes.
2011-07-29 23:28:36 +02:00
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
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
98a2508c2e
xbps_repository_sync_pkg_index: fix copy/paste in trans err_cb.
2011-07-28 09:34:29 +02:00
6f783389dd
Share transaction callbacks for xbps-{bin,repo}, reposync cb support.
2011-07-28 09:25:30 +02:00
508f119bc9
Moved install transaction code to libxbps, see NEWS file.
2011-07-27 17:13:54 +02:00
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
e26b6e23e6
xbps-bin(8): make 'show{,-deps,-revdeps}' target work with virtual pkgs.
2011-07-25 16:40:34 +02:00
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
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
a22a6c3be1
libxbps: move hash funcs from util.c into its own file.
2011-07-19 21:21:28 +02:00
468366b1b2
libxbps: move match funcs from plist_find.c into its own file.
2011-07-19 21:07:04 +02:00
5dfe493a88
xbps_check_is_installed_pkg_by_name: also check for virtual pkgs.
2011-07-17 01:43:56 +02:00
17829cd6b4
libxbps: add xbps_find_virtualpkg_in_array_by_{name,pattern} and use it.
2011-07-15 18:45:38 +02:00
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
f6476e210c
libxbps: do not loop forever on errors while syncing a remote repo.
2011-07-14 00:13:25 +02:00
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
5585b98ac6
libxbps: take into account virtual-pkg settings in conf file when updating.
2011-07-08 15:28:57 +02:00
900e35a15e
xbps_unpack_binary_pkg: printf existents entries iff XBPS_FLAG_VERBOSE is set.
2011-07-05 17:47:37 +02:00
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
f0745120f6
Fix sorting algorithm to add same pkgs with different transaction reasons.
2011-06-25 22:53:16 +02:00
fe2bbb675f
xbps_unpack_binary_pkg: fix previous and also handle ERANGE after unlink.
2011-06-25 18:19:56 +02:00
f29bbc7029
Backed out changeset 2d5467e382fd
...
This broke some dependency patterns, revert it for now.
2011-06-25 12:45:17 +02:00
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
e218e710f9
xbps_unpack_binary_pkg: in remove_file_wrong_hash() handle ENOENT errors.
2011-06-25 11:47:42 +02:00
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