Commit graph

39 commits

Author SHA1 Message Date
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
905a6a38ad install.c: avoid using extra pointers when you only need one.
--HG--
extra : convert_revision : 0b8bfe3403b9753be7cc3e0603aeb8f353418f93
2009-02-28 17:22:05 +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
eb2e824a33 xbps-bin: while installing binpkgs, detect properly in some cases its return value.
--HG--
extra : convert_revision : 89cb21eed183c1d9702613690fb7f48f8cceb5e2
2009-02-22 06:00:08 +01:00
Juan RP
2f287003e0 xbps_install_binary_pkg: chdir to / if destdir not set.
Fixes installation of binpkgs in the chroot.

--HG--
extra : convert_revision : fb68c94d81b1803fe77fb025929ffd727b04cbbb
2009-02-18 03:14:27 +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
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
8d5e1ab017 More cosmetics printfs for previous.
--HG--
extra : convert_revision : 6104b54261f97758aff715a1e2ccabf606cbb13e
2009-02-16 23:00:50 +01:00
Juan RP
91291d5aec Improve informative messages when installing binpkgs.
This now looks like:

$ xbps-bin -r /raid/random/xbps/test install initramfs-tools
Installing dependency xbps-base-dirs: found xbps-base-dirs-0.2 ... done.
Installing dependency glibc: found glibc-2.9 ... done.
Installing dependency e2fsprogs: found e2fsprogs-1.41.3 ... done.
Installing dependency zlib: found zlib-1.2.3 ... done.
Installing dependency gawk: found gawk-3.1.6 ... done.
Installing dependency findutils: found findutils-4.4.0 ... done.
Installing dependency sed: found sed-4.1.5 ... done.
Installing dependency grep: found grep-2.5.3 ... done.
Installing dependency gzip: found gzip-1.3.12 ... done.
Installing dependency cpio: found cpio-2.9 ... done.
...
...
Installing initramfs-tools-0.92o ... done.
Package initramfs-tools installed successfully.
$

--HG--
extra : convert_revision : 79df585206c9ddc7f1267bc89bfd431ab572e527
2009-02-16 22:48:18 +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
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
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
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
97ceef46a8 xbps_register_pkg: check for NULL pointer.
--HG--
extra : convert_revision : ccc656dc49c75e371d4de10bdcd0c07bf01090f2
2009-02-12 18:59:14 +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
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
894cb13b59 Simplify xbps_install_binary_pkg_from_repolist().
--HG--
extra : convert_revision : 9d4960502c05130a97459e41f66b4b19ec0acbc2
2009-02-05 17:38:31 +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
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
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
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
926b1dfa4a Improve binpkg priorities, dynamically allocate mem, etc.
--HG--
extra : convert_revision : 479011aba6e9da4e5662137381e04042e762d428
2008-12-27 22:19:04 +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
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
26c054d773 Checkpoint for installation of binary packages.
--HG--
extra : convert_revision : 0bc55ebae04b2e1e5ab20feca786b649fc2e0335
2008-12-23 12:28:21 +01:00