Commit graph

30 commits

Author SHA1 Message Date
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
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
6b6162bb44 Added support for using noarch packages.
--HG--
extra : convert_revision : a96166ddecb6efe65d35283f25e06a944cc4a038
2009-02-16 00:39:41 +01:00
Juan RP
746d59a9dd Some improvements for installation of binary packages.
* If any dep of a package cannot be found in the repository pool,
  show it on xbps-bin.

* Add the automatic-install boolean obj into pkg's dictionary
  on regpkgdb.plist, this will be used to implemented something
  like "apt-get autoremove".

--HG--
extra : convert_revision : 666e2fa666ac94140159896e28b445e88e8afb7a
2009-02-15 20:23:23 +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
774d14ac93 xbps_install_pkg_deps: fix a leak if installing a required dep fails.
--HG--
extra : convert_revision : e29096f8929dfcf41f6a0c75f758f9d8f4b67596
2009-02-12 21:17:35 +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
Juan RP
939a63036e Added support to keep track of reverse depends on installed packages.
--HG--
extra : convert_revision : 9e3e46f726ef28843dc52b95ce818637c2a18de5
2009-02-10 02:52:12 +01:00
Juan RP
1eb9ea591a Fix binpkg dependency installation with new code.
--HG--
extra : convert_revision : fc6c3fd108caf4cedec0edd3b813edbdfb6bd8be
2009-02-09 16:39:55 +01:00
Juan RP
126928ca8d Merge branch 'master' of ssh://xtraeme@repo.or.cz/srv/git/xbps
Conflicts:
	lib/depends.c

--HG--
extra : convert_revision : 568341c7637aa537838880da03bd4dda819902ea
2009-02-09 16:09:39 +01:00
Juan RP
c0c746b67d Fix some trailing whitespace and indentation bits.
--HG--
extra : convert_revision : f1dd75ffa567945c74ded99e2ea9355eed56df97
2009-02-07 13:33:20 +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
d58debb35c find_deps_in_pkg: no need to call xbps_pkg_has_rundeps() in the loop.
--HG--
extra : convert_revision : d9a1f3cc1e598a3d00cd7f26cc862bd7945523ee
2009-02-06 00:47:31 +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
b1c26d1dba depends: remove a cosmetic printf.
--HG--
extra : convert_revision : f15309b3e59c4c8d85f8b013b9c50a737bd78eba
2009-02-04 03:39:45 +01:00
Juan RP
aafefa6c23 Simplify xbps_add_pkg_dependency().
--HG--
extra : convert_revision : d4702da2278e65eabf998f2cbe7b3cd10eb34852
2009-01-03 14:59:55 +01:00
Juan RP
5d3e701b3a Simplify xbps_get_dependency().
--HG--
extra : convert_revision : 2174be8c7c6386f403a3d2d96c8443629fa6db21
2008-12-29 07:01:01 +01:00
Juan RP
b445b83fd3 Implement a stupid sorting dependency algorithm.
Dependencies are sorted with highest to lowest priority by the
following rules:

	- package has highest required count and priority.
	- package has highest priority.
	- package has highest reqcount.
	- everything else.

--HG--
extra : convert_revision : e661b90c38f6b6ca4d9559c0f88d1e4ea9df6c1e
2008-12-29 06:46:08 +01:00
Juan RP
a00a9a52b2 Use fdatasync() once the package has been unpacked.
At least there will be more chances that important data has been
written to disk.

--HG--
extra : convert_revision : 251af5da3f587cad976a9f5b903e5c3bdf5a229a
2008-12-28 09:48:18 +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
86cdb7dae6 Install packages in order from highest to lowest priority.
--HG--
extra : convert_revision : 33be12f1d249bfd8f76d4f1cb8374dfc3f71df21
2008-12-27 17:26:47 +01:00
Juan RP
456c6a2763 depends: fix a leak while destroying the simple queue.
--HG--
extra : convert_revision : aabc102f55fd81bce8b007d209596d40576eb8a5
2008-12-27 16:37:43 +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
ccd4556853 depends: use a simple queue rather than a doubly linked list.
--HG--
extra : convert_revision : efd410c0f507b2d45fea9e38af34e89465c912c4
2008-12-27 02:14:09 +01:00
Juan RP
d309f54ff1 Register binary package if unpacking was successful.
--HG--
extra : convert_revision : ac984d640acb340e3a8db2ac07e41d15b1eea89e
2008-12-26 10:13:03 +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
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
Juan RP
26c054d773 Checkpoint for installation of binary packages.
--HG--
extra : convert_revision : 0bc55ebae04b2e1e5ab20feca786b649fc2e0335
2008-12-23 12:28:21 +01:00