Commit graph

42 commits

Author SHA1 Message Date
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
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
4f3c798f7a Add assertions where appropiate.
--HG--
extra : convert_revision : 3c7a6f556b1dfdf110f8759375a171a571717b22
2008-12-27 01:40:13 +01:00
Juan RP
1741d889bc plist.c: fix a leak.
--HG--
extra : convert_revision : 171210c3073d197c2ae3f1f0545bc9b95a6a5484
2008-12-26 14:21:34 +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
9a0c175c18 Use the repo list to find binary packages.
--HG--
extra : convert_revision : c35e25604d0e417115cd1c30d77d23fee3c39f92
2008-12-24 12:34:04 +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
30997094d6 Fix previous.
--HG--
extra : convert_revision : c8915be223a5803f58583be20b99a31eabf69263
2008-12-23 15:27:38 +01:00
Juan RP
0c0e796fc5 Fix some leaks detected by valgrind.
--HG--
extra : convert_revision : 15f7c0f673c4f46e36de82f5e55c7bcd370093e9
2008-12-23 13:05:01 +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
546cc0ccc1 Use %ju to printf uint64_t's. Fixes building on i386.
--HG--
extra : convert_revision : c910dcedf00a095ebbe001cb78d7f8fa2ef19035
2008-12-22 15:21:29 +01:00
Juan RP
fa793a5044 Prefix humanize_number() with xbps_.
This will avoid clashes if xbps ever works on NetBSD.

--HG--
extra : convert_revision : 064b690988ba5cd75de55eacd9f37996a952da17
2008-12-22 07:51:14 +01:00
Juan RP
1282daf008 xbps_show_pkg_info: print with %zu if humanize_number() fails.
--HG--
extra : convert_revision : 1145081289336f3d76c877b68321f5f76d559a89
2008-12-22 07:29:27 +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
1105f4f278 libxbps: add humanize_number.
--HG--
extra : convert_revision : 145c77f32b58f9013a677ebac3f8ed030a1c07a9
2008-12-22 07:00:01 +01:00
Juan RP
ce5d9faac3 Add humanize_number.c from NetBSD HEAD, verbatim.
--HG--
extra : convert_revision : 021f8a0ed63b28d735682365fe34dbe666c30835
2008-12-22 06:55:54 +01:00
Juan RP
4fd0807c5f xbps_get_pkgidx_string(): don't forget nul.
--HG--
extra : convert_revision : 60f0e28fceb4b9e789612bd2f6183f85b63bd44b
2008-12-22 05:09:24 +01:00
Juan RP
3f7c353356 Fix some issues in repo handling.
--HG--
extra : convert_revision : 5ec7488c8967f50b7e2dce93276accd829c541b3
2008-12-22 05:00:15 +01:00
Juan RP
6ee35486bf To use xbps now 'make and make install' is required.
--HG--
extra : convert_revision : 976738f26daf1ccd2101ca2325e1e517d98e71cb
2008-12-22 02:14:40 +01:00
Juan RP
6fbb8e0316 xbps_search_string_in_pkgs(): remove unneeded assert.
--HG--
extra : convert_revision : 8cf98bcf0ae83958f2f31d951465333930e32f2e
2008-12-22 00:21:11 +01:00
Juan RP
bd317f17ee xbps_search_string_in_pkgs(): pass "arg" directly.
--HG--
extra : convert_revision : d1345ddf585304ec1617386b91aa827209362442
2008-12-22 00:17:20 +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