Commit Graph

486 Commits

Author SHA1 Message Date
Juan RP
662b5acc08 Implemented "New repository scheme and configuration file" from issue 16. 2011-11-07 20:28:35 +01:00
Juan RP
e472fc1334 xbps_repository_pool_find_pkg: return ENODEV in bestpkg case if pkg not installed. 2011-10-31 21:29:37 +01:00
Juan RP
5aca09b5f5 xbps_repository_update_pkg: return ENODEV if pkg is not installed. 2011-10-31 21:29:00 +01:00
Juan RP
cf1b893995 libxbps: there's no need to look for vpkgs in xbps_repository_update_*(). 2011-10-31 21:01:53 +01:00
Juan RP
b8c804e891 Check for obj validity with prop_object_type(), use xbps_pkg_has_rundeps(). 2011-10-31 09:48:46 +01:00
Juan RP
f35e1eff42 libxbps: improve debugging messages while looking for pkgs in repos. 2011-10-30 16:41:39 +01:00
Juan RP
c5d6ccde46 libxbps: make check_is_installed_pkg_* use only find_virtualpkg_dict_installed.
xbps_find_virtualpkg_dict_installed() also finds real packages, so there's no
need to use both in xbps_check_is_installed_pkg_by_{name,pattern}.

Bump XBPS_API_VERSION.
2011-10-30 16:24:56 +01:00
Juan RP
2a8b74484e libxbps: improve xbps_purge_pkg() in case that metadata dir doesn't exist. 2011-10-30 11:12:03 +01:00
Juan RP
858e616f41 libxbps: preserve config file if they exist for replaced pkgs. 2011-10-30 10:32:56 +01:00
Juan RP
07d47ab09a libxbps: xbps_dictionary_from_metadata_plist: respect pkgname arg. 2011-10-30 08:01:25 +01:00
Juan RP
70dd86e2df libxbps: more dbg printf love. 2011-10-29 09:55:09 +02:00
Juan RP
85c58e77c2 libxbps: rpool printf tweaks. 2011-10-29 09:45:51 +02:00
Juan RP
dbd5e05280 Make sure that downloaded pkg-index.plist is really a plist file. 2011-10-28 09:29:37 +02:00
Juan RP
9034df9bc2 libxbps: added xbps_match_any_virtualpkg_in_rundeps(array rundeps, array provides).
Matches any pkgdep from provides array in the rundeps array with
pkgpatterns. True on match, false otherwise.
2011-10-27 18:48:59 +02:00
Juan RP
43ab2ec083 libxbps: fixed a bug with virtualpkgs as dependencies in a transaction. 2011-10-27 10:54:28 +02:00
Juan RP
94591775d5 libxbps: fixed multiple free(3) calls via closedir(3) in virtualpkg init in error paths. 2011-10-26 16:16:09 +02:00
Juan RP
c6636d1b79 libxbps: xbps_pkgpattern_xxx extend set of chars to be detected. 2011-10-24 10:03:45 +02:00
Juan RP
7716fa15de libxbps: xbps_repository_find_pkg_xxx added a debug printf. 2011-10-24 10:01:27 +02:00
Juan RP
9281e9625f libxbps: xbps_pkgpattern_{name,version}: match for dewey and glob patterns.
The match code used by libxbps now will only match for dewey patterns
and glob patterns (fnmatch).

Bumped XBPS_API_VERSION due to changed behaviour.
2011-10-24 09:28:43 +02:00
Juan RP
4afaac4179 libxbps: remove csh alternate match code.
This code won't be used in XBPS and only slowdowns
xbps_pkgpattern_match().
2011-10-24 09:27:15 +02:00
Juan RP
ca8e8accc4 Move external code used by libxbps into lib/external. 2011-10-24 09:05:16 +02:00
Juan RP
5ade2f37c7 libxbps: xbps_configure_pkg: ignore pkgs in config-files state. 2011-10-20 16:13:16 +02:00
Juan RP
51b45a0d08 libxbps: improve code to match replaced package patterns.
The replaces code now checks all package dictionaries in the
transaction dictionary, and the sorting algorithm will put packages
to be removed at the head of the tailq.

This should fix issue 11 in googlecode.
2011-10-20 14:39:58 +02:00
Juan RP
eae6bf8ab4 libxbps: when sorting deps, add removed pkgs to head. 2011-10-20 13:10:39 +02:00
Juan RP
9fb3c38aa2 Extend assertions by checking passed in proplib type. 2011-10-19 16:53:38 +02:00
Juan RP
a80df68b15 libxbps: simplify xbps_transaction_commit(). 2011-10-19 16:25:49 +02:00
Juan RP
0a041cdd2e libxbps: new func xbps_array_replace_dict_by_name(array, dict, pkgname)
This function replaces a dictionary in an array matched by pkgname,
with the dictionary passed in as 2nd argument.
2011-10-19 00:37:36 +02:00
Juan RP
931a03b806 New configuration schemas changes, round 3.
struct xbps_handle::conffile has been renamed to confdir, and it now
expects the path to a directory, where the configuration files are
stored.

Change xbps-bin(8) and xbps-repo(8) along with its manpages to mention
that -C expects a directory.
2011-10-17 15:11:54 +02:00
Juan RP
08f7169eff New configuration scheme changes, round 2 (virtual pkgs).
- XBPS now expects to read individual virtual pkg settings from
  .plist files in PREFIX/etc/xbps/virtualpkg.d.wants.

This really implements the missing part in issue #12 in
googlecode: http://code.google.com/p/xbps/issues/detail?id=12
2011-10-17 14:24:30 +02:00
Juan RP
5642ffa86e New configuration scheme changes, round 1.
- Configuration file 'xbps-conf.plist' has been splitted off into
  two files: conf.plist and repositories.plist. By default they
  are stored in etc/xbps.
- Changed some members in xbps_handle struct, mostly to make it easy
  to change its value in {cache,root}dir and conffile.
- Made xbps_init() release proplib objects as soon as we don't need
  them, that way it uses 35% less of memory or in some cases even more.

There will be another commit that will implement to read new virtualpkg
settings by the user, as specified in:

	http://code.google.com/p/xbps/issues/detail?id=12
2011-10-17 12:37:15 +02:00
Juan RP
b6da7393c1 libxbps: make the xbps_find_*pkg_dict_installed work as expected.
Bump XBPS_API_VERSION due to semantics change in virtual and non virtual
functions.
2011-10-16 17:21:43 +02:00
Juan RP
dfa8b8e8ba libxbps: make xbps_*_find_virtualpkg_*_by_name funcs work as expected. 2011-10-16 16:52:58 +02:00
Juan RP
d551713c01 Move repository_pool_find code into its own file. 2011-10-16 14:31:53 +02:00
Juan RP
12af2370da libxbps: separate virtualpkg conf stuff from repository_pool_find_pkg.
Now to find a virtualpkg set by the user in conf file, there is a new
function: xbps_repository_pool_find_virtualpkg(). Use it in some
places to make jpeg -> libjpeg-turbo (and other pkgs that can be
replaced with other virtual pkgs) work correctly even if installed
multiple times.
2011-10-16 12:22:46 +02:00
Juan RP
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
Juan RP
0f0c66fafb xbps_dictionary_from_metadata_plist: if pkgname not found try from a
virtual pkg.
2011-10-16 10:27:02 +02:00
Juan RP
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
Juan RP
e37a9efb74 libxbps: check in virtual pkgs when matching replaced pkgs. 2011-10-15 20:01:55 +02:00
Juan RP
d3e1c0dcf2 libxbps: when sorting deps take into account transaction reason. 2011-10-15 20:00:41 +02:00
Juan RP
f2ede44c80 libxbps: make xbps_find_virtualpkg_user *only* look for virtual pkgs. 2011-10-15 19:59:54 +02:00
Juan RP
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
Juan RP
20b0b4ce12 libxbps: when replacing a pkg, also fully purge the pkg(s). 2011-10-12 09:28:11 +02:00
Juan RP
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
Juan RP
4b68af989e libxbps: xbps_repository_sync_index: return proper return value in error path. 2011-08-18 10:43:30 +02:00
Juan RP
ba5913cbb9 libxbps: [unpack] only extract files if they have been modified. 2011-08-01 12:35:47 +02:00
Juan RP
890bdd368f xbps_unpack_binary_pkg: remove redudant error printf, cosmetic changes. 2011-07-29 23:28:36 +02:00
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
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
Juan RP
927d7e0c5d xbps_repository_find_pkg_deps: improve a debug printf. 2011-02-01 17:32:25 +01:00
Juan RP
0e38b649ff xbps_get_pkg_state_installed: if pkg dictionary is not found return ENOENT. 2011-02-01 17:30:59 +01:00
Juan RP
fdc496e8f1 Added xbps_repository_pkg_replaces() to handle pkg "replaces" in the transaction.
The frontend (in that case xbps-bin(8)) is only responsible to remove
those packages that have the "trans-action" string object set to "remove".
2011-02-01 01:21:54 +01:00
Juan RP
da607becf9 Make some xbps_warn_printf dependent of XBPS_FLAG_VERBOSE. 2011-01-30 18:38:16 +01:00
Juan RP
5c7eaf2f92 xbps_warn_printf: fix previous and remove unused var. 2011-01-30 18:32:15 +01:00
Juan RP
42eb834e8d xbps_warn_printf: always print regardless of XBPS_FLAG_VERBOSE. 2011-01-30 18:31:36 +01:00
Juan RP
e04f167d09 xbps_repository_pool_foreach: use SIMPLEQ_FOREACH_SAFE. 2011-01-30 15:09:18 +01:00
Juan RP
bdd48de67d xbps_sort_pkg_deps: use TAILQ_FOREACH_SAFE. 2011-01-30 14:42:17 +01:00
Juan RP
2492d98d13 xbps_purge_pkg: chdir to rootdir, check that REMOVE file exists and is executable. 2011-01-30 12:49:55 +01:00
Juan RP
b6b3bd799b xbps_purge_pkg: execute the "purge" action in REMOVE script (if found).
This replaces code for removing all directories installed by the
package and instead let's the package do whatever is ok in the REMOVE
script by executing the "purge" action.
2011-01-30 11:32:46 +01:00
Juan RP
7da33469cc xbps-bin(8): added -R option to recursively remove pkgs that were instaled automatically. 2011-01-30 08:08:34 +01:00
Juan RP
bb897da7b4 Fix an assertion. 2011-01-30 00:14:29 +01:00
Juan RP
de034c28f5 xbps_find_pkg_orphans: simplify even more. 2011-01-29 18:34:50 +01:00
Juan RP
5bbbb3c8fd xbps_find_pkg_in_*: search for virtual pkg before the real one. 2011-01-29 17:57:01 +01:00
Juan RP
8d6eab5ac1 xbps_remove_obsoletes: make xbps_printf conditionalized with XBPS_FLAG_VERBOSE. 2011-01-29 16:26:17 +01:00
Juan RP
d7bafff252 xbps_requiredby_pkg_{add,remove}: simplify and make them aware of virtual pkgs. 2011-01-29 12:29:30 +01:00
Juan RP
241751f1b7 Added three new helper functions to the API.
xbps_find_pkg_in_array_by_name
xbps_find_pkg_in_array_by_pattern
xbps_remove_pkgname_from_array
2011-01-29 12:28:23 +01:00
Juan RP
298305c1d5 Make some xbps_printf()s conditioned on XBPS_FLAG_VERBOSE. 2011-01-29 01:55:52 +01:00
Juan RP
463d182c49 When sorting packages also look for virtual packages.
A new function xbps_find_virtual_pkg_in_dict() has been made public
to the API to make this find duplicate packages in the transaction
when updating packages.
2011-01-28 20:56:28 +01:00
Juan RP
6e26332a2e A really faster dependency sorting algorithm, 60% faster approx!
Benchmarks before and after the code for installing
"xorg gnome xbmc vlc firefox epdfview":

OLD
-----------------
real	0m1.844s
user	0m1.841s
sys	0m0.003s

NEW
-----------------
real	0m0.873s
user	0m0.868s
sys	0m0.004s
2011-01-28 19:47:05 +01:00
Juan RP
af5d3a0653 xbps_repository_find_pkg_deps: do not recurse more than MAX_DEPTH times, return ELOOP. 2011-01-28 12:12:47 +01:00
Juan RP
f7f3cfcb9c Performance improvements for xbps_find_pkg_in_dict_by_* and xbps_find_*_in_array(). 2011-01-28 12:11:43 +01:00