Commit Graph

30 Commits

Author SHA1 Message Date
Juan RP 8b2fe3efe3 Introduce xbps_callback_array_iter_reverse_in_dict().
This function works by iterating an array in a dictionary
in reverse order, i.e from down to top.

--HG--
extra : convert_revision : 5e655c2edf3d42453f16830e2e944c7f6e2cd974
2009-08-08 22:14:42 +02:00
Juan RP e1e3e254ab Remove dup xbps_cmpver_* func, use just the real one.
--HG--
extra : convert_revision : cde78bdcccc68bb865d5bd76a84c00055f451e96
2009-06-07 05:02:58 +02:00
Juan RP 38e6679ff5 Implemented plist caching, that gives >30% performance.
--HG--
extra : convert_revision : 6302893f967be96f99a86d499ca62a8c005e56f7
2009-05-19 01:42:48 +02:00
Juan RP 9f108b4cd2 xbps-bin: implemented (WIP) "autoupdate" target.
Some parts in the library related to findings pkgs in repositories
has been improved vastly by caching the dictionary once.

Duplicated code has been added in xbps-bin/install.c, but will
be fixed soon.

--HG--
extra : convert_revision : 2924012a8589a2a6ecaa3863b5091049006c0ef3
2009-05-17 04:09:26 +02:00
Juan RP d11cce17d8 Increase ARCHIVE_READ_BLOCK_SIZE to a more suitable value.
--HG--
extra : convert_revision : 399afdeb4535a1a074117235785d277db468ebac
2009-04-18 17:24:22 +02:00
Juan RP 046dbee415 Add xbps_get_pkg_revision() to get the revision string.
--HG--
extra : convert_revision : 5c58a44db6b3f1ff2c7f75173aff7d6509dfd4c9
2009-04-18 15:49:08 +02:00
Juan RP bd3484fa6b Build code with -Wcast-qual, -Wcast-align and -Wsign-compare.
--HG--
extra : convert_revision : d489ad995bb69850cba5a352f3ac85b74a54b5cf
2009-04-11 15:52:32 +02:00
Juan RP 58c6a31297 Define ARCHIVE_READ_BLOCKSIZE and use it rather than using magic numbers.
--HG--
extra : convert_revision : b8e6755400eb6f2bef0ea1eb25a258f9ed1714c2
2009-04-09 18:38:05 +02:00
Juan RP 053abca5ef Use glibc's sys/queue.h and remove the NetBSD local copy.
--HG--
extra : convert_revision : 2e6967a2666bcb7cd826293c03863890649f4c6d
2009-04-09 16:33:42 +02:00
Juan RP aaf5f8fb40 Add some funcs from pacman: question(), yesno(), noyes() and strtrim().
--HG--
extra : convert_revision : 82fbbd28253b02968826bebe4252523c47903a49
2009-04-09 04:52:46 +02:00
Juan RP f80e1753a8 Remove knowledge from the library to install packages.
The library is only responsible now to find all binary packages
from repositories, sort them and create a dictionary with all
details. The frontend (xbps-bin) provides support for this,
and this allows for more flexibility and removes some stuff
that didn't belong in the library.

While here implemented support to show total download/installed
size for all packages that are going to be installed.

Next step will be to implement user interactivity before
installing/removing/updating packages.

--HG--
extra : convert_revision : 858e9a89bc6a60b348435f2416a8af3ebb6ea5c9
2009-04-09 02:29:15 +02:00
Juan RP bb3240e4ac Do not reuse requiredby objects while updating pkgs.
--HG--
extra : convert_revision : 1bc0a25601b6ff1c4cd83de4dcd775ffdee1e9a1
2009-04-06 17:00:52 +02:00
Juan RP 625a77883c Make xbps_remove_pkg_from_* return int rather than bool.
--HG--
extra : convert_revision : 9f413873669b552a4d7a6e25e667fe5ff43f6a78
2009-04-06 16:39:14 +02:00
Juan RP c49d324961 Use a single header (xbps_api.h) for defs and protos.
--HG--
extra : convert_revision : 45979550279f24dbb76e7fff8d0f7b9e76f59bce
2009-04-05 15:06:09 +02:00
Juan RP dfeb2f4143 Define XBPS_PKGINDEX_VERSION constant and use it.
--HG--
extra : convert_revision : e5c982e083d1a03b57feb71799619e7cbbae4239
2009-04-03 19:55:57 +02:00
Juan RP a67374bd66 Simplify all code that used rootdir and flags passed via xbps-bin.
Add util funcs to get/set global values for them:
 * xbps_[gs]et_rootdir()
 * xbps_[gs]et_flags()

--HG--
extra : convert_revision : 2584b098e68a684e7b0eeac57c2b1df4aba6589d
2009-03-17 00:32:26 +01:00
Juan RP 8d243e8dab xbps-bin: implement 'files' target, to show installed files for a pkg.
--HG--
extra : convert_revision : c522253a61c23e8439c6de343e713497a2a10033
2009-02-26 02:46:20 +01:00
Juan RP fb998feacf xbps-bin: add -v flag, used when installing/removing currently.
--HG--
extra : convert_revision : d543b52213bf3d35b17ef29ff74a879bc4342cef
2009-02-17 00:08:03 +01:00
Juan RP 2b24128059 xbps-bin: added support for the show target.
--HG--
extra : convert_revision : 24b2d30a94c95b22b1c524203cf578da03314335
2009-02-16 16:24:33 +01:00
Juan RP 902fb71aa6 Changed XBPS_META_PATH to /var/db/xbps rather than /var/cache/xbps.
--HG--
extra : convert_revision : 4e10af13ce05f060ebdfa8ca4e767a269c46b17f
2009-02-14 23:21:12 +01:00
Juan RP 3c7b8186e6 Fix binpkg installation with multiple repositories.
New changes include a modified algorithm of the previous one, which
finally does not fail even with multiple repos, YAY!

Fixed some leaks as well, thanks to valgrind.

--HG--
extra : convert_revision : 3cffe1e9e9e9f7abf225ca3c6643377fc12a94bd
2009-02-14 01:37:12 +01:00
Juan RP 3a52668aed Reorganize headers and move two funcs into util.c, where they belong.
--HG--
extra : convert_revision : 63d54dddfeb732da2204244fd9f00cff434e5540
2009-02-05 16:53:49 +01:00
Juan RP db1227ab76 libxbps: add fexec.c from NetBSD's pkg_install, with some minor mods.
--HG--
extra : convert_revision : 42a4231615746fdc21c826d7f5c1ccbe5ea7a6e2
2008-12-28 04:34:27 +01:00
Juan RP b2abe59c52 Added support to specify a root directory for xbps.
All xbps metadata files will go into <rootdir>/var/cache/xbps
and package data will go into <rootdir>/<data>.

--HG--
extra : convert_revision : 37007ac4f9b99b31465612a58749713b3164139b
2008-12-27 12:56:51 +01:00
Juan RP 91f7df59cd Support for installing pkgs from multiple repositories.
--HG--
extra : convert_revision : fc8a430e71d202aa9e7560b921669f62f1947ae1
2008-12-26 04:36:51 +01:00
Juan RP 4101025318 Working dependency handling for binary packages.
--HG--
extra : convert_revision : d0ff56b524efba53b11b7635972b03feaaeb889a
2008-12-24 10:58:19 +01:00
Juan RP 26c054d773 Checkpoint for installation of binary packages.
--HG--
extra : convert_revision : 0bc55ebae04b2e1e5ab20feca786b649fc2e0335
2008-12-23 12:28:21 +01:00
Juan RP a928bf02e2 Add queue.h from NetBSD rev 1.50, verbatim.
This will be used shortly to handle dependencies with xbps-bin.

--HG--
extra : convert_revision : a4e58303b7cc6a2a99c8874d0154fea4bcccbd11
2008-12-22 07:42:34 +01:00
Juan RP d10d9e824c xbps_show_pkg_info(): use humanize_number().
--HG--
extra : convert_revision : e1c903e76d6d5b6501c8893b6d14e23e5b395e58
2008-12-22 07:09:04 +01:00
Juan RP e7cf222ac9 Reorganize the tree splitting stuff on its own dir.
--HG--
extra : convert_revision : 87473fb499c42deaf0285f5559dc1cd8d67ab436
2008-12-21 23:57:02 +01:00
Renamed from utils/xbps_api.h (Browse further)