Juan RP
3084354cec
Fix previous.
...
--HG--
extra : convert_revision : a8073bfa4782f6c6a3e2afe760b184598f268807
2009-02-14 03:57:29 +01:00
Juan RP
b55346ae64
Show an informative error if binpkg cannot be found in repos.
...
--HG--
extra : convert_revision : 0c1e639cb598b19d258c1e1413dd1cb5930c4c61
2009-02-14 03:25:55 +01:00
Juan RP
afa0eeae72
plist.c: bah, forgot to update copyright's year.
...
--HG--
extra : convert_revision : 0ff12fa85651c077528e2ad147b845e63dd6ef76
2009-02-14 02:26:57 +01:00
Juan RP
83ed100fcf
Use xbps_callback_array_iter_in_repolist() and removed dup code.
...
--HG--
extra : convert_revision : 7eb9c1b3df3fc7fde2ff61ac0cce1d635c3fef18
2009-02-14 02:26:11 +01:00
Juan RP
90fd3828e6
repository.c: update copyright's year.
...
--HG--
extra : convert_revision : 61a62966cd090b32a63254341b10e5f33ee85c4f
2009-02-14 01:58:26 +01:00
Juan RP
cfd928d563
Fix xbps_unregister_repository() func cb.
...
While here, change a var type to ssize_t... int64_t is overkill.
--HG--
extra : convert_revision : d5128f9d0c7da549fa2894d42b4a012c68478473
2009-02-14 01:50:18 +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
d420d00081
xbps_unregister_repository: return ENOENT if not found, not ENODEV.
...
--HG--
extra : convert_revision : c1be34bc1840ac351e8e2d301e2c71d247f0ea9c
2009-02-13 00:18:28 +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
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
97ceef46a8
xbps_register_pkg: check for NULL pointer.
...
--HG--
extra : convert_revision : ccc656dc49c75e371d4de10bdcd0c07bf01090f2
2009-02-12 18:59:14 +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
3b419a365e
xbps_update_pkg_requiredby: fix a double free.
...
--HG--
extra : convert_revision : f821d215c3b97ca253ab1c170262d6bd9ae4f3fc
2009-02-10 12:04:10 +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
bb6355fe12
Allow installing/removing binpkgs as non-root.
...
--HG--
extra : convert_revision : 3781ef0a422530623cf64f45f87948e00d7e50e8
2009-02-07 18:05:40 +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
894cb13b59
Simplify xbps_install_binary_pkg_from_repolist().
...
--HG--
extra : convert_revision : 9d4960502c05130a97459e41f66b4b19ec0acbc2
2009-02-05 17:38: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
7740958643
Split repo commands into the new xbps-repo bin.
...
- Remove lib/info.c that doesn't belong in the lib and add it into the
bins.
- Every binary now uses its own directory on bin/.
This is in preparation for future changes for correct behaviour of
the library and binaries.
--HG--
extra : convert_revision : 880d16378bf940c4f5478de0362afe883cd5fd2c
2009-02-05 14:46:09 +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
7e677c32d9
remove: also remove package metadata stuff.
...
--HG--
extra : convert_revision : 0a286d1fb33b81a90b0bfb5b41f25c1874d72093
2009-02-03 22:37:20 +01:00
Juan RP
6c252d43d4
Split installation/removal parts in prepost-action scripts.
...
There are two scripts that can be used now:
- prepost-inst: for pre/post actions at installation.
- prepost-rm: for pre/post actions at removal.
--HG--
extra : convert_revision : 5e054758f549f5c81693b825795fbb36e2d5513a
2009-02-03 17:32:51 +01:00
Juan RP
388dd30b45
check_installed_pkgname: returns a bool, so EINVAL is wrong.
...
--HG--
extra : convert_revision : 6f3d615a27a1bf76962b6daf88929efa8d5cde8e
2009-02-03 17:02:19 +01:00
Juan RP
fe8ea8c21c
Check that pkg is installed before removing.
...
--HG--
extra : convert_revision : 4ea85e367ecbc0d39dcba1c8ee63392f0e1177f7
2009-02-03 16:51:42 +01:00
Juan RP
edfeec4622
Added support to run pre/post remove actions with binpkgs.
...
--HG--
extra : convert_revision : ecc70358e9009a0b2f71aaccc5b8b1282417e3bf
2009-02-03 16:07:08 +01:00
Juan RP
4a9125364a
xbps-bin: added WIP remove target.
...
--HG--
extra : convert_revision : 71314f7183384094223cf10bf16ff704ca084883
2009-02-03 03:18:00 +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
a2d218eb4c
xbps_unpack_archive_cb: fix a comment.
...
--HG--
extra : convert_revision : 48bda135d47987c22ce71b46d999d48ef83a7f99
2009-01-02 17:22:43 +01:00
Juan RP
f0f479a3c1
Pass more arguments to the prepost-action command.
...
--HG--
extra : convert_revision : f39f2926d0b3d9155e409a6193662c55c263167c
2008-12-29 15:57:37 +01:00
Juan RP
78b036f346
Add the prepost-action script into the binary package if exists.
...
--HG--
extra : convert_revision : 3d1db89a9347d423550984e7ff5c941d0d7b6cbe
2008-12-29 09:26:49 +01:00
Juan RP
5d3e701b3a
Simplify xbps_get_dependency().
...
--HG--
extra : convert_revision : 2174be8c7c6386f403a3d2d96c8443629fa6db21
2008-12-29 07:01:01 +01:00
Juan RP
e6590dd285
Rename binpkg's metadata script to prepost-action.
...
Because in theory any shell script or executable program might run,
and therefore the .sh extension is wrong.
--HG--
extra : convert_revision : 2f52520ccb04cdf1c414ee0ac6128e54d82c1d36
2008-12-29 06:50:59 +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
43543bbaa1
Split info related funcs from plist.c into its own file.
...
--HG--
extra : convert_revision : 70ec29b722ff5a702f64b525812bb2cbdad56a44
2008-12-28 11:22:58 +01:00
Juan RP
27de1e8a0c
xbps_unpack_archive_cb: alloc buf from heap memory instead.
...
--HG--
extra : convert_revision : dfbcbfeab3e57b571388447565ca0156816e7a84
2008-12-28 11:13:17 +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
4148b5e4b6
Added support for pre/post installation script with binary packages.
...
For now all is handled in a script "prepost-action.sh" in package's
metadata directory, with a target in the shell script.
--HG--
extra : convert_revision : 93ed92d9fbb12939c751354cff464cc097379520
2008-12-28 08:44:01 +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
3aabbc6c8b
Split repository functions from plist.c into its own file.
...
--HG--
extra : convert_revision : 581706f025dd210fc95d6e7c2f535ace786ea78f
2008-12-27 23:03:17 +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
11f0a2d4a6
xbps_get_pkg_name(): remove wrong comment.
...
--HG--
extra : convert_revision : 5a51c7fc6559347195e86d051aae72caafaf489d
2008-12-27 14:54:11 +01:00
Juan RP
bd6d7b5502
plist: remove dup assertion.
...
--HG--
extra : convert_revision : 5c31c8841ce9e5d0c44e85bd1ac218efea59c8ce
2008-12-27 14:53:50 +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