Mega-commit with improvements and changes done in the past days.

- Introduce package states: unpacked, broken, installed, etc.
  Not yet finished, only unpacked and installed are used for now.

- Move package metadata files in binary packages directly to
  the top directory, this speeds up some ops and makes easier to
  continue working in future changes.

- xbps-bin: -C flag to check the hash of package files has been
  superseded by the 'check' target, which verifies the integrity
  of an installed package.

- Use the 'essential' object when upgrading packages, overwritting
  current files. This is needed for critical packages like sh, libc
  and others.

- Miscellaneous tweaks and improvements thorough the code.

--HG--
extra : convert_revision : 2073fcc123efc24b3e9327b5e22aa91752f20df6
This commit is contained in:
Juan RP 2009-08-08 22:29:48 +02:00
parent 75cac4a637
commit 17404bdb42
24 changed files with 1216 additions and 529 deletions

View file

@ -5,22 +5,27 @@
A binary package built with xbps is a normal tar(1) archive, compressed
with bzip2 and has the following structure:
/
/usr ------|
/var ------| => Package structure that will be installed.
/etc ------|
Package metadata
-----------------
/INSTALL
/REMOVE
/files.plist
/props.plist
Package data
-----------------
/usr
/var
/etc
...
/var/db/xbps/metadata/$pkgname
/var/db/xbps/metadata/$pkgname/files.plist
/var/db/xbps/metadata/$pkgname/props.plist
/var/db/xbps/metadata/$pkgname/INSTALL
/var/db/xbps/metadata/$pkgname/REMOVE
Metadata info is stored in the "/var/db/xbps/metadata/$pkgname"
directory and two files will be always be present: flist and props.plist.
directory and two files will be always be present: files.plist
and props.plist.
The files.plist file contains the list of files/links/dirs that package
will install, as well as SHA256 hashes for files.
The props.plist file contains package metadata properties and has the
following structure:

View file

@ -29,13 +29,9 @@ xbps-bin:
* Implement shell style match patterns with fnmatch().
* Make -f flag to overwrite files when installing, and to ignore
files with wrong checksum or unexistent when removing.
* Add a target to check pkg integrity: normal files, metadata
and its dependencies.
libxbps:
* Fix glibc updates: removing libc is bad.
* Create xbps_upgrade_pkg() to replace or remove/unpack and register.
Remove duplicate code from xbps-bin/install.c. [IN PROGRESS]
* Add support to upgrade packages but overwritting current files;
this will fix libc, sh and others. An "essential" boolean obj
seems to be a good way to find such packages, like dpkg. [IN PROGRESS]