Commit Graph

22 Commits

Author SHA1 Message Date
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 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 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 4bf5c5f750 Introduce xbps_xasprintf() and use it where required.
--HG--
extra : convert_revision : 324a92a4824476059e0993d00c2b925c732a79f8
2009-04-04 19:32:39 +02:00
Juan RP c72bbb0a5b Add func that returns a malloc'ed buffer with the hash string of a file.
--HG--
extra : convert_revision : 66d886c413e0a909ccd678fe1ebdda44ab6fef8a
2009-04-03 12:10:28 +02:00
Juan RP 40b62ee70d Return appropiate value in xbps_check_is_installed_pkg().
Return -1 if package is not installed or dependency not satisfied.
Return 0 if same version required is already installed.
Return 1 if installed version is greater than required.

--HG--
extra : convert_revision : 359b79cbe809e1818fe999dc1d55da7e635dbe44
2009-03-17 04:32:03 +01: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 37e4be86f9 Added support to check the SHA256 hash for any binpkg before installation happens.
--HG--
extra : convert_revision : 4f812eb0cfb614461527e360db1692bd5f9c34aa
2009-03-02 23:38:24 +01:00
Juan RP d9cc1d6b8f Implement support to update required_by objs when removing a pkg.
--HG--
extra : convert_revision : 405986d806ff23ce6348b22a2d7c48e0820ab1b9
2009-02-27 16:03:25 +01:00
Juan RP 255c48b198 Added support to check SHA256 integrity for binary pkgs.
This currently checks:
 - While removing, any file is checked and if hash doesn't match the
   file is ignored and not removed.
 - While installing, if a binary pkg file doesn't match with the one
   reported by the repository's pkg index file, the process will be
   stopped.

--HG--
extra : convert_revision : 42bb64e89a092f0ff3e7d951e5b26e45d63a60fe
2009-02-26 05:41:49 +01:00
Juan RP 6f8647f5c8 xbps_get_pkg_{name,version}: check for strrchr() returning NULL.
--HG--
extra : convert_revision : 4d63c1834f7b3c3b1a0395a7434095e9fc341885
2009-02-17 23:28:40 +01:00
Juan RP fda3da1543 Use string version comparator code from FreeBSD.
This fixes all cases that previous code has with no changes...
sorry pancake.

--HG--
extra : convert_revision : 993d0aa060daf36d1b5ffa63725002dda122c091
2009-02-17 03:49:02 +01:00
Juan RP 6b6162bb44 Added support for using noarch packages.
--HG--
extra : convert_revision : a96166ddecb6efe65d35283f25e06a944cc4a038
2009-02-16 00:39:41 +01:00
Juan RP 61f0b09698 New dependency/install/unpack WIP code.
This implementation will be faster and resolv the dependency chain
correctly taking into account indirect/direct deps and priority.

--HG--
extra : convert_revision : cc4ec186f06f944fa8825b176344c4d612658f85
2009-02-07 13:27:24 +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 926b1dfa4a Improve binpkg priorities, dynamically allocate mem, etc.
--HG--
extra : convert_revision : 479011aba6e9da4e5662137381e04042e762d428
2008-12-27 22:19:04 +01:00
Juan RP 11f0a2d4a6 xbps_get_pkg_name(): remove wrong comment.
--HG--
extra : convert_revision : 5a51c7fc6559347195e86d051aae72caafaf489d
2008-12-27 14:54:11 +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 4f3c798f7a Add assertions where appropiate.
--HG--
extra : convert_revision : 3c7a6f556b1dfdf110f8759375a171a571717b22
2008-12-27 01:40:13 +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 fa3b59b246 Another checkpoint for installing binary packages.
At least now dependencies are tracked, not sure it will be
enough for real life :-)

--HG--
extra : convert_revision : 962de22d515efa5599c148f918c14d32b5d9496d
2008-12-24 07:20:19 +01:00