Commit Graph

551 Commits

Author SHA1 Message Date
Juan RP
5e0b06dc00 xbps-bin: improve def unpack cb to print more meaningful messages. 2012-05-06 16:48:47 +02:00
Juan RP
b4f202f89f xbps-bin/util.c: find out terminal columns and use it to print transaction. 2012-05-06 16:47:30 +02:00
Juan RP
b53795e095 fetch_cb: clear until EOL when displaying final stats. 2012-05-06 10:09:23 +02:00
Juan RP
391bb3daf2 fetch_cb: simplify and improve output. 2012-05-06 10:05:35 +02:00
Juan RP
f7c49a706c xbps-repo(8): new target 'clean': removes obsolete binpkgs from cachedir. 2012-05-05 10:07:47 +02:00
Juan RP
53c7f9effe xbps-bin: fixed regression in 'show-deps' target. 2012-04-16 16:42:03 +02:00
Juan RP
93c5536e36 xbps-{bin,repo}: remove dead code. 2012-04-12 13:05:13 +02:00
Juan RP
bfe7ab1c5a xbps_configure_pkg: simplify and remove "version" arg (API change).
The "version" argument (being optional) clearly is not needed and it
can be fully removed. This simplifies the internal implementation as well
as the API.
2012-04-10 10:02:27 +02:00
Juan RP
ef6d1adf91 xbps_set_pkg_state_installed: simplify (API change).
The third optional argument "pkgver" clearly is useless because we can
create it internally with "pkgname" and "version" arguments instead.

Also make the "version" argument mandatory.
2012-04-10 09:43:59 +02:00
Juan RP
00148c40b0 xbps-bin(8): extended 'requiredby' check to find and remove stale entries. 2012-04-05 10:58:52 +02:00
Juan RP
9bada162a1 New "metadir" member in xbps_handle to override default metadata dir. 2012-03-13 10:22:35 +01:00
Juan RP
d4f623e7e7 Commit Kyua/ATF test suite for libxbps. 2012-03-12 15:23:04 +01:00
Juan RP
8c6b335ca8 xbps-{bin,repo}: redirect error messages to stderr. 2012-02-25 10:30:15 +01:00
Juan RP
fd5d8b9f51 xbps-repo.8: sync with reality. 2012-02-20 16:02:42 +01:00
Juan RP
7fc8ee8231 xbps-bin: check for EEXIST when installing a pkg. 2012-02-18 16:15:54 +01:00
Juan RP
7a9d47c133 xbps-repo: show, show-deps and show-files targets accepts pkgpatterns. 2012-02-16 08:55:41 +01:00
Juan RP
7628561518 xbps-repo: added -h to print usage(), print detailed info for usage(). 2012-02-14 10:49:41 +01:00
Juan RP
052a266b76 xbps-bin: added -h to print usage(), print detailed info for usage(). 2012-02-14 10:35:33 +01:00
Juan RP
cbfc8868a6 xbps-repo.8: sync with reality. 2012-02-06 13:32:31 +01:00
Juan RP
36ae5709e4 xbps-bin: dry-run: add binary pkg filename prop to the output. 2012-02-05 14:56:18 +01:00
Juan RP
3afa3ba93b xbps-bin: new dry-run mode (-n) for (auto)update, (auto)remove and install targets. 2012-02-03 14:53:28 +01:00
Juan RP
7fd4b16156 xbps-bin: fetch_cb.c: avoid ANSI escape sequencies and use \r. 2012-02-03 06:43:00 +01:00
Juan RP
1acf933f5a xbps-repo: make show* targets do not follow virtualpkgs from xbps.conf.
The reason for that is that you should be able to show information from
any package, and by enabling virtual packages you cannot do that.
2012-01-27 15:24:24 +01:00
Juan RP
164a928e5a xbps-bin: do not syslog msgs if disabled due to uninitialized bool. 2012-01-26 11:46:01 +01:00
Juan RP
1a73b93d63 Calculate properly required/freed size in transactions. 2012-01-25 04:56:54 +01:00
Juan RP
abb0d260b9 xbps-bin: the install target gains suppor for installing best pkg available. 2012-01-25 02:14:04 +01:00
Juan RP
11f94a4f46 xbps-bin: pretty output for 'check all'. 2012-01-25 01:17:18 +01:00
Juan RP
9becfc29d2 xbps-bin: fix pkgpattern to install new pkgs. 2012-01-24 20:48:54 +01:00
Juan RP
9a1f05ee89 xbps-bin: use "mutable" bool object to check for mutable files in pkg file list. 2012-01-24 18:47:43 +01:00
Juan RP
fe1e8d14c8 xbps-repo: [genindex] print to stdout when obsolete entry is removed. 2012-01-24 09:47:40 +01:00
Juan RP
791f1d40b2 xbps_handle: remove debug, install_*, syslog_enabled members.
Replaced by definitions that can be set to xbps_handle::flags.
2012-01-22 10:52:35 +01:00
Juan RP
a166d6a2a3 Simplify xbps_transaction_prepare()/commit() and related API changes.
- xbps_handle::transd -> new member with transaction dictionary.
- xbps_transaction_prepare: returns an int.
- xbps_transaction_commit: doesn't need any arg now.
- xbps_repository_pool_sync: doesn't need any arg now.
- xbps_pkgdb_update: removed xbps_handle * arg.
- xbps_transaction_missingdeps_get: removed, missing_deps array is in
  xbps_handle::transd("missing_deps") array object.
2012-01-22 10:00:46 +01:00
Juan RP
38db570c19 pkgdb: foreach_xxx_pkg_cb -> foreach_xxx_cb. 2012-01-21 10:30:20 +01:00
Juan RP
0561d068d5 xbps-uhelper: new target 'updatepkgdb' to migrate to 0.12 pkgdb format. 2012-01-20 18:42:00 +01:00
Juan RP
6940505de9 regpkgdb rototill: renamed to pkgdb, improve the public API. 2012-01-20 11:10:52 +01:00
Juan RP
9a088937b5 Repository index 1.4 -- see NEWS file for info. 2012-01-19 12:26:40 +01:00
Juan RP
dfc7ff4232 API break: simplify xbps_repository_pool_find_virtualpkg(). 2012-01-18 08:25:28 +01:00
Juan RP
d0e1477eeb Simplify xbps_end() and don't continue if xbps_init() did not succeed. 2012-01-17 16:56:17 +01:00
Juan RP
f2b05d6438 Improved pkg best matching in rpool, and support for exact pkgver matches.
- xbps_repository_pool_find_pkg in best match case, now returns the
  newest package version available in rpool.
- Added xbps_repository_pool_find_pkg_exact that returns a package
  by exact matching a pkgver.
- Removed xbps_handle_alloc(), the user is free to use memory
  allocated from heap or stack.
- Improved API documentation in preparation for 0.12.

Bumped XBPS_API_VERSION again.
2012-01-17 16:17:03 +01:00
Juan RP
da5e9f841f xbps-repo: fixed removing multiple entries from index-files.plist. 2012-01-17 12:16:54 +01:00
Juan RP
4fdf675249 xbps-repo: index.c: oldpkgver might be undefined if entry is removed from index. 2012-01-17 11:25:45 +01:00
Juan RP
9906aa7029 xbps-repo: index-files.c: warning due to uninitialized var. 2012-01-17 10:55:28 +01:00
Juan RP
beb7284681 xbps-repo: faster 'genindex' target implementation for index-files.plist. 2012-01-17 10:50:35 +01:00
Juan RP
4164573b35 Added xbps_match_pkgdep_in_array() to match a pkgdep against pkgpatterns.
This fixes xbps_match_pkgpattern_in_array() which had the args swapped
in xbps_pkgpattern_match() resulting in inverted results while resolving
virtual packages in a transaction.
2012-01-16 15:50:06 +01:00
Juan RP
95804bdb77 xbps-repo: simplify 'index-files.plist', externalized as an array. 2012-01-15 16:33:44 +01:00
Juan RP
2186e16a5e Fixed issue 21 "xbps-repo find-files is awfully slow" reported by ojab. 2012-01-15 14:24:44 +01:00
Juan RP
8780e15635 xbps-bin.8: typo, remove refs to purge flag. 2012-01-05 21:19:29 +01:00
Juan RP
0356afba6d Bump copyright year for latest changes. 2012-01-05 16:17:37 +01:00
Juan RP
c83a77c1b5 Fixed issue 19 "xbps-src cannot fetch source with unknown Content-Length". 2012-01-05 12:26:57 +01:00
Juan RP
7d631c5d11 xbps-bin: fix check_pkg_integrity() pkg dictionary confusion. 2012-01-05 11:53:14 +01:00
Juan RP
a7ef059673 Bump copyright year for changed files. 2012-01-04 17:56:52 +01:00
Juan RP
a31c20e52a Make xbps_configure_pkg/packages accept a flush bool arg for frontends. 2012-01-04 17:41:36 +01:00
Juan RP
e22ba9a972 xbps-bin: simplify and make 'check' target work after regpkgdb flush changes. 2011-12-29 16:43:52 +01:00
Juan RP
c0f81bd482 xbps-uhelper: use xbps_(un)register_pkg() again. 2011-12-28 05:58:03 +01:00
Juan RP
11ca929985 xbps-uhelper: fix 'fetch' target exiting with error value. 2011-12-24 16:56:45 +01:00
Juan RP
9fa2804763 xbps-uhelper: really fix this time after regpkgdb rototill. 2011-12-24 16:37:42 +01:00
Juan RP
5a1ab26972 Introduce xbps_regpkgdb_remove_pkgd, and use regpkgdb funcs to make xbps-uhelper work. 2011-12-24 16:09:30 +01:00
Juan RP
3b7491d29b Merged purge code in remove, configurable transaction regpkgdb flushing.
See the NEWS file for info.
2011-12-24 01:05:26 +01:00
Juan RP
32597d85c1 Use xbps_regpkgdb_foreach_pkg_cb() where needed. 2011-12-22 14:41:40 +01:00
Juan RP
7bfcdee791 Introduce xbps_regpkgdb_foreach_pkg_cb() and use it in xbps-bin check. 2011-12-22 14:25:27 +01:00
Juan RP
939e2c2417 xbps-bin(8): fix 'find-files' syntax in manpage. 2011-12-22 11:07:54 +01:00
Juan RP
47237846ae xbps-repo(8): the 'find-files' target now accepts multiple patterns. 2011-12-22 11:01:28 +01:00
Juan RP
d4278be914 xbps-bin(8): the 'find-files' target now accepts multiple patterns. 2011-12-22 10:45:13 +01:00
Juan RP
13331f801c xbps-repo: the 'search' target now accepts multiple patterns as arguments. 2011-12-22 09:33:54 +01:00
Juan RP
a5d9eb9853 xbps-bin: it's possible to reinstall any pkg with '-f' option. 2011-12-20 16:08:23 +01:00
Juan RP
6ad7289d68 Detect clock_gettime(2) and use (if available) for the fetch cb. 2011-12-19 16:41:57 +01:00
Juan RP
79fd316f8e xbps-bin: formatting fixes for transaction printfs. 2011-12-18 01:10:24 +01:00
Juan RP
a1f39a0a82 xbps-repo(8): rewriten manpage to mdoc(7) macro format. 2011-12-17 18:30:13 +01:00
Juan RP
99f0b02e03 xbps-bin(8): fix typo. 2011-12-17 18:29:48 +01:00
Juan RP
fa80e01404 xbps-bin(8): rewritten manpage to mdoc(7) macro format. 2011-12-17 17:40:23 +01:00
Juan RP
b0ceeaa58e New configuration file via confuse: xbps.conf. 2011-12-15 11:19:20 +01:00
Juan RP
3f45f563be xbps-bin: syslog support, enabled by default. 2011-12-06 13:02:49 +01:00
Juan RP
afde2a6653 xbps-repo: move list/search code into its own file: list.c. 2011-12-03 10:46:57 +01:00
Juan RP
43d85c76b3 xbps-repo: implement new target 'pkg-list' to list pkgs from target repo. 2011-12-03 10:37:31 +01:00
Juan RP
cb2e941b48 xbps-{bin,repo}: sync manpages. 2011-12-03 09:00:08 +01:00
Juan RP
8be527cbdf xbps_fetch_file: set bytes downloaded correctly for the fetch client cb. 2011-12-01 12:21:13 +01:00
Juan RP
8f119a4076 xbps-bin: make symlinks check to report an error msg on failure. 2011-11-27 10:05:23 +01:00
Juan RP
3ffb44f6fe xbps-bin: move remove code into transaction.c::remove_pkg(). 2011-11-27 09:59:39 +01:00
Juan RP
6229e06a67 xbps-bin: fix a broken condition. 2011-11-27 09:29:13 +01:00
Juan RP
9d731ffe09 Introduce xbps_transaction_remove_pkg() and use it for xbps-bin(8). 2011-11-27 09:05:18 +01:00
Juan RP
0ff0aee226 libxbps: added xbps_transaction_autoremove_pkgs(bool purge).
This is to add package orphans into the transaction dictionary.
2011-11-25 11:20:03 +01:00
Juan RP
bbfd2813b2 libxbps: renamed xbps_repository_{install,update}_xxx to xbps_transaction_xxx. 2011-11-25 10:12:03 +01:00
Juan RP
f3099fa2c6 Added success states for state_cb, move some descriptions to the client cb. 2011-11-25 09:44:49 +01:00
Juan RP
ab17573692 Split XBPS_FLAG_FORCE into CONFIGURE and REMOVE_FILES, bump XBPS_API_VERSION. 2011-11-24 11:50:53 +01:00
Juan RP
ab36420439 xbps-bin: process XBPS_STATE_TRANS cases too. 2011-11-24 11:33:04 +01:00
Juan RP
3ccfec7054 Improved callback/states support to make libxbps std{err,out} printf free.
This is a major API/ABI change, documentation has been updated accordingly.
2011-11-24 11:23:08 +01:00
Juan RP
435aa84fb0 xbps-{bin,repo}: unbreak the 'show' target, sigh. 2011-11-15 10:21:12 +01:00
Juan RP
9157f7d148 xbps-bin: split main.c into new files: list.c show-orphans.c and unpack_cb.c. 2011-11-11 10:18:52 +01:00
Juan RP
029fd96690 xbps-bin: state_cb.c: initialize var to silence a warning. 2011-11-11 09:45:03 +01:00
Juan RP
86f1f18571 libxbps: revamped trans states/cb to be more generic, not just for transactions. 2011-11-11 09:41:48 +01:00
Juan RP
dc4f7af890 xbps-bin: remove useless printf in autoupdate target. 2011-11-11 00:39:47 +01:00
Juan RP
ced906ff3f xbps-repo: renamed repository.c to show.c. 2011-11-10 23:31:46 +01:00
Juan RP
c2eed68471 libxbps: add xbps_repository_pool_sync, to sync repoidx from all remotes. 2011-11-10 23:14:50 +01:00
Juan RP
de4504c248 Update refs to pkg-index, which aren't true anymore. 2011-11-10 09:21:17 +01:00
Juan RP
59dc65b907 Move prog.mk to the bin directory. 2011-11-08 17:45:14 +01:00
Juan RP
662b5acc08 Implemented "New repository scheme and configuration file" from issue 16. 2011-11-07 20:28:35 +01:00
Juan RP
27c5138324 xbps-bin: use xbps_fetch_error_string in reposync err cb. 2011-11-07 19:56:30 +01:00
Juan RP
fe3353a2b2 xbps-uhelper: optimize some targets where xbps_init() is not necessary. 2011-11-05 08:41:29 +01:00
Juan RP
1031ea0141 xbps-bin: return proper error value if update target fails. 2011-10-31 21:28:21 +01:00
Juan RP
39e8ada644 xbps-repo: simplify code in repository.c. 2011-10-29 11:24:02 +02:00
Juan RP
5731b7d070 xbps-bin: XBPS_TRANS_STATE_REPOSYNC printf tweak. 2011-10-29 10:21:31 +02:00
Juan RP
1c4d486396 xbps-{bin,repo}: new -o flag for the 'show' target, to print specific objs value. 2011-10-29 08:17:54 +02:00
Juan RP
549b5e2e36 xbps-{bin,repo}: dynamically print all objs in the 'show-files' target. 2011-10-28 23:02:07 +02:00
Juan RP
c5fcaa294d xbps-{bin,repo}: dynamically print all objs in the 'show' target. 2011-10-28 18:17:19 +02:00
Juan RP
238c9d9926 xbps-bin: (check) initialize vars to avoid a gcc warning. 2011-10-28 09:35:34 +02:00
Juan RP
8bc705ea63 xbps-bin(8): (check) new test to fix missing requiredby entries in regpkgdb. 2011-10-28 00:57:16 +02:00
Juan RP
f87b40eb76 xbps-bin(8): split individual checks from check.c into its own files.
This is in preparation for new upcoming checks.
2011-10-27 17:08:48 +02:00
Juan RP
2ff2d1f68a xbps-bin(8): 'check' target now works with virtual packages. 2011-10-27 11:02:55 +02:00
Juan RP
807045d1d5 xbps-bin(8): make 'remove' target also follow common style to list pkgs. 2011-10-25 17:52:05 +02:00
Juan RP
746d9894c2 xbps-bin(8): remove specified pkgs first in recursive case.
Previously the specified pkg(s) were added at the tail of the
array, which was wrong. Add pkg(s) to the head of the array so that:

$ xbps-bin -Rp remove foo blah

foo and blah will be removed before any of its automatic dependecies.
2011-10-24 10:23:07 +02:00
Juan RP
4f8e6c00af xbps-bin: install: use a shell wildcard pattern if only pkgname is set. 2011-10-24 10:03:54 +02:00
Juan RP
bda1feb396 xbps-bin: more printf cosmetics for the install target. 2011-10-19 16:25:06 +02:00
Juan RP
40d15fd342 xbps-bin(8): the 'check' target now switches to auto mode if required. 2011-10-19 09:44:18 +02:00
Juan RP
8fa21753b1 xbps-bin: printf cosmetics for the install target. 2011-10-18 21:40:26 +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
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
d70036dd81 xbps-repo8(8): make the show targets be aware of vpkg settings in conf. 2011-10-16 16:54:08 +02:00
Juan RP
2d50109da5 xbps-bin: detect broken symlinks in the 'check' target. 2011-09-28 11:06:24 +02:00
Juan RP
edb909c899 xbps-{bin,repo}: minor change to long_desc obj printing. 2011-09-01 09:50:47 +02:00
Juan RP
4aa06921ff xbps-*: do not pass a NULL pointer to xbps_end(). 2011-07-29 11:27:43 +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
e71e3e9958 trans_cb: fix obvious error in REPOSYNC state. 2011-07-29 11:12:34 +02:00
Juan RP
3bbc6ae18d trans_cb: also show old pkgver when updating a pkg. 2011-07-29 08:09:23 +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
6c0b24029b xbps-bin(8): fix a couple issues in the 'check' target. 2011-07-28 16:24:16 +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
43b841dce1 Use xfcd->cookie to pass user-supplied data to the fetch cb. 2011-07-27 18:04:38 +02:00
Juan RP
508f119bc9 Moved install transaction code to libxbps, see NEWS file. 2011-07-27 17:13:54 +02:00
Juan RP
6b02c28bd7 xbps-bin(8): simplify previous commit and reuse new code. 2011-07-25 16:44:26 +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
d1454c21d2 Improvements to xbps-bin(8) and xbps-repo(8) manpages. 2011-07-23 08:33:12 +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
fddb472dd0 xbps-uhelper: remove unused targets/code. 2011-07-15 16:29:55 +02:00
Juan RP
5917fc7404 xbps-repo: printf uint64_t with PRIu64. 2011-07-11 12:12:55 +02:00
Juan RP
f7918ec5aa xbps-repo: ignore pkgs providing virtualpkgs in genindex target. 2011-07-11 10:12:42 +02:00
Juan RP
c163801fd0 xbps-bin: print the list of pkgs when removing a pkg with reverse-deps.
This commit also removes the printf for -F, it seems that it's confusing
so I simply removed it and it won't proceed unless -F is specified.
2011-07-10 20:24:29 +02:00
Juan RP
b62f1f0396 xbps-repo: remove unused pkgname var for previous commit. 2011-07-09 13:33:48 +02:00
Juan RP
cdf4640246 xbps-repo(8): 'genindex' now removes entries for unexistent pkgs.
Packages that were previously registered in repository's pkg-index.plist
and are now unaccessible are removed.

This fixes issue #1 in github.com/vanilla/xbps.
2011-07-09 13:18:11 +02:00
Juan RP
81d5bdd79a xbps-repo: fix the 'genindex' target with missing directories.
This fixes issue #3 in github.com/vanilla/xbps.
2011-07-09 11:21:17 +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
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