aboutsummaryrefslogtreecommitdiffstats
path: root/src/apk_package.h
Commit message (Collapse)AuthorAgeFilesLines
* version: add support for fuzzy version matchingWilliam Pitcock2017-05-271-1/+2
| | | | | This is useful for requirements such as: python3=~3.6, which would match python3-3.6.[0-9]. This implementation should in theory be backwards compatible with the implementation in Adelie.
* commit: self-conflict error and satisfies printingTimo Teräs2015-12-101-0/+1
| | | | | | - self-conflicts when the exact same version of a name is provided twice is now properly detected and diagnozed - don't print redundant satisfies diagnostic
* make file install errors non-fatal, and xattr errors hiddenTimo Teräs2015-04-171-0/+1
| | | | | | | | | user xattrs on tmpfs are not supported no non-grsec kernels, and many times root fs is mounted without user_xattr. Thus to allow things to go smoothly on non-grsec kernels xattr unsupported errors are now hidden. xattrs can be fixed still now with "apk fix --xattrs"
* solver: fix installation of non-repository packages during tmpfs bootTimo Teräs2014-05-191-1/+2
| | | | | allow packages in the cache's installed to be selected for installation by the solver. add test case for the issue.
* various: applet help text and comment fixesDubiousjim2013-06-281-1/+1
| | | | Acked-by: Natanael Copa <ncopa@alpinelinux.org>
* solver: fix pinning+cache to workTimo Teräs2013-06-201-2/+1
| | | | | Mistakenly allowed masked out package to be installed if it was in cache.
* commit, db: make file conflicts and script errors non-fatalTimo Teräs2013-06-201-6/+8
| | | | fixes #1482
* all: few behavioural regression fixesTimo Teräs2013-06-191-0/+1
| | | | | | | | | Wildcard matching with no names should match all packages only for info and search applet. "apk del" would otherwise try to delete everything, etc. Fix also interactive mode to ask questions only if we are actually changing something.
* all: various conversions to foreach_array_item, and simplifications of codeTimo Teräs2013-06-181-4/+2
|
* fetch: implement progress (fixes #1170)Timo Teräs2013-06-171-1/+1
|
* db: refactor repository file constructionTimo Teräs2013-06-171-2/+2
| | | | | Fixes also 'fetch' applet to prefer copying/linking to files from cache if possible.
* pkg: apk_pkg_foreach_* add matching generationTimo Teräs2013-06-151-8/+12
| | | | | | So same package it is possible to not match same package multiple times. Use generation count, so this is handled cleanly during recursion, like in the use case of search applet.
* lua: use apk_dep_analyzeTimo Teräs2013-06-151-1/+0
| | | | | and remove the now unused apk_dep_is_materialized_or_provided which was superceded by apk_dep_analyze.
* pkg: add global reverse dependency iterator helpers and use themTimo Teräs2013-06-131-5/+21
| | | | ... in the error printing and the package deletion.
* errors: rewrite the logic how errors are reportedTimo Teräs2013-06-131-0/+6
| | | | | | | Instead of the dependency oriented logic, switch to print them for each package or name needed. Might give a bit more readable errors now. There's still few corner cases that proper error is not output, which are cought by the test cases.
* solver: prune broken world dependencies with --forceTimo Teräs2013-06-131-0/+1
| | | | mostly useful for reboot, when all packages are not available.
* solver: rewrite as deductive solver -- core featuresTimo Teräs2013-06-131-2/+2
| | | | | Implementing basic dependency handling, install_if and awareness of pinning.
* db: unify handling of special packagesTimo Teräs2013-05-301-1/+0
| | | | | | make cache a special kind of repository, and automatically cache special packages (virtual packages, or ones installed from command line). add test cases for handling virtual packages. fixes #1617.
* solver: optimize backjumpingTimo Teräs2012-10-081-1/+2
| | | | to be functional when backtracking
* solver, test: make conflicts unconditionalTimo Teräs2012-02-291-1/+1
| | | | | | | Solver will now never report partial solution where a conflict constraint is not satisfied. The is because with --force we might install the partial solution; and if conflicted packages were to be installed we might have extra trouble.
* all: introduce apk_provides and use it in apk_nameTimo Teräs2012-02-241-1/+9
| | | | | | | in preparation for provides support. implements also some dependency satisfaction helper routines. ref #574.
* pkg: add field for provides as 'p'Timo Teräs2012-02-241-1/+1
| | | | ref #574
* db, solver, io: scan cache items at startupTimo Teräs2012-02-221-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.
* solver, db: repository pinning improvementsTimo Teräs2012-02-151-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
* db: support line feed as 'world' dependency separatorTimo Teräs2012-01-121-1/+1
| | | | | * default writing the world with spaces if a space is found (for backwards compatibility) for now
* solver, db: implement repository pinningTimo Teräs2011-10-291-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
* solver, pkg: implement versioned conflictsTimo Teräs2011-10-241-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.
* pkg: convert struct apk_install_package flags to bitfieldTimo Teräs2011-10-191-3/+1
|
* pkg: introduce "replaces_priority"Timo Teräs2011-10-191-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).
* pkg, info: remember installed packages "replaces"Timo Teräs2011-10-181-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.
* solver: make state pointers completely internalTimo Teräs2011-09-141-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.
* all: update copyright year statementTimo Teräs2011-09-131-1/+1
|
* solver: move topology sorting to solver codeTimo Teräs2011-08-051-1/+4
| | | | | this allows quite some optimizations to running time and memory requirements.
* solver: new package selection logic (which is not yet used)Timo Teräs2011-07-261-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
* pkg: add origin, maintainer, build_time and commit id to indexTimo Teräs2011-04-041-1/+3
| | | | Parse these fields from .PKGINFO, and write them to index.
* pkg: recognize install_ifTimo Teräs2011-01-041-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.
* pkg, db: allow index with unsupported features to be loadedTimo Teräs2011-01-031-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.
* pkg: dependencies to specific package checksumTimo Teräs2011-01-011-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.
* index: remove support of old index formatTimo Teräs2011-01-011-1/+0
| | | | It's no longer needed or used.
* various: use 'atoms' for certain package field and misc fixesTimo Teräs2010-12-141-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
* pkg, db: add preliminary support for arch fieldTimo Teräs2010-12-141-1/+1
| | | | | | | Architecture is now: - parsed from .PKGINFO - written to index and installed db - appended to repository URL when fetching files
* io, db: id cache should be specific to database root, not system rootTimo Teräs2010-10-081-2/+3
| | | | | Otherwise we end up using wrong uid/gid mappings when doing install to alternate system root. Fixes #434.
* state: improve error messages from dependency failuresTimo Teräs2010-06-011-0/+2
| | | | | Print more information why installation changeset calculation failed. Fixes #187.
* db: implement triggers (fixes #45)Timo Teras2009-08-131-3/+4
|
* db, pkg: separate structure for fields of installed packagesTimo Teras2009-08-121-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.
* db: support "replaces" directive (fixes #113)Timo Teras2009-08-041-0/+1
| | | | | it will allow to overwrite files owned by some other packages to get upgrades right (e.g. when splitting or renaming packages)
* apk: use *at instead of chdir+normal file syscallTimo Teras2009-07-311-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.
* signing: verify and generate identityTimo Teras2009-07-221-0/+1
| | | | | | fixes verification of non-repository packages while installing them. this is final thing needed for full signing support (fixes #46).
* various: more informative error messagesTimo Teras2009-07-221-2/+2
|
* various: misc fixesTimo Teras2009-07-221-3/+5
| | | | | | | - error codes for verification failure types - fix some fdb corruption on file migration - combine some dependency parsing code - fix versioned dependencies