Commit Graph

16 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
db6b1526d4 lib/sortdeps.c: remove useless check.
--HG--
extra : convert_revision : f1fd20ffc9f77187173422e44aee1a3c369f96cb
2009-04-10 18:38:09 +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
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
147a8af559 lib/sortdeps.c: wrap long line.
--HG--
extra : convert_revision : 8484a1a0eed376e1cd4e9af9917d42dab91d5ef1
2009-04-06 14:44:35 +02:00
Juan RP
44926cd53c Performance improvements while installing deps of a binpkg.
--HG--
extra : convert_revision : 2ad3b29cfd22489f76739287176f40dd9535dfee
2009-04-04 05:24:58 +02:00
Juan RP
da1cfa2cf2 New dependency sorting code that doesn't use priorities.
This new code correctly sorts all dependencies without needing
to look at required_by or priority objects.

--HG--
extra : convert_revision : 3aa07372ae07e6938b9120d560a49efdaeac0a4e
2009-03-26 09:26:07 +01: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
ef6b5290af sortdeps.c: use a high priority for packages that don't have run_depends.
--HG--
extra : convert_revision : b7f546d5222537401854bc80bb61cfb652c442dd
2009-03-01 17:33:19 +01:00
Juan RP
3b18195a6a Change code to compile with -Wall -Wextra.
--HG--
extra : convert_revision : 992e1515458c6ee36cd481d1ba0ff8febf892d12
2009-02-18 01:07:51 +01:00
Juan RP
37725c0e97 xbps_sort_pkg_deps: there's no need to sort direct/indirect in two passes.
--HG--
extra : convert_revision : a6666b0605f34ac2440c61d09f25831dee9e67fa
2009-02-14 06:06:01 +01:00
Juan RP
5a894ad5e5 sortdeps: use a SIMPLEQ rather than a TAILQ, it's enough and faster.
--HG--
extra : convert_revision : b42935d05f31a74838140ef46293b65f9f0cb07d
2009-02-14 05:45:04 +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
f3f5192d5b Use xbps_check_is_installed_pkg(), which performs version checking too.
--HG--
extra : convert_revision : 510a9bceec5e54791be76cc28f36f0e5b6d513eb
2009-02-12 22:51:46 +01:00
Juan RP
03c899b33c xbps_sort_pkg_deps: fix a leak if all deps are satisfied.
--HG--
extra : convert_revision : 04f0a2ced6d83f57d7ea08650c1ed48ea860f6b0
2009-02-12 19:00:03 +01:00
Juan RP
28cfeea6d1 New dependency sorting algorithm made in 2 days.
This algorithm works for all packages currently usable on xbps.
Previous code didn't take into account the correct order between
indirect and direct deps.

--HG--
extra : convert_revision : c49a20ce300e6e9dfa565325b40745b5a78b78ed
2009-02-12 17:30:38 +01:00