summaryrefslogtreecommitdiff
path: root/src/apk_package.h
AgeCommit message (Collapse)AuthorFilesLines
2012-02-24pkg: add field for provides as 'p'Timo Teräs1-1/+1
ref #574
2012-02-22db, solver, io: scan cache items at startupTimo Teräs1-1/+2
It is faster to just scan the cache directory for existing packages at startup than trying to faccessat() them on demand. It also makes quite a few parts of the code more readable and simpler.
2012-02-15solver, db: repository pinning improvementsTimo Teräs1-0/+1
* solver internally calculates now using tags; not repository masks * installeddb now contains the tag name where the package came from -> we can now handle upgrades properly * the pinning is still a preference, and not strictly enforced; versioned dependencies may overrule preference
2012-01-12db: support line feed as 'world' dependency separatorTimo Teräs1-1/+1
* default writing the world with spaces if a space is found (for backwards compatibility) for now
2011-10-29solver, db: implement repository pinningTimo Teräs1-3/+5
Improves /etc/apk/repositories format so you can say: http://nl.alpinelinux.org/alpine/v2.3/main @edge http://nl.alpinelinux.org/alpine/edge/main @testing http://nl.alpinelinux.org/alpine/edge/testing After which you can pin dependencies to these tags using: apk add stableapp newapp@edge bleedingapp@testing Apk will now by default only use the untagged repositories, but adding a tag to specific dependency: 1. will prefer that tag for the name 2. allowing pulling in dependencies from that tag (though, it prefers untagged packages to satisfy deps if possible) fixes #575
2011-10-24solver, pkg: implement versioned conflictsTimo Teräs1-1/+2
One can now say in dependency "!foo<2" which means, that if foo is installed, it needs to be >=2, but it's not a required dependency.
2011-10-19pkg: convert struct apk_install_package flags to bitfieldTimo Teräs1-3/+1
2011-10-19pkg: introduce "replaces_priority"Timo Teräs1-0/+1
If two packages replace each other, the one with highes priority will keep the file. Additionally, if we have a package overriding another's file it's remembered and handled properly. This is essentially to allow "policy packages" which just overwrite certain (configuration) files from other package(s).
2011-10-18pkg, info: remember installed packages "replaces"Timo Teräs1-7/+7
"replaces" is now turned to a full dependency type list, so you can make package overwrite files only certain versions of the package (though, we should probably take this into account already at solution calculation phase). Also make 'info --replaces' print the "replaces" of the package. This is in preparation for the policy package support, which still requires "replacement priority" field to decide which packages' files get the preference.
2011-09-14solver: make state pointers completely internalTimo Teräs1-0/+1
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-13all: update copyright year statementTimo Teräs1-1/+1
2011-08-05solver: move topology sorting to solver codeTimo Teräs1-1/+4
this allows quite some optimizations to running time and memory requirements.
2011-07-26solver: new package selection logic (which is not yet used)Timo Teräs1-0/+1
* 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-04-04pkg: add origin, maintainer, build_time and commit id to indexTimo Teräs1-1/+3
Parse these fields from .PKGINFO, and write them to index.
2011-01-04pkg: recognize install_ifTimo Teräs1-1/+1
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-03pkg, db: allow index with unsupported features to be loadedTimo Teräs1-0/+2
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-01pkg: dependencies to specific package checksumTimo Teräs1-4/+1
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-01index: remove support of old index formatTimo Teräs1-1/+0
It's no longer needed or used.
2010-12-14various: use 'atoms' for certain package field and misc fixesTimo Teräs1-6/+9
- 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-14pkg, db: add preliminary support for arch fieldTimo Teräs1-1/+1
Architecture is now: - parsed from .PKGINFO - written to index and installed db - appended to repository URL when fetching files
2010-10-08io, db: id cache should be specific to database root, not system rootTimo Teräs1-2/+3
Otherwise we end up using wrong uid/gid mappings when doing install to alternate system root. Fixes #434.
2010-06-01state: improve error messages from dependency failuresTimo Teräs1-0/+2
Print more information why installation changeset calculation failed. Fixes #187.
2009-08-13db: implement triggers (fixes #45)Timo Teras1-3/+4
2009-08-12db, pkg: separate structure for fields of installed packagesTimo Teras1-25/+27
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-04db: support "replaces" directive (fixes #113)Timo Teras1-0/+1
it will allow to overwrite files owned by some other packages to get upgrades right (e.g. when splitting or renaming packages)
2009-07-31apk: use *at instead of chdir+normal file syscallTimo Teras1-1/+4
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-22signing: verify and generate identityTimo Teras1-0/+1
fixes verification of non-repository packages while installing them. this is final thing needed for full signing support (fixes #46).
2009-07-22various: more informative error messagesTimo Teras1-2/+2
2009-07-22various: misc fixesTimo Teras1-3/+5
- error codes for verification failure types - fix some fdb corruption on file migration - combine some dependency parsing code - fix versioned dependencies
2009-07-20db: signed index loading (ref #46)Timo Teras1-4/+9
prefer index in the new format as signed .tar.gz.
2009-07-17digest: use oneshot context flag where approriateTimo Teras1-1/+2
speeds up digest calculation on some cases.
2009-07-17verify: new applet (ref #46)Timo Teras1-3/+29
an utility to check package signature and integrity.
2009-07-16various: new style index generationTimo Teras1-1/+5
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-16pkg: remove support for the deprecated .INSTALL scriptTimo Teras1-1/+0
2009-07-15cache: make cache cleaning work again properlyTimo Teras1-0/+2
2009-07-14db: live with sha1 and md5Timo Teras1-2/+4
this also convers scripts file to a tar archive.
2009-06-20ver: only compare the given packages, show versionNatanael Copa1-0/+2
make apk_version_compare() take strings rather than blobs add apk_pkgversion_compare(), a wrapper that takes packages
2009-06-16add: support for forced versionsNatanael Copa1-0/+4
Support version numbers specified with packages. For example: apk add 'busybox<1.14' apk add 'squid=>3.0'
2009-04-16pkg: clean up writing of dependenciesTimo Teras1-3/+1
2009-04-16pkg: apk_deps_del helper introducedTimo Teras1-0/+2
2009-04-14state: rework changeset calculation algorithmTimo Teras1-3/+10
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-03-17pkg: write dependencies directly file instead of bufferTimo Teras1-0/+1
So we don't get artificial limits on the amount of dependencies (fixes #8).
2009-01-16add: --upgrade|-u to control if upgrading is preferred or notTimo Teras1-5/+2
2009-01-06db: restructure in-memory organizationTimo Teras1-1/+1
2008-11-28io: apk_ostream stuffTimo Teras1-1/+1
2008-11-28add: add support to install packages not in a repositoryTimo Teras1-0/+1
2008-11-28db: rework 'files' to 'installed'Timo Teras1-0/+4
Make the db of installed packages more similar to index file and reuse the code. Also rename the database file.
2008-11-27hash, db: use apk_blob_t and list_*Timo Teras1-1/+1
2008-11-07use zlib internally to decompressTimo Teras1-1/+2
2008-11-07pkg: support for new scriptsTimo Teras1-6/+8