aboutsummaryrefslogtreecommitdiffstats
path: root/src/package.c
Commit message (Collapse)AuthorAgeFilesLines
* solver: implement support for choosing default virtualsWilliam Pitcock2017-11-021-0/+8
| | | | | | | | | | By introducing a new package metadata field, `provider_priority` (index letter `k`), we can specify default packages to satisfy a virtual. If a user wishes to select an alternative provider for the virtual, a changeset swapping the default provider for the selected provider will be generated by the dependency resolver.
* package: remove package script after use (fixes #7974)Timo Teräs2017-10-041-6/+9
| | | | | this is a regression introduced in commit 349c61c9 ("add support for pre and post commit hooks")
* io: make io vtables const struct, and add accessors for themTimo Teräs2017-06-231-15/+8
| | | | | This reduces function pointers in heap, and unifies how the io functions are called.
* version: add support for fuzzy version matchingWilliam Pitcock2017-05-271-4/+10
| | | | | 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.
* package: add more secure signature methodsTimo Teräs2017-02-281-20/+31
|
* add support for pre and post commit hooksHenrik Riomar2017-02-151-22/+2
| | | | | | | This allows for instance integration of etckeeper [TT: Reorganized code a bit, and modified to use single directory commit_hooks.d with argument for script of stage.]
* pkg: reset umask for package scriptsTimo Teräs2016-08-231-0/+1
| | | | | | | It is unreasonable to assume that all package writers would except to reset umask themselves. It's done currently in most packages, but we had first issue of this kind recently, so better just reset umask.
* commit: self-conflict error and satisfies printingTimo Teräs2015-12-101-6/+6
| | | | | | - 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
* for completeness free all arrays before exitTimo Teräs2015-06-121-0/+1
| | | | so valgrind does not report any leaks
* rename file info related functions for consistencyTimo Teräs2015-03-101-1/+1
|
* rework error handling for read streamsTimo Teräs2015-03-101-1/+3
|
* package: do not report duplicate reverse dependenciesTimo Teräs2014-04-101-1/+4
| | | | most notable in error report from 'del' applet
* apk: new option --no-scriptsTimo Teräs2013-09-101-2/+2
| | | | | to not run any per-package scripts. useful for managing buildroot when cross-compiling.
* solver: fix pinning+cache to workTimo Teräs2013-06-201-3/+2
| | | | | 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-23/+18
| | | | fixes #1482
* db: store repository tag names including leading @Timo Teräs2013-06-181-5/+7
|
* apk: use string array in applet mains, separate apk_name_foreach_matchingTimo Teräs2013-06-181-6/+9
|
* all: various conversions to foreach_array_item, and simplifications of codeTimo Teräs2013-06-181-32/+23
|
* db: refactor repository file constructionTimo Teräs2013-06-171-23/+0
| | | | | 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-6/+27
| | | | | | 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-22/+0
| | | | | and remove the now unused apk_dep_is_materialized_or_provided which was superceded by apk_dep_analyze.
* solver, errors: fix few additional test cases and clean upsTimo Teräs2013-06-131-8/+6
|
* pkg: add global reverse dependency iterator helpers and use themTimo Teräs2013-06-131-2/+57
| | | | ... in the error printing and the package deletion.
* errors: rewrite the logic how errors are reportedTimo Teräs2013-06-131-0/+34
| | | | | | | 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.
* index: add sensible error message if metadata is too longTimo Teräs2013-05-301-3/+6
| | | | | | | | | | | fixes #1476 Instead of: ERROR: Index generation failed: Success The following is now printed: ERROR: Metadata for package timo-1.0-r0 is too long. ERROR: Index generation failed: No buffer space available
* pkg: honor --allow-untrusted when installing non-repository packagesTimo Teräs2012-04-031-13/+21
| | | | fixes #1072
* solver, test: make conflicts unconditionalTimo Teräs2012-02-291-29/+22
| | | | | | | 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-11/+74
| | | | | | | 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/+7
| | | | ref #574
* pkg, db: use 's' for source repository tags instead of 'p'Timo Teräs2012-02-241-1/+1
| | | | Will use 'p' for provides.
* pkg: fix writing of versioned conflictsTimo Teräs2012-02-231-1/+1
|
* solver: implement backwards jumping and various other optimizationsTimo Teräs2012-02-211-2/+11
|
* solver, db: repository pinning improvementsTimo Teräs2012-02-151-1/+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: record file uid/gid/mode in installed dbTimo Teräs2012-02-141-0/+1
|
* blob: optimize spn and cspnTimo Teräs2012-02-081-4/+13
|
* pkg, db: fix signature checking for files without control partTimo Teräs2012-01-311-7/+24
| | | | Also clean up handling of signature failures for index files.
* db: support line feed as 'world' dependency separatorTimo Teräs2012-01-121-49/+39
| | | | | * default writing the world with spaces if a space is found (for backwards compatibility) for now
* pkg: fix writing of deps with tag and version specifierTimo Teräs2012-01-061-4/+4
| | | | It is really name(@tag)(>=version).
* solver: report number of (mega)bytes usedTimo Teräs2011-12-271-2/+5
|
* solver, db: implement repository pinningTimo Teräs2011-10-291-9/+16
| | | | | | | | | | | | | | | | | | 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-10/+14
| | | | | 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: introduce "replaces_priority"Timo Teräs2011-10-191-1/+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-25/+50
| | | | | | | | | | | | | "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.
* pkg: fix dependency checking against non-installed packagesTimo Teräs2011-09-271-0/+5
| | | | the solver requires this.
* all: update copyright year statementTimo Teräs2011-09-131-1/+1
|
* pkg: consider script failure as non-fatalTimo Teräs2011-09-091-2/+6
| | | | | Make a loud warning if the script returns failure, but do not abort installation sequence because of that.
* applets: start using solver codeTimo Teräs2011-09-091-1/+0
| | | | | | | | | still todo: - 'fix' is missing - 'del -R' does not work - 'upgrade' does not do self-upgrade first ... and a lot of testing.
* index: handle errors instead of silently failingTimo Teräs2011-06-281-4/+14
| | | | | | Make indexer keep noise about errors that prevent index generation. Detect certain errors in the APKs better. And also have the applet return error in these scenarios.
* pkg: add origin, maintainer, build_time and commit id to indexTimo Teräs2011-04-041-0/+34
| | | | Parse these fields from .PKGINFO, and write them to index.
* pkg: recognize install_ifTimo Teräs2011-01-041-21/+38
| | | | | | | | 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.