Commit Graph

43 Commits (afd854a3e2cf20b3f35c5503c9df9589f482dc74)

Author SHA1 Message Date
Timo Teräs 803f55ece5 solver: make state pointers completely internal
the only bit of information needed in solver commit is the "hard"
topology sorting information for trigger ordering. fixes a bug in
"apk del" which uses the state pointers to do intermediate
calculations between solution solving and commit.
2011-09-14 16:48:28 +03:00
Timo Teräs 1817b0a3c3 all: update copyright year statement 2011-09-13 11:53:01 +03:00
Timo Teräs 48d368e7d5 solver: move topology sorting to solver code
this allows quite some optimizations to running time and memory
requirements.
2011-08-05 14:34:58 +03:00
Timo Teräs 79b53d4d76 solver: new package selection logic (which is not yet used)
* basic code for a backtracking, forward checking dependency satisfier
 * works better when there are tricky dependencies to solve
   (when can't just upgrade everything to most preferred versions)
 * the new code always evaluates all of 'world' constraints
   (old code just does incremental updates based on heuristics)
 * is probably somewhat slower than old code (probably unnoticeable
   difference in most cases)
 * makes easier to write support for provides and repository pinning
 * test applet and a bunch of test cases added which uses the new code
 * from the old feature set install_if is not yet implemented
2011-07-26 17:08:43 +03:00
Timo Teräs 5a9d8323a0 pkg: add origin, maintainer, build_time and commit id to index
Parse these fields from .PKGINFO, and write them to index.
2011-04-04 14:05:52 +03:00
Timo Teräs 28dcd5d3b3 pkg: recognize install_if
Parse install_if from package metadata and include it in the
indexes. Also setup the reverse install_if dependencies when
loading a database. ref #443.

Actual install_if functionality is not yet implemented.
2011-01-04 10:05:20 +02:00
Timo Teräs d8ba07e484 pkg, db: allow index with unsupported features to be loaded
Just disable installation of packages using the new stuff. Also
flag lower case package info fields as non-critical and allow
installation even if that features is not supported.
2011-01-03 21:06:41 +02:00
Timo Teräs 1c7e8d2617 pkg: dependencies to specific package checksum
When package is installed from commandline, we should always
install that specific instance of package (never favor repository
version if it has difference identity). Otherwise we might not
always end-up installing the .apk given on command line. The
dependency is now against specific checksum identity (marked
with >< dependency comparison). Fixes #492.
2011-01-01 16:58:58 +02:00
Timo Teräs 0cc41ba4dc index: remove support of old index format
It's no longer needed or used.
2011-01-01 12:17:06 +02:00
Timo Teräs 972bec3210 various: use 'atoms' for certain package field and misc fixes
- implement a hash table for commonly shared fields such as
   license, version and architecture
 - use macroes to print blobs or pkgname-pkgver strings
 - fix some old cruft
2010-12-14 19:51:16 +02:00
Timo Teräs fca1c30b80 pkg, db: add preliminary support for arch field
Architecture is now:
 - parsed from .PKGINFO
 - written to index and installed db
 - appended to repository URL when fetching files
2010-12-14 17:06:29 +02:00
Timo Teräs 19419f1a88 io, db: id cache should be specific to database root, not system root
Otherwise we end up using wrong uid/gid mappings when doing install
to alternate system root. Fixes #434.
2010-10-08 15:36:54 +03:00
Timo Teräs 038b672061 state: improve error messages from dependency failures
Print more information why installation changeset calculation failed.
Fixes #187.
2010-06-01 11:49:32 +03:00
Timo Teras 279513bfbe db: implement triggers (fixes #45) 2009-08-13 14:10:30 +03:00
Timo Teras 36b5cee98b db, pkg: separate structure for fields of installed packages
this makes the database package entry smaller, and we propbably
get more fields to installed_package later too. this cleans up
the way scripts are stored and is a preparation for supporting
triggers. some parsing for trigger meta-data. ref #45.
2009-08-12 19:17:46 +03:00
Timo Teras a602c49b31 db: support "replaces" directive (fixes #113)
it will allow to overwrite files owned by some other packages
to get upgrades right (e.g. when splitting or renaming packages)
2009-08-04 16:54:15 +03:00
Timo Teras ea90152664 apk: use *at instead of chdir+normal file syscall
this way we never change cwd, and relative filenames are always
parsed consistently. this also helps filename construction in many
places. this patch also changes '--root' to override location of
all configuration to be in the new root. previously it depended
on the file which one was used.
2009-07-31 16:08:09 +03:00
Timo Teras 79f43861e6 signing: verify and generate identity
fixes verification of non-repository packages while installing
them. this is final thing needed for full signing support
(fixes #46).
2009-07-22 21:04:54 +03:00
Timo Teras 93f0b3524c various: more informative error messages 2009-07-22 14:56:27 +03:00
Timo Teras 0a7991f70d various: misc fixes
- error codes for verification failure types
- fix some fdb corruption on file migration
- combine some dependency parsing code
- fix versioned dependencies
2009-07-22 14:24:19 +03:00
Timo Teras eca9c22205 db: signed index loading (ref #46)
prefer index in the new format as signed .tar.gz.
2009-07-20 11:13:03 +03:00
Timo Teras e30834fdcb digest: use oneshot context flag where approriate
speeds up digest calculation on some cases.
2009-07-17 15:56:09 +03:00
Timo Teras 3f4f9e9957 verify: new applet (ref #46)
an utility to check package signature and integrity.
2009-07-17 13:07:52 +03:00
Timo Teras 6b471bb614 various: new style index generation
change the index generation to do old index, or the new style index
where package identity is sha1 of control block and it's contained
within an .tar.gz to allow signing in future.
2009-07-16 15:16:05 +03:00
Timo Teras 6715a0ba12 pkg: remove support for the deprecated .INSTALL script 2009-07-16 08:52:22 +03:00
Timo Teras ba76c5f48a cache: make cache cleaning work again properly 2009-07-15 15:59:06 +03:00
Timo Teras 981bc118f8 db: live with sha1 and md5
this also convers scripts file to a tar archive.
2009-07-14 19:14:05 +03:00
Natanael Copa 4bbed2d648 ver: only compare the given packages, show version
make apk_version_compare() take strings rather than blobs
add apk_pkgversion_compare(), a wrapper that takes packages
2009-06-20 12:38:07 +02:00
Natanael Copa 20a1217e86 add: support for forced versions
Support version numbers specified with packages. For example:

 apk add 'busybox<1.14'
 apk add 'squid=>3.0'
2009-06-16 09:59:21 +00:00
Timo Teras ec5b63c5e4 pkg: clean up writing of dependencies 2009-04-16 17:05:27 +03:00
Timo Teras 968dfbb8b3 pkg: apk_deps_del helper introduced 2009-04-16 16:32:04 +03:00
Timo Teras a23f6f4afb state: rework changeset calculation algorithm
Calculate changesets directly by stabilizating the package graph instead of
recalculating the whole graph and then diffing (similar approach as seen
in 'smart' package manager). The algorithm is not complete: defferred
search space forking is missing. So you don't always get a solution on
complex graphs.

Benefits:
- usually the search state tree is smaller (less memory used)
- speed relational to changeset size, not database size (usually faster)
- touch only packages related to users request (can work on partitially
  broken state; upgrades only necessary packages, fixes #7)

Also implemented:
- command prompt to confirm operation if packages are deleted or downgraded
- requesting deletion of package suggests removal of all packages depending
  on the package being removed (you'll get list of packages that also get
  removed if you want package X removed)
- option --simulate to see what would have been done (mainly for testing)
- an untested implementation of versioned dependencies and conflicts

A lot has changed, so expect new bugs too.
2009-04-14 18:48:02 +03:00
Timo Teras 7735cc644d pkg: write dependencies directly file instead of buffer
So we don't get artificial limits on the amount of dependencies
(fixes #8).
2009-03-17 13:19:06 +02:00
Timo Teras 3e6fc1389f add: --upgrade|-u to control if upgrading is preferred or not 2009-01-16 13:59:36 +02:00
Timo Teras 6b2b9d303e db: restructure in-memory organization 2009-01-06 21:23:26 +02:00
Timo Teras dc2ffc30e8 io: apk_ostream stuff 2008-11-28 16:28:54 +02:00
Timo Teras 5ea81ca564 add: add support to install packages not in a repository 2008-11-28 13:34:40 +02:00
Timo Teras 545a915faf db: rework 'files' to 'installed'
Make the db of installed packages more similar to index file and
reuse the code. Also rename the database file.
2008-11-28 13:15:06 +02:00
Timo Teras f0609951b9 hash, db: use apk_blob_t and list_* 2008-11-27 20:25:01 +02:00
Timo Teras aef0f036f0 use zlib internally to decompress 2008-11-07 17:11:08 +02:00
Timo Teras 36f73847ee pkg: support for new scripts 2008-11-07 13:05:55 +02:00
Timo Teras 219a1b2ee8 Overwriting of bb files, apk_create (from old apk-tools), chdir changes,
other stuff.
2008-04-22 08:16:26 +00:00
Timo Teras d6c7435242 Initial commit of some stuff written so far. Still in state of flux. Expect
breakage and major changes.
2008-04-17 14:09:13 +00:00