Juan RP
d59ad72ee4
xbps-bin(8): the 'check' target now handles symlinks correctly.
2012-10-04 12:05:04 +02:00
Juan RP
42c21e1c3c
xbps-create: if a symlink points to an unexistent file store symlink target as is.
...
Seen in recent builds when building the systemd binpkg:
[chroot] => Building systemd-194_1.x86_64.xbps...
xbps-create.real: main.c:219: ftw_cb: Assertion `p' failed.
Which was asserting in a symlink that was pointing to a file provided by the udev
pkg, therefore realpath(3) failed.
2012-10-04 09:40:52 +02:00
davehome
efe6d4ff94
xbps-repo.8: misc grammar fixes.
2012-10-02 03:02:52 -06:00
davehome
272d4ffaf6
xbps-bin.8: misc grammar fixes.
2012-10-02 02:56:34 -06:00
davehome
7fb829177c
xbps-bin.8: fix previous.
2012-10-02 02:49:10 -06:00
davehome
51b9b7f3bf
xbps-bin.8: fix check target grammar.
2012-10-02 02:48:15 -06:00
davehome
2456a0e502
xbps-bin.8: fix grammar for -A.
2012-10-02 02:44:15 -06:00
Juan RP
9f41661726
xbps-create: added manpage.
2012-10-02 10:14:20 +02:00
Juan RP
154337ceab
xbps-repo: remove-obsoletes: remove broken binpkgs (when plist cannot be internalized).
2012-09-30 10:08:21 +02:00
Juan RP
0ab888a79c
xbps-repo: no need to release dict from xbps_rpool_xxx.
2012-09-30 08:11:51 +02:00
Juan RP
1d7fab2abd
xbps-create: remove -d --destdir option and require this as argument.
2012-09-30 07:12:31 +02:00
Juan RP
3222fce866
Revert "xbps-bin.8: update FILES section."
...
This reverts commit 8e4e9e7bf5
.
This doesn't apply to this branch, only for single-pkgdb.
2012-09-29 19:37:22 +02:00
Juan RP
890e1a0040
xbps-create/Makefile: remove unneeded var.
...
(cherry picked from commit b7f98f1a916db98c476be3b05ad29bf96a5746c9)
2012-09-29 19:14:05 +02:00
Juan RP
140a012d3b
xbps-uhelper: remove obsolete code (unneeded with upcoming xbps-src-30).
...
(cherry picked from commit 14ec6cfdd0068b348b302a8da24774e9794bbaf8)
Conflicts:
bin/xbps-uhelper/main.c
2012-09-29 19:13:38 +02:00
Juan RP
ea2710bca4
xbps-uhelper: allways zero out xbps_handle passed to xbps_{init,end}.
...
(cherry picked from commit e84d44a3416936333d10b134514eca6abddb5d6d)
2012-09-29 19:12:39 +02:00
Juan RP
7fa0861794
xbps-create: switch --homepage to -H, add -h/--help.
...
(cherry picked from commit 3a383c41f5dc77f5c08c90a9831123243ffa9109)
2012-09-29 19:12:20 +02:00
Juan RP
8e4e9e7bf5
xbps-bin.8: update FILES section.
...
(cherry picked from commit ae5079b05c499a2194a445799b1d52604f69d279)
2012-09-29 19:11:02 +02:00
Juan RP
54b6cc7ec1
xbps-{bin,repo}: add -B flag to set default repo if xbps.conf not found.
...
(cherry picked from commit 75eac1a1426040a833e0b10e208f2e55fa359532)
2012-09-29 19:10:48 +02:00
Juan RP
7714f0f6c5
bin: print usage() in stdout.
...
(cherry picked from commit b090e1a0bd32cabd8fe81bd756d419ee4b170ef7)
2012-09-29 19:08:03 +02:00
Juan RP
c39c1e5751
xbps-create: handle another variant of a relative symlink.
...
(cherry picked from commit 7d849c2a656246be808206baa0adae2da1c9132d)
2012-09-29 19:07:54 +02:00
Juan RP
e989b74c6a
xbps-create: handle symlinks a bit better.
...
(cherry picked from commit 8a0e98485872b4ab97a3e55b453821016d89eab7)
2012-09-29 19:07:45 +02:00
Juan RP
d3bb6fe13e
xbps-create: when adding entries to archive, copy data with one read().
...
(cherry picked from commit 1263e4555a25c4118647104563c92af9bfbe5005)
2012-09-29 19:05:54 +02:00
Juan RP
b478f6d774
xbps-create: add -q (quiet), ignore optarg if it's empty.
...
(cherry picked from commit 4417f7d74c0d552bba0f625b7df8adf25999000f)
2012-09-29 19:05:39 +02:00
Juan RP
83688cf8ec
xbps-{bin,repo}: fixed crash in 'show' target reported by pancake.
...
(cherry picked from commit 4129a08cef7139b30b41ac659f35f9d494c2d918)
2012-09-29 19:04:41 +02:00
Juan RP
b08d3ea89c
xbps-create: added -B (--built-with) to set "packaged-with" string obj.
...
(cherry picked from commit 16cffb187990df161e4683ce3154abdd6ce2bbd4)
2012-09-29 19:04:12 +02:00
Juan RP
114fd914d8
xbps-create: finish support for -M (mutable files).
...
(cherry picked from commit 73028bdd892384684a70fa8da0572b0832c69c92)
2012-09-29 19:04:12 +02:00
Juan RP
7f8c8b3dcd
xbps-create: remove trailing whitespace.
...
(cherry picked from commit d139420576328084255f0145c5cfea3ad2d1367a)
2012-09-29 19:04:12 +02:00
Juan RP
5868bafc85
xbps-create: remove leftover line.
...
(cherry picked from commit 1c37453d2815b94de5a1191031a17623661ce435)
2012-09-29 19:03:58 +02:00
Juan RP
215f6d6f31
xbps-create: multiple fixes and new additions, 1 item left to finish.
...
- Added "build-date" object to XBPS_PKGPROPS.
- Added "installed_size" object to XBPS_PKGPROPS.
- Add entries to archive with "./" as prefix to match xbps-src.
- Create binpkg atomically (from caller's perspective) in cwd.
(cherry picked from commit efeae7c346e914bca045ffe44627c18321e45be9)
2012-09-29 19:03:04 +02:00
Juan RP
6ece895957
WIP: xbps-create(8) to create xbps binary packages from a destdir.
...
(cherry picked from commit 6546f73f90cd56d14a2e90cb6604901df18a9419)
2012-09-29 19:00:58 +02:00
Juan RP
7d4ecbb0ab
xbps-repo: index-add: look for pkg in index matching arch or noarch.
2012-08-20 14:58:38 +02:00
Juan RP
3c379ff78e
xbps-repo: remove repo index file locking, it's unreliable under NFS.
2012-08-16 10:59:54 +02:00
Juan RP
a037b89042
xbps-repo: really wait 30 secs max to acquire repo file lock.
2012-08-14 09:36:44 +02:00
Juan RP
2e594caf8a
xbps-repo(8): the 'show-deps' target only lists deps and not repo/pkgver.
2012-08-10 08:43:51 +02:00
Juan RP
c34e564327
xbps-repo: more exact pkg extension check.
2012-08-07 10:37:52 +02:00
Juan RP
f0ab396036
xbps-{bin,repo}: ignore ENOENT when checking write perms in {root,meta,cache}dir.
2012-08-03 10:58:16 +02:00
Juan RP
68a0223c4e
xbps-repo: fix the 'search' target to show a consistent output for inst/uninst pkgs.
...
Fixes issue #28 .
2012-08-02 14:37:15 +02:00
Juan RP
3a247bd5cb
xbps-{bin,repo}: make sure that user has write permission on {root,meta,cache}dir.
...
Fixes issue #27
2012-08-02 12:20:18 +02:00
Juan RP
cae219c4de
xbps-repo: indent pkgs from all repos with longest pkgver found.
2012-08-01 08:25:15 +02:00
Juan RP
01c2dcaca7
xbps-bin: get_maxcols(): use stdin to make it work in all cases (from xdave).
2012-08-01 07:47:40 +02:00
Juan RP
1be90e57d7
xbps-{bin,repo}: wrap long lines for list, pkg-list and search targets.
...
Fixes issue #26
2012-07-31 17:50:50 +02:00
Juan RP
eb75041b25
xbps-repo(8): the search target now shows which pkgs are currently installed.
2012-07-31 10:34:10 +02:00
Juan RP
d319816fa2
xbps-bin: fixed regression in show target for vpkgs.
2012-07-23 10:21:32 +02:00
Juan RP
577ae731bb
xbps-repo: index-clean: simplify code.
2012-07-22 11:45:17 +02:00
Juan RP
5a120e346e
xbps-repo: new 'remove-obsoletes' target to remove obsolete pkgs in a local repo.
2012-07-22 10:48:29 +02:00
Juan RP
f0c96aac65
xbps-repo: index-clean now also removes obsolete pkgs found in repo.
2012-07-22 10:21:49 +02:00
Juan RP
adc6ce9d22
xbps-repo: [index] use proper arch obj to remove old entry.
2012-07-21 22:23:45 +02:00
Juan RP
29f9724ba0
xbps-repo: properly remove (no)arch old entry/binpkg from index.
2012-07-21 21:50:16 +02:00
Juan RP
9a69c5e349
xbps-bin: fix a warning found by -Wshadow on Ubuntu.
2012-07-19 18:00:19 +02:00
Juan RP
bf7324f7a4
xbps-repo: mention index-{add,clean} in usage().
2012-07-18 15:06:47 +02:00
Juan RP
674adf64a3
xbps-repo: remove old binpkg symlinks too, fix index-files.
2012-07-17 13:10:34 +02:00
Juan RP
8eba2d7ea3
xbps-repo: replaced 'genindex' target with 'index-{add,clean}'.
...
See the NEWS file for more information.
2012-07-17 12:31:04 +02:00
Juan RP
2f1e975607
Added "install-date" object to pkg's pkgdb dictionary, make xbps-bin(8) print it.
2012-07-11 12:19:39 +02:00
Juan RP
f1ad8a95de
xbps-repo: fixed issue 24 (xbps-src make-repoidx is doing something wrong).
2012-06-30 11:10:00 +02:00
Juan RP
5cb0d17f8e
xbps-repo: [clean] print err msg when unlink(2) fails.
2012-06-19 10:55:42 +02:00
Juan RP
f4e97228c8
xbps-repo: [clean] do not fail if cachedir does not exist, update for new API.
2012-06-19 10:52:57 +02:00
Juan RP
3e93d235ff
xbps-{bin,repo}: strlcpy -> memcpy.
2012-06-18 10:42:24 +02:00
Juan RP
a2e42f1d57
xbps-bin: fixed a memleak in show_pkg_info().
2012-06-18 10:01:27 +02:00
Juan RP
ad766cd538
xbps-repo: fixed regression in the 'clean' target.
2012-06-16 09:32:26 +02:00
Juan RP
974b2fe8ad
libxbps: simplify pkgdb_get_pkgd and find_pkg_dict_installed internals.
...
There's no need to prop_dictionary_copy the returned dictionary to
later have to free it again, just return directly the dictionary and
avoid the free(3)s.
2012-06-16 09:02:07 +02:00
Juan RP
068cab8d20
libxbps: performance improvements by caching the most accessed paths.
...
1- We can cache the result of the first xbps_pkgdb_init() when it fails
and avoid the malloc/free/access from it.
2- We cache the uname(2) result into a private var in xbps_handle and
use it in xbps_pkg_arch_match().
This improves performance by ~5% approx and it's close as it was before
introducing the repository index format 1.5.
2012-06-15 15:33:11 +02:00
Juan RP
29871b2120
xbps-bin: re-add libxbps cleanup to the sighandler, also handle SIGHUP.
2012-06-14 10:11:50 +02:00
Juan RP
3e9e87fc2a
libxbps: require a pointer to xbps_handle in functions that need it.
...
This removes 2 global vars from lib/initend.c and easier to know
what functions require access to xbps_handle.
2012-06-14 08:22:11 +02:00
Juan RP
c61ba8dfcc
Added support for package conflicts.
2012-06-11 16:14:03 +02:00
Juan RP
efefa000b2
xbps_dictionary_metadata_plist_by_url: only accept exact matches.
2012-06-05 20:53:15 +02:00
Juan RP
1244d663d8
xbps-repo.8: rewording.
2012-06-05 14:42:03 +02:00
Juan RP
c37026d4c6
libxbps: require an underscore in strings to detect correctly pkgname/version.
2012-06-05 10:58:39 +02:00
Juan RP
61e8daea88
xbps-bin.8: document the 3 ways to install pkgs, with grammar help by xdave.
2012-06-03 08:08:29 +02:00
Juan RP
21060384d3
xbps-repo/index.c: misc cosmetic change.
2012-06-02 16:51:22 +02:00
Juan RP
06034ea928
xbps-repo: index: don't write plist if no changes were made.
2012-06-01 17:03:05 +02:00
Juan RP
3399184511
xbps-repo: genindex target now removes any obsolete binpkg not registered in index.
2012-06-01 16:37:44 +02:00
Juan RP
0c52f3cce6
xbps-repo.8: improve description of 'genindex' target.
2012-06-01 15:45:23 +02:00
Juan RP
992aeeee4a
xbps-repo: typo build fix.
2012-06-01 15:04:29 +02:00
Juan RP
981b13bd5a
xbps-repo: 'sync' and 'pkg-list' target now accept a repository URI argument.
...
If set, only the matching repository will be used for the task.
2012-06-01 15:02:06 +02:00
Juan RP
ba84f82e66
xbps-repo.8: update.
2012-06-01 14:23:23 +02:00
Juan RP
da75866a63
xbps-bin: -n now also prints pkg arch.
2012-06-01 11:28:30 +02:00
Juan RP
b20dffd2c0
xbps-repo: misc fixes/improvements to index{,-files}.c code.
2012-06-01 10:57:58 +02:00
Juan RP
65b5e328d8
xbps-repo: fixed index-files generation, this time for real!
2012-06-01 00:31:18 +02:00
Juan RP
ff2e434b56
xbps-repo: properly fix index-files update.
2012-05-31 23:48:58 +02:00
Juan RP
356bd655cf
xbps-repo: fixed 'genindex' target when removing obsoletes in index-files.
2012-05-31 17:34:17 +02:00
Juan RP
7289547432
Welcome "repository index format 1.5". See NEWS for information.
2012-05-31 16:29:56 +02:00
Juan RP
a58df97c75
xbps-bin: new flag -S to sync rpool indexes before the target.
2012-05-31 08:08:32 +02:00
Juan RP
6228204a14
xbps-bin: change yesno() in targets that use a transaction.
2012-05-31 08:03:54 +02:00
Juan RP
3244ec935d
bin/xbps-bin/check.c: remove a dead assignment found by clang-analyzer.
2012-05-30 14:21:34 +02:00
Juan RP
922ee1f1b6
libxbps: rename xbps_repository_pool_xxx to xbps_rpool_xxx.
2012-05-30 10:56:32 +02:00
Juan RP
fa7bee1164
xbps-repo: [pkg-list] do not print repo url if index is specified.
2012-05-29 16:17:48 +02:00
Juan RP
a14886ab48
xbps-bin: fix swapped args in check_pkg_symlinks.
2012-05-25 14:28:12 +02:00
Juan RP
30932b3c55
xbps-uhelper: fixed 'register' target (regression added in recent commits).
2012-05-15 08:56:30 +02:00
Juan RP
5fabb34a1f
xbps-bin(8): keep auto{remove,update} targets for compatibility.
2012-05-08 10:09:01 +02:00
Juan RP
e0fc55c389
xbps-bin(8): renamed autoremove target to remove-orphans.
2012-05-08 09:58:56 +02:00
Juan RP
758cd4fd11
xbps-bin(8): renamed autoupdate target to dist-upgrade.
2012-05-08 09:54:06 +02:00
Juan RP
b7961ae611
xbps-bin: print current/total pkgs counter in 'check all' target.
2012-05-07 12:33:50 +02:00
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
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
Juan RP
98a2034fcf
Also show the conflicts object if available and simplify the code.
2010-12-03 06:37:01 +01:00
Juan RP
b3c8a8ef5c
Backed out changeset e82cc0e4b779
...
Otherwise the refcount in repository pool will initialize/release on every op.
2010-11-25 21:33:14 +01:00
Juan RP
c7f6f9f44a
xbps-bin: there's no need to init repository pool.
2010-11-25 16:23:49 +01:00
Juan RP
2c72c81db0
xbps-bin: always check if the there are missing deps regardless of the errno value.
2010-11-25 10:58:44 +01:00
Juan RP
278a37a24a
xbps-bin: fix for previous.
2010-11-24 16:39:14 +01:00
Juan RP
940e077fb4
Improvements for xbps-{bin,repo}.
...
- Indent properly with the longest "pkgver" object while listing or searching
for packages.
- Also match strings in the short description object while searching for
packages in xbps_repo.
2010-11-24 16:37:30 +01:00
Juan RP
d2be842ce5
Fix and improve when there are missing deps in the transaction dictionary.
2010-11-23 23:17:04 +01:00
Juan RP
fdec663855
API clean up (part 2), plus misc changes and improvements.
...
- Rename regpkgs_dictionary to regpkgdb_dictionary to better describe what is is.
- Change some funcs in plist.c to return a boolean rather than int.
- Hide more internal funcs off the API.
- Simplify xbps_repository_update_pkg() and remove its second arg.
- Hide implementation details in xbps_repository_pool, now to iterate over the
pool you have to use xbps_repository_pool_foreach and its struct
repository_pool_index.
- Introduce xbps_{init,end}, to initialize/destroy some stuff in the library.
- Introduce xbps_dbg_printf to printf stuff for debugging purposes.
- xbps-{bin,repo}: added -d arg to enable debugging output.
- Before checking if a config file needs to be installed or such, check that
package contains the "conf_files" array.
- Remove obsolete dirs as well while updating packages.
- If transaction dictionary is ready remove the "missing_deps" array.
Bump XBPS_RELVER to 20101118.
--HG--
rename : lib/regpkgs_dictionary.c => lib/regpkgdb_dictionary.c
2010-11-19 13:40:13 +01:00
Juan RP
ffc255b715
Starting to clean up the public API, move private stuff into xbps_api_impl.h.
2010-11-13 03:18:58 +01:00
Juan RP
420225d414
xbps-dgraph: new utility to generate dot(1) graphs for package metadata properties.
2010-11-08 23:27:15 +01:00
Juan RP
c3afb4f4fb
New function: xbps_get_pkg_dict_from_metadata_plist.
...
This function returns and internalized dictionary from a package's metadata
plist file as specified by its arguments.
Update all code to use it where appropiate.
2010-11-08 03:14:41 +01:00
Juan RP
679833156a
Always release the object dictionary returned by xbps_find_pkg_dict_installed().
...
Document this in the public API header and update all code accordingly.
2010-11-08 02:02:35 +01:00
Juan RP
ec7cdde1e0
Misc cleanups and performance improvements.
...
- There's no need to check rval for prop_dictionary_get_*, we are sure the
objects are there at prop_dictionary_set_* time.
- Avoid two chdir(2) calls per INSTALL/REMOVE run.
- Avoid using access(2) to check for existence of INSTALL/REMOVE scripts,
just try to run the executable directly and check for ENOENT.
2010-11-06 06:44:00 +01:00
Juan RP
8ef8d86c12
Some changes for the XBPS libfetch's frontend code.
...
1) Raise the cache connection settings to more sane defaults (8->6, 16->2).
2) Introduce xbps_fetch_unset_cache_connection() to drop the caches.
2010-11-03 12:23:57 +01:00
Juan RP
8d998948ef
xbps-bin.8: fixed two formatting errors.
2010-10-31 01:59:48 +02:00
Juan RP
210f2799fc
xbps-bin(8): modify the 'list' target to accept an optional argument to
...
list packages in the specified state, so that you can list packages that
need to be purged, configured and broken (will be used in the future).
2010-10-27 13:10:03 +02:00
Juan RP
ef7da88db1
xbps-bin(8): added a new target "find-files".
...
This new target 'find-files' can be used to find which installed
package(s) own a file. Exact matches like "/bin/mount" or patterns
like "/usr/lib/libb[ao]b\*" can be specified.
2010-10-27 00:25:02 +02:00