summaryrefslogtreecommitdiff
path: root/src/package.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-10apk: new option --no-scriptsTimo Teräs1-2/+2
to not run any per-package scripts. useful for managing buildroot when cross-compiling.
2013-06-20solver: fix pinning+cache to workTimo Teräs1-3/+2
Mistakenly allowed masked out package to be installed if it was in cache.
2013-06-20commit, db: make file conflicts and script errors non-fatalTimo Teräs1-23/+18
fixes #1482
2013-06-18db: store repository tag names including leading @Timo Teräs1-5/+7
2013-06-18apk: use string array in applet mains, separate apk_name_foreach_matchingTimo Teräs1-6/+9
2013-06-18all: various conversions to foreach_array_item, and simplifications of codeTimo Teräs1-32/+23
2013-06-17db: refactor repository file constructionTimo Teräs1-23/+0
Fixes also 'fetch' applet to prefer copying/linking to files from cache if possible.
2013-06-15pkg: apk_pkg_foreach_* add matching generationTimo Teräs1-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.
2013-06-15lua: use apk_dep_analyzeTimo Teräs1-22/+0
and remove the now unused apk_dep_is_materialized_or_provided which was superceded by apk_dep_analyze.
2013-06-13solver, errors: fix few additional test cases and clean upsTimo Teräs1-8/+6
2013-06-13pkg: add global reverse dependency iterator helpers and use themTimo Teräs1-2/+57
... in the error printing and the package deletion.
2013-06-13errors: rewrite the logic how errors are reportedTimo Teräs1-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.
2013-05-30index: add sensible error message if metadata is too longTimo Teräs1-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
2012-04-03pkg: honor --allow-untrusted when installing non-repository packagesTimo Teräs1-13/+21
fixes #1072
2012-02-29solver, test: make conflicts unconditionalTimo Teräs1-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.
2012-02-24all: introduce apk_provides and use it in apk_nameTimo Teräs1-11/+74
in preparation for provides support. implements also some dependency satisfaction helper routines. ref #574.
2012-02-24pkg: add field for provides as 'p'Timo Teräs1-1/+7
ref #574
2012-02-24pkg, db: use 's' for source repository tags instead of 'p'Timo Teräs1-1/+1
Will use 'p' for provides.
2012-02-23pkg: fix writing of versioned conflictsTimo Teräs1-1/+1
2012-02-21solver: implement backwards jumping and various other optimizationsTimo Teräs1-2/+11
2012-02-15solver, db: repository pinning improvementsTimo Teräs1-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
2012-02-14db: record file uid/gid/mode in installed dbTimo Teräs1-0/+1
2012-02-08blob: optimize spn and cspnTimo Teräs1-4/+13
2012-01-31pkg, db: fix signature checking for files without control partTimo Teräs1-7/+24
Also clean up handling of signature failures for index files.
2012-01-12db: support line feed as 'world' dependency separatorTimo Teräs1-49/+39
* default writing the world with spaces if a space is found (for backwards compatibility) for now
2012-01-06pkg: fix writing of deps with tag and version specifierTimo Teräs1-4/+4
It is really name(@tag)(>=version).
2011-12-27solver: report number of (mega)bytes usedTimo Teräs1-2/+5
2011-10-29solver, db: implement repository pinningTimo Teräs1-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
2011-10-24solver, pkg: implement versioned conflictsTimo Teräs1-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.
2011-10-19pkg: introduce "replaces_priority"Timo Teräs1-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).
2011-10-18pkg, info: remember installed packages "replaces"Timo Teräs1-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.
2011-09-27pkg: fix dependency checking against non-installed packagesTimo Teräs1-0/+5
the solver requires this.
2011-09-13all: update copyright year statementTimo Teräs1-1/+1
2011-09-09pkg: consider script failure as non-fatalTimo Teräs1-2/+6
Make a loud warning if the script returns failure, but do not abort installation sequence because of that.
2011-09-09applets: start using solver codeTimo Teräs1-1/+0
still todo: - 'fix' is missing - 'del -R' does not work - 'upgrade' does not do self-upgrade first ... and a lot of testing.
2011-06-28index: handle errors instead of silently failingTimo Teräs1-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.
2011-04-04pkg: add origin, maintainer, build_time and commit id to indexTimo Teräs1-0/+34
Parse these fields from .PKGINFO, and write them to index.
2011-01-04pkg: recognize install_ifTimo Teräs1-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.
2011-01-03pkg, db: allow index with unsupported features to be loadedTimo Teräs1-3/+13
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-7/+29
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-01various: use APK_DEPMASK_REQUIRE where applicableTimo Teräs1-1/+1
.. instead of the longer flag combo.
2011-01-01index: remove support of old index formatTimo Teräs1-6/+0
It's no longer needed or used.
2010-12-14various: use 'atoms' for certain package field and misc fixesTimo Teräs1-21/+18
- 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-0/+10
Architecture is now: - parsed from .PKGINFO - written to index and installed db - appended to repository URL when fetching files
2010-12-10pkg: remove support for obsolete APKv1 (alpine-1.8 and earlier)Timo Teräs1-63/+0
should not be needed anymore.
2010-10-08io, db: id cache should be specific to database root, not system rootTimo Teräs1-4/+5
Otherwise we end up using wrong uid/gid mappings when doing install to alternate system root. Fixes #434.
2010-08-30Fix building on eglibcNatanael Copa1-0/+1
Seems like recent eglibc requires that you include sys/stat.h
2010-06-12archive: honor username/groupname instead of uid/gidTimo Teräs1-0/+2
Take the uid/gid from passwd and group.
2010-06-11various: use O_CLOEXEC and add some error checkingTimo Teräs1-6/+8
2010-06-11First steps for libapkNatanael Copa1-0/+1