Commit graph

19 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
be170f0cb7 Fix some problems with dangling links while removing a binpkg.
First remove all links, next files and last dirs.
Only check the SHA256 hash for files, skip links and dirs.

--HG--
extra : convert_revision : b1762d5e795959591c732f625d25adfd1840f592
2009-02-28 17:32:38 +01:00
Juan RP
750f467fe6 Take into account $conf_files and $keep_dirs when removing a pkg.
* If a dir is listed in $keep_dirs it won't be removed (anyway any
  directory that is not empty won't either).
* If a config file hasn't been modified (SHA256 hash matches) the
  file will be removed, otherwise it won't be removed.

There's still missing support to handle new configuration files when
there's an existing file, but will do later.

--HG--
extra : convert_revision : 448af95876fc7a47da07a9a910d6111047f72271
2009-02-27 17:41:31 +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
a00ae944b5 Rename prepost-{inst,rm} to just INSTALL/REMOVE.
Some other changes related for this:
 - Modify binpkg.sh to always insert the INSTALL script at head of
   the archive, and appending files after it.
 - Modify binpkg.sh to compress binpkgs with bzip2 -9 to save some bytes.

--HG--
extra : convert_revision : b651b944f11c48dede1bbcea658182bf0984e8f3
2009-02-26 18:01:18 +01:00
Juan RP
46a42f7500 unpack.c: add missing \n in error msg.
--HG--
extra : convert_revision : ba47dd04be5b7a8d4d5a1e97b28573e67f89a79e
2009-02-26 14:37:01 +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
8fa094ff02 unpack: check rv and also errno, not rv twice!
--HG--
extra : convert_revision : f30a7c3135c05f55e6b6d6acd50f17d79e623c85
2009-02-18 03:15:37 +01:00
Juan RP
297d7c6941 unpack: some printf related changes.
--HG--
extra : convert_revision : 6feb3492c0d59e80fa02fef527f2b9c8821cc56c
2009-02-17 19:41:21 +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
524551eee8 unpack: ignore entry if already exists.
--HG--
extra : convert_revision : 7f570822db932d4ae45896e2981a9d8ff41824da
2009-02-16 22:18:40 +01:00
Juan RP
ee73775ed5 unpack: don't overwrite files by default.
--HG--
extra : convert_revision : 874850b5d5adbb570c93e963c6c0a4504cbd8c80
2009-02-16 21:42: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
1eb9ea591a Fix binpkg dependency installation with new code.
--HG--
extra : convert_revision : fc6c3fd108caf4cedec0edd3b813edbdfb6bd8be
2009-02-09 16:39:55 +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