Juan RP
7999d393e2
xbps-bin: return ENODEV in missing dependencies, not 1.
2011-07-02 23:44:51 +02:00
Juan RP
8b43800e94
xbps-repo: improve error msg if 'sync' target fails.
2011-06-30 10:58:10 +02:00
Juan RP
539dd1c0cd
xbps-bin: when replacing pkgs only purge for pkgs that aren't going to be updated.
2011-06-25 22:53:47 +02:00
Juan RP
cf4b9b5011
xbps-uhelper: make 'register' target to not set automatic-install (i.e manual).
2011-06-24 22:40:00 +02:00
Juan RP
97fcd43bbe
xbps-bin: also purge pkgs that shall be replaced.
2011-06-23 11:46:15 +02:00
Juan RP
6b4aaae971
xbps-bin: check: missing whitespace in printf.
2011-06-22 09:37:59 +02:00
Juan RP
96bf160032
xbps-bin: check: don't play stupid games removing previous lines.
2011-06-22 09:33:39 +02:00
Juan RP
de9e153bb9
xbps-bin: check target: ignore symlinks with empty targets.
2011-06-22 09:16:48 +02:00
Juan RP
2719f63642
xbps-repo: improve error string when xbps_fetch_file() errors out.
2011-06-20 23:16:58 +02:00
Juan RP
ed82315813
xbps-{bin,repo}(8): don't mention xbps-src, this info is outdated.
2011-06-20 12:56:43 +02:00
Juan RP
32a5cd501e
xbps-bin: improve error printfs while checking files.plist.
2011-06-06 09:09:30 +02:00
Juan RP
90549d829a
xbps-bin::util.c: do not use C99 struct initialization, it's too long to type.
2011-06-04 22:35:48 +02:00
Juan RP
48f689d8e6
xbps-bin: error msg when cachedir cannot be created.
2011-06-04 16:37:05 +02:00
Juan RP
bb4cefcd2c
xbps-{bin,repo}: init conffile to NULL.
2011-06-04 13:53:55 +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
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
c9a673cc11
xbps-bin: make the 'check' target also test for modified symlinks.
2011-06-01 07:31:38 +02:00
Juan RP
cfa637db48
Repository package index format 1.2.
...
The pkg index now stores all package objects from props.plist, so that
xbps-repo(8) doesn't have to access the target binpkg anymore.
2011-05-27 17:32:42 +02:00
Juan RP
d88b852843
xbps-dgraph: add two new optional objs: homepage and license.
2011-05-27 09:26:50 +02:00
Juan RP
73200498a5
xbps-repo: do not add build_date, homepage and license objs into the index.
2011-05-27 07:10:33 +02:00
Juan RP
f7882f7215
xbps-{bin,repo}: parse three new objects in pkg props.plist: homepage, build_date and license.
2011-05-26 10:54:48 +02:00
Juan RP
408c10c57d
xbps-repo: add missing \n.
2011-05-25 15:31:16 +02:00
Juan RP
a13c7d695e
xbps-repo: more meaningful messages for the show{,-deps,-files} targets.
2011-05-25 15:29:26 +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
ad66fa2e3d
xbps-bin::install.c: remove unused var to make this build with gcc-4.6.
...
Reported and patch provided by ojab in issue 4.
2011-04-08 19:25:41 +02:00
Juan RP
007d6b4bd5
xbps-bin.8: bump date.
2011-02-26 11:17:02 +01:00
Juan RP
dd72cb295d
xbps-uhelper: added two new targets 'setsource' and 'fromsource'.
...
Both targets will be used by some upcoming changes in xbps-src, therefore
they shouldn't be used manually by the user.
2011-02-26 11:15:17 +01:00
Juan RP
221291929e
xbps-bin: added -A and -M options for explicitly setting install reason to auto or manual.
2011-02-26 11:14:05 +01:00
Juan RP
f2ef0c0050
xbps-bin: return rval if 'install' target cannot find a pkg.
2011-02-25 13:41:57 +01:00
Juan RP
2eb7331907
xbps-bin: return 1 if there are missing deps, return errno in other errors.
2011-02-25 12:27:42 +01:00
Juan RP
0a84799ac7
xbps-bin: add a simple unpack cb that mimics the 'check' target.
2011-02-24 10:18:24 +01:00
Juan RP
5f2ae48b71
xbps-bin: skip some unneeded stuff in the download and configure phases.
2011-02-23 23:43:45 +01:00
Juan RP
12cdc7c242
xbps-bin: remove the unpack callback with a percentage.
...
It messes up some xbps_*printf()s, and removing it makes it look like
previous versions (<=0.7.3).
2011-02-22 16:33:54 +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
9abcb92e39
xbps-bin::instal.c: some bugfixes for pkg state and the transaction steps.
...
- While installing a package, always check its state and don't ignore it
if it was already unpacked, we have to configure it.
- Before unpacking packages, configure packages that were unpacked previously.
2011-02-22 11:07:34 +01:00
Juan RP
9e22df0725
xbps-bin: skip packages to be configured in the install/update stage, fix configured pkg count.
2011-02-21 23:28:39 +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
3acf91bb15
xbps-bin: unpack_progress_cb_verbose printf to stdout for consistency.
2011-02-21 13:53: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
b90c815e80
Minor nits to the xbps-{bin,repo}.8 manpages.
2011-02-05 17:32:14 +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
14d3fe8aa7
xbps-bin: shorter informative messages for transactions.
2011-02-05 11:47:02 +01:00
Juan RP
2e140cde7b
xbps-bin.8: fix typo.
2011-02-05 11:29:18 +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
d25bc35711
xbps-bin::show_pkg_info() remove useless prop_object_type_t member.
2011-02-04 18:00:47 +01:00
Juan RP
40cf7bad32
xbps-repo: call xbps_end() in usage() before exit(3).
2011-02-04 16:24:22 +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
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
7b159d6f33
xbps-dgraph: parse the "provides" obj for virtual packages.
2011-01-31 16:40:33 +01:00
Juan RP
fca3d6b9bf
Use xbps_{error,warn}_printf() everywhere.
2011-01-30 18:23:33 +01:00
Juan RP
243685507a
xbps-bin: some cosmetic informative printfs.
2011-01-30 12:40:16 +01:00
Juan RP
89faf75db4
xbps-bin/remove.c: fix some comments.
2011-01-30 12:12:49 +01:00
Juan RP
f27b7557bc
xbps-bin: there's no need to add objs in inverted order for -R.
2011-01-30 08:22:58 +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
7c8a89c968
xbps-repo(8): fix wrong sentence.
2011-01-29 17:48:13 +01:00
Juan RP
03b1b254cc
xbps-bin::check.c: reset a var to avoid false positives.
2011-01-28 12:18:17 +01:00
Juan RP
faad0a6597
Make xbps_remove_pkg_from_* use shared code, and add another variant.
...
The functions have been renamed to really match what they do.
2011-01-27 18:22:57 +01:00
Juan RP
080334da8b
xbps-bin: make 'list' target without arguments to only show pkgs in "installed" state.
2011-01-27 14:45:40 +01:00
Juan RP
255f229a78
xbps-bin.8: fix a typo.
2011-01-27 14:44:39 +01:00
Juan RP
c952337fd4
xbps-bin(8): added -D option to only show the URL to download binary packages.
2011-01-27 14:36:33 +01:00
Juan RP
1c21a98545
Rename some symbols in repository_plist.c.
...
xbps_repository_get_pkg_plist_dict_from_url -> xbps_repository_plist_find_pkg_dict_from_url
xbps_repository_get_pkg_plist_dict -> xbps_repository_plist_find_pkg_dict
2011-01-27 13:53:33 +01:00
Juan RP
69512d4da7
Rename xbps_find_pkg_from_plist to xbps_find_pkg_dict_from_plist_by_name.
2011-01-27 12:41:49 +01:00
Juan RP
26701d3bf3
Rename a few symbols for clarity.
...
xbps_check_is_installed_pkg -> xbps_check_is_installed_pkg_by_pattern
xbps_check_is_installed_pkgname -> xbps_check_is_installed_pkg_by_name
xbps_check_is_repo_string_remote -> xbps_check_is_remote_uri_remote
2011-01-27 12:34:13 +01:00
Juan RP
628a6cebf7
Rename xbps_find_orphan_packages() to xbps_find_pkg_orphans().
2011-01-27 12:19:05 +01:00
Juan RP
bc259ae720
xbps-{bin,repo}: use static const tables to parse objs in XBPS_PKGPROPS files.
2011-01-26 16:34:26 +01:00
Juan RP
ada7820312
xbps-bin: reset some static vars for correct indentation in output.
2011-01-25 17:52:04 +01:00
Juan RP
be5ff1d934
Don't build code with _GNU_SOURCE, use _XOPEN_SOURCE=500 instead.
...
_GNU_SOURCE is only now for xbps_xasprintf() if vasprintf is found,
and only for <stdio.h>, it's unset immediately once the header is included.
2011-01-25 13:00:23 +01:00
Juan RP
fd30feadcb
xbps-bin/check.c: save some lines by using prop_object_type() directly.
2011-01-25 03:33:51 +01:00
Juan RP
082efc3535
Added xbps_callback_array_iter() and use it in xbps-bin to list missing pkgdeps.
2011-01-25 02:55:34 +01:00
Juan RP
6b4c6970a3
xbps-bin/question.c: use sizeof().
2011-01-24 19:26:52 +01:00
Juan RP
0feae4fa20
xbps-uhelper: added 'getpkgdepversion' target.
2011-01-24 19:13:11 +01:00
Juan RP
72d82a3a26
Simplify and share common code in xbps_repository_{update,install}_pkg().
2011-01-24 18:49:24 +01:00
Juan RP
0bb0838982
Start moving code from repository_find* to transaction_*.
...
--HG--
rename : lib/sortdeps.c => lib/transaction_sortdeps.c
2011-01-24 16:55:58 +01:00
Juan RP
81b6b62aef
xbps-bin/fetch.c: use else if conditionals.
...
--HG--
branch : progress_callback
2011-01-22 13:08:36 +01:00
Juan RP
724c4a6f0a
Added fetch.c for xbps-bin, with the fetch function callback.
...
--HG--
branch : progress_callback
2011-01-22 12:40:58 +01:00
Juan RP
984eae1578
Make xbps_fetch_file accept a callback to update its progress.
...
This also makes xbps_unpack_binary_pkg follow this convention by avoiding
static variables.
--HG--
branch : progress_callback
rename : bin/xbps-repo/util.c => bin/xbps-bin/util.c
2011-01-22 12:40:19 +01:00
Juan RP
8c2ccea435
WIP checkpoint for progress callbacks in the API.
...
At this moment I've only implemented the part for unpacking, other parts
will also use progress callbacks.
--HG--
branch : progress_callback
2011-01-21 17:16:58 +01:00
Juan RP
ab857595d7
Check that return value of snprintf(3) is not negative, rather than only -1.
2011-01-21 00:32:46 +01:00
Juan RP
84b578b0e4
libxbps: modify xbps_get_binpkg_repo_uri() to accept repository URL as 2nd arg.
2011-01-20 16:41:49 +01:00
Juan RP
2adaf610e7
libxbps: xbps_yesno/noyes() are only used in xbps-bin(8), remove from API.
2011-01-18 23:45:12 +01:00
Juan RP
0a8fabbfac
xbps-bin: remove spurios chars in two printf()s.
2011-01-18 23:42:51 +01:00
Juan RP
992e8c6a14
libxbps::xbps_humanize_number(): use common values and hide implementation details from API.
...
So now its prototype is the following:
int xbps_humanize_number(char *buf, int64_t bytes)
It is a wrapper around NetBSD's humanize_number(3) which uses 6 digits for max
length, HN_AUTOSCALE and HN_NOSPACE|HN_DECIMAL. All users have been updated.
2011-01-18 23:10:07 +01:00
Juan RP
fe15380e1b
libxbps: modify the API, new func xbps_get_binpkg_repo_uri().
...
This function replaces xbps_repository_get_path_from_pkg_dict() and
xbps_get_binpkg_local_path(). It takes a pkg dictionary as returned
by a repository pkg index or a transaction dictionary and returns
a string with the full path to the binary pkg, either in local
repos, cachedir or remote repos.
Update all code to use this function... sorry I broke ABI compatiblity.
2011-01-18 18:21:55 +01:00
Juan RP
8e0a94d5cc
xbps-repo: use xbps_repository_pool_find_pkg().
2011-01-18 14:57:25 +01:00
Juan RP
6051eb29ab
Added another bunch of compiler warnings and fix code.
2011-01-15 11:59:44 +01:00
Juan RP
057deb180c
xbps-repo: report the errno string when a repository cannot be added and fix a NULL pointer deref.
2010-12-25 02:35:11 +01:00
Juan RP
5b101eae2b
xbps-repo: fix a memleak in the 'add' target.
2010-12-24 05:43:00 +01:00
Juan RP
57453d1926
xbps-{bin,repo}: use strlcpy().
2010-12-24 05:31:37 +01:00
Juan RP
45b4fada3d
xbps-repo: fix a memleak in the 'show' target.
2010-12-24 05:29:39 +01:00
Juan RP
f2c33b0b08
xbps-repo: fix a memleak in the 'find-files' target.
2010-12-24 05:21:49 +01:00
Juan RP
a7886f62db
xbps-bin: fix a memleak in the 'find-files' target.
2010-12-24 05:21:22 +01:00
Juan RP
e3b86d5ff6
xbps-dgraph: use PRIu64 to printf uint64_t from <inttypes.h>.
2010-12-23 17:23:14 +01:00
Juan RP
e01399c242
xbps-uhelper: added -d flag to enable debugging.
2010-12-18 10:26:12 +01:00
Juan RP
b017f6d024
xbps-repo: fix the 'genindex' target due to 0.7.0 API changes.
2010-12-16 11:37:31 +01:00
Juan RP
e6503b98cc
xbps-uhelper: fix the 'unregister' target, wasn't updated for 0.7.0 API changes.
2010-12-16 00:25:53 +01:00
Juan RP
ece608a080
xbps-repo(8): implemented 'find-files' target.
2010-12-15 15:14:44 +01:00
Juan RP
60c37406c1
xbps-repo: zero out allocated mem to avoid garbage in the 'search' target.
2010-12-04 10:31:17 +01:00
Juan RP
4f6e20c431
xbps-bin: zero out allocated mem to avoid garbage in the 'list' target.
2010-12-04 10:30:01 +01:00
Juan RP
237991fd79
xbps-bin: added -F flag for the remove target.
...
Unless it's set, packages that are dependencies of other installed packages
won't be removed. This flag overrides this behaviour and forces the package removal.
While being here, misc cleanups.
2010-12-03 17:36:07 +01:00