Commit Graph

125 Commits

Author SHA1 Message Date
Juan RP
ad12302a69 xbps-uhelper: remove unused debug code.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100420123503-std182rf5dt59ccq
2010-04-20 14:35:03 +02:00
Juan RP
6256b34ccc Some changes that will appear in 0.5.0:
* Add proplib-0.4.1 source and use it in XBPS. This is to avoid
   an external dependency, so that we depend on the features of the
   internal library. This also means that proplib is not required anymore.

 * Added support to read/write gzip compressed plists by default, thanks
   to proplib-0.4 that gained new functionality.

That means that from now, XBPS will be able to write compressed gzip
plist files for all metadata related work. This will vastly reduce
bandwidth required for fetching remote repo's pkg index file and
binary packages.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100420122238-zcb85rudt9p34e10
2010-04-20 14:22:38 +02:00
Juan RP
9bceb2adb7 xbps-bin: fixed the install target to work with pkgnames containing
multiple '-' characters, which resulted in incomplete pkgname.

The fix is to always append '>=0' if a pkgname is specified, and passing
a pkgpattern to xbps_repository_install_pkg().

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100226051333-od2siux4rmsa88m7
2010-02-26 06:13:33 +01:00
Juan RP
9f4b36292d xbps-bin: unset some bool vars while processing the transaction to avoid
wrong messages for preserve pkgs.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100217041941-wrvm86m0tc7ynlvu
2010-02-17 05:19:41 +01:00
Juan RP
83ab3fe977 xbps-bin/remove.c: set some pointers to NULL before checking them.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100128164423-i00yg3xp3nlsoh6j
2010-01-28 17:44:23 +01:00
Juan RP
61dde1ac02 Always overwrite files while unpacking, this makes the "essential" obj obsolete.
This helps to catch upgrade problems and simplifies some parts of the code.
Bumped XBPS_RELVER because xbps_remove_pkg() has been changed.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100128150850-gcs93su38t6moydn
2010-01-28 16:08:50 +01:00
Juan RP
375330a956 xbps-bin: print different msgs for pkgs marked as preserve and essential.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125151648-s3d0zxaro5v5bh95
2010-01-25 16:16:48 +01:00
Juan RP
dae134cd48 xbps-bin/remove.c: simplify error paths.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125151604-jwhoavlbdhr645df
2010-01-25 16:16:04 +01:00
Juan RP
bf6b96c651 xbps-bin/check.c: simplify exit paths.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125151533-z7ub7xlqbhg97ij2
2010-01-25 16:15:33 +01:00
Juan RP
1c4d43306a xbps-bin(8): if -f is set, remove files and configuration files even
if its hash doesn't match for the remove and purge targets respectively.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125070948-841kw2r4knz2793e
2010-01-25 08:09:48 +01:00
Juan RP
17d87b3559 Repair upgrades of preserve packages, i.e kernel.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125052754-6xri8lfmykhof5dz
2010-01-25 06:27:54 +01:00
Juan RP
7f343b8dbe xbps-bin: fixed some stdout vs stderr printf issues.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100125021454-n1bh7qjy27azr9du
2010-01-25 03:14:54 +01:00
Juan RP
232660167b xbps-uhelper: make 'fetch' target accept an arbitrary number of arguments.
Also set default libfetch's cache connection limits.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124162517-iorbhh21je4c65xo
2010-01-24 17:25:17 +01:00
Juan RP
088baa7699 Add defs for default fetch cache connection limits and use them in
xbps_fetch_cache_connection() if 0 is passed as argument.

xbps-bin: enable fetch cached connection when downloading binpkgs.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124153156-4updprik11nwi7c1
2010-01-24 16:31:56 +01:00
Juan RP
489f6baaa6 xbps-bin: remove an extra newline in transaction ops.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124130757-mf0p5d6kajwd6t2k
2010-01-24 14:07:57 +01:00
Juan RP
c0b280c118 Mega-commit to document the API with doxygen.
Some changes were made to the API when making the documentation:

- A few exported functions are now hidden, because they were only used
  internally in the library.
- A few exported symbols were renamed to document them better than
  previously.
- Cosmetic changes all along the way, as well as some fixes here and there.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100121021019-onbsivlrhdb7t3ou
2010-01-21 03:10:19 +01:00
Juan RP
a165d20193 Error and warning messages should go to stderr, make it so.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100115141916-tpg2rga1i4pm42kj
2010-01-15 15:19:16 +01:00
Juan RP
6c27794c5b xbps-bin: simplify pkgname_from_pkgmatch() and fix a bug.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114123917-3tvrb3tp097nnq8r
2010-01-14 13:39:17 +01:00
Juan RP
7230203be4 xbps-bin: really fix previous, by using a hack for now.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114052501-e8xak6rhwf8tonf6
2010-01-14 06:25:01 +01:00
Juan RP
37008d3c75 xbps-bin: don't make false positives detecting pkgmatches vs pkgnames
while installing packages.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114030001-0m1cb3m1cf7oc7un
2010-01-14 04:00:01 +01:00
Juan RP
023841b060 Implemented blueprint 'install-pkg-by-pkgmatch' as specified in
https://blueprints.launchpad.net/xbps/+spec/install-pkg-by-pkgmatch

The implementation works as expected, it was easier that I thought.
Bump XBPS_RELVER because the API was changed slightly.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114011431-xv5q6bgahm6v9dbq
2010-01-14 02:14:31 +01:00
Juan RP
6c29fe7514 xbps-repo: search target: also report exact matches by pkgname.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100114000654-tnrtvi1ymy2iveyx
2010-01-14 01:06:54 +01:00
Juan RP
27dd304d76 Install the xbps_api.h header.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100113183225-gz8xn8fa5hp2vdan
2010-01-13 19:32:25 +01:00
Juan RP
536fb8a86e xbps-repo/util.c: bump copyright year.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100113160523-8f0blxmmep2hn44e
2010-01-13 17:05:23 +01:00
Juan RP
b225a8d243 xbps-repo/util.c: simplify show_pkg_files().
--HG--
extra : convert_revision : xtraeme%40gmail.com-20100113155750-bwxwc47h2ncqf8pt
2010-01-13 16:57:50 +01:00
Juan RP
343600261c xbps-bin(8):
- Add -y flag to assume "yes" for all questions.
 - Print a proper error string when the transaction dictionary is empty.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091222134338-u9h0iybexedunm0h
2009-12-22 14:43:38 +01:00
Juan RP
7eea0f8e8e xbps-bin(8): implemented Launchpad blueprint "arbitrary-pkgname-args".
See https://blueprints.launchpad.net/xbps/+spec/arbitrary-pkgname-args.

The install, update and remove targets now accept a list of package
names that will be processed.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091222113736-0dawl4whvtdi5dj3
2009-12-22 12:37:36 +01:00
Juan RP
02c0c569a3 xbps-{bin,repo}.8.txt: s/SYNOPSYS/SYNOPSIS/
--HG--
extra : convert_revision : juan%40juan-desktop-20091218121933-hgss4vyhyaoj3pbn
2009-12-18 13:19:33 +01:00
Juan RP
eb885bbcc2 When executing the INSTALL/REMOVE scripts, always pass the UPDATE
value to them.

Bump XBPS_RELVER to 20091209.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091209151435-1yy9f7k2880tswz7
2009-12-09 16:14:35 +01:00
Juan RP
2d68cec780 xbps-bin: make the 'autoremove' target respect -f flag to bypass question.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091207055227-8kiks1f3k2tuoe2z
2009-12-07 06:52:27 +01:00
Juan RP
b0b00cf1ff xbps-repo: when adding local repos always create XBPS_META_PATH.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091206082938-4adrlgkbsz6lsz5y
2009-12-06 09:29:38 +01:00
Juan RP
2faef604bd xbps-bin.8.txt: fix typo.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091205000558-cktvvd1ka6445g62
2009-12-05 01:05:58 +01:00
Juan RP
20ec9c3b6d Fixed typos in xbps-{bin,repo} manpages.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091202061945-kpgqqrc9pgriosb3
2009-12-02 07:19:45 +01:00
Juan RP
b03a18ff84 xbps_unpack_binary_pkg: removed 2nd bool argument, look for a preserve object
to not remove files in removal or upgrades.

Bump XBPS_RELVER to 20091202.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091202053103-uby6hwu313pieafa
2009-12-02 06:31:03 +01:00
Juan RP
94bb169c88 Rename lib/repository_plist.c exported functions.
xbps_get_path_from_pkg_dict_repo -> xbps_repository_get_path_from_pkg_dict
xbps_get_pkg_plist_dict_from_repo -> xbps_repository_get_pkg_plist_dict
xbps_get_pkg_plist_dict_from_url -> xbps_repository_get_pkg_plist_dict_from_url

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091130113538-bji65cydf3bkwxkw
2009-11-30 12:35:38 +01:00
Juan RP
d90a248244 Rename struct repository_data to repository_pool.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091130112404-mlrt6x08thdvmrsn
2009-11-30 12:24:04 +01:00
Juan RP
91aeac4dad Rename some function from lib/repository* with more meaningful names.
xbps_unregister_repository() -> xbps_repository_register()
xbps_register_repository() -> xbps_repository_unregister()
xbps_find_deps_in_pkg() -> xbps_repository_find_pkg_deps()
xbps_prepare_pkg() -> xbps_repository_install_pkg()
xbps_find_new_pkg() -> xbps_repository_update_pkg()
xbps_find_new_packages() -> xbps_repository_update_allpkgs()
xbps_get_pkg_props() -> xbps_repository_get_transaction_dict()

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091130110846-5uaqxdhfo0kl0cqd
2009-11-30 12:08:46 +01:00
Juan RP
e4cda0e9cc Rename lib/sync_remote_pkgidx.c to repository_sync_index.c.
xbps_sync_repository_pkg_index() renamed to xbps_repository_sync_pkg_index().

--HG--
rename : lib/sync_remote_pkgidx.c => lib/repository_sync_index.c
extra : convert_revision : xtraeme%40gmail.com-20091130105325-75rr2xm1zpi8bjwh
2009-11-30 11:53:25 +01:00
Juan RP
bfa9858277 xbps-bin, xbps-repo: show the "essential" and "replaces" objs values
in the 'show' target.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091130102023-3ureuzorr96fj7by
2009-11-30 11:20:23 +01:00
Juan RP
4e38be11f4 xbps-bin: fix assertion with pkgs containing the "replaces" obj.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091129045149-l8zvcbo1w1jzglai
2009-11-29 05:51:49 +01:00
Juan RP
1a5d19dca2 Fix and improve how missing pkg dependencies are handled from repos.
- Use an array of strings to store the pkgdeps.
- While adding a missing pkgdep, check if it's already in the queue and
  new required version is greater, in that case replace with new one.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091129021735-5dqfucofny8slks2
2009-11-29 03:17:35 +01:00
Juan RP
eb0567bfab xbps-bin(8): mention /var/db/xbps/metadata/pkgname/*.plist.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128081809-2wk7hvlwtr6m9y8b
2009-11-28 09:18:09 +01:00
Juan RP
a85073f6e8 xbps-repo: also print binpkg compression type in the show target.
Now it looks like:

$ xbps-repo show xbps-devel
Fetching info from: /storage/xbps/packages
Filename: xbps-devel-20091128.i686.xbps (size: 69K)
SHA256: 2c54a61fbd128097692edc19a7c17bfb10d93b3f055b04171cd1e4d97cde79df
Compression type: xz
Package: xbps-devel
Installed size: 216K
Maintainer: Juan RP [xtraeme@gmail.com]
Architecture: i686
Version: 20091128
Description: The XBPS package system (development branch)
 The XBPS package system. A new, fast, from scratch and simple
 binary package manager. This packages includes code from a development
 branch available from https://launchpad.net/xbps
$

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128051134-qzqqnwd76tcxgxb0
2009-11-28 06:11:34 +01:00
Juan RP
8b3b5c9d1a xbps-bin, xbps-repo: use xbps_pkgdep_match() for the search target.
This provides csh style shell pattern.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128045200-4rymuqm90rzmgiaw
2009-11-28 05:52:00 +01:00
Juan RP
6208cc8e30 xbps-bin: update manpage.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128025636-xb1xywk7cv43ozng
2009-11-28 03:56:36 +01:00
Juan RP
3855ee582a xbps-repo: add -c flag to set cachedir, update manpage.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128025616-fe43609n1rosmt6u
2009-11-28 03:56:16 +01:00
Juan RP
f3d2481c31 xbps-repo: if fetching info from remote repo for the 'show' and 'show-files'
targets and the binary package exists in cachedir, use it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128022129-y6y2tr0vtvy2w745
2009-11-28 03:21:29 +01:00
Juan RP
494504dbec Added support for a cachedir to store downloaded binpkgs.
libxbps:
 * Added xbps_set_cachedir() and xbps_get_cachedir(). By default it's
   set to /var/cache/xbps if not specified and it's always relative
   to the root directory.
 * Move mkpath() code from sync_remote_pkgidc.c into its own file mkpath.c
   to use it in another parts of the code.
 * Added xbps_get_binpkg_local_path(), that returns the local path to
   a binary package file, stored in cachedir or local repo.
 * Remote pkg index files are now stored directly in metadir/repodir,
   skipping the arch directory because binpkgs are now in cachedir.

xbps-bin:
 * Added -c flag to set the cachedir.
 * Check sha256 hashes in the download stage so that it can check
   a downloaded binpkg immediately once is stored.
 * If a binpkg doesn't match the hash it will be refetched.

Bump XBPS_RELVER to 20091128.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128013841-kkcvk07lsqdr26w8
2009-11-28 02:38:41 +01:00
Juan RP
391f02ce10 Added some missing changes for previous.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091126023256-oyfwnekdeu2h9zi8
2009-11-26 03:32:56 +01:00
Juan RP
5223b6d652 xbps-bin(8), xbps-repo(8): improve descr for some targets.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091126022901-34bq1qnrdzeakmnc
2009-11-26 03:29:01 +01:00