summaryrefslogtreecommitdiff
path: root/src/add.c
AgeCommit message (Collapse)AuthorFilesLines
2019-11-18add: always use UTC for virtual package versionsMax Rees1-1/+1
2019-11-18Make tests pass and introduce a memory leakFredrik Gustafsson1-1/+1
Since 37fbafcd928c466c82c892a7868d686d710e5d07 the tests hasn't worked since a string on the stack was added as version for a virtual package. Instead create the version string on the heap and then simply leak it. A short running program as apk shouldn't need to worry about memory leaks.
2019-07-02add: fix virtual package id generationTimo Teräs1-16/+35
Fixes 37fbafcd by adding more input to the hash than just second grained time stamp - collisions would happen when running apk scripted. For virtual package the hash works only as unique identifier, so try to add elements that should make it unique in most cases. Fixes #10648
2019-06-03use fixed system time in test mode to have fixed test outputTimo Teräs1-1/+1
fixes test suite regression from previous commit
2019-06-03add: make virtual packages upgradeable (ref #9957)Timo Teräs1-3/+12
Originally the virtual packages could have dependencies added to it. However, commit b06e3b99 broke this behaviour to fix error reporting. The root cause however was that the virtual depedency package was not properly versioned. This fixes to use current date/time as the package version, and constructs the "faked" package hash from it. This effectively makes "add -t virtpkg deps.." replace the dependencies which should be the desired behaviour for "abuild deps". 'world' dependency to the generated virtual package is also now versioned to make sure it get's upgraded.
2018-11-02fix error reporting for virtual package additionTimo Teräs1-1/+1
Move addition of virtual package after the dependencies have been parsed as then the reverse dependency structers can be populated correctly.
2018-09-11add: add --latest flag to help analyze why upgrade failsTimo Teräs1-0/+6
2018-02-20add: child dependencies can never take a pinning, give a useful errorWilliam Pitcock1-3/+4
2018-01-09apk: usage: cleanup help text when no applet is selectedWilliam Pitcock1-0/+1
2018-01-03split --force to several --force-[type] optionsTimo Teräs1-3/+3
This unloads --force as several of the things are really not wanted together. E.g. --force-refresh is a lot different from --force-broken-world and doing --force to get the other might introduce unwanted behaviour. --force is still kept for backwards compatibility and it enables most things --force was used for.
2017-05-27version: add support for fuzzy version matchingWilliam Pitcock1-1/+1
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.
2015-04-24allow virtual packages beginning with dot by default on tmpfs installsTimo Teräs1-3/+3
the allows update-kernel script to work on tmpfs install before cache is configured.
2014-10-08rework option parsing to have a group structureTimo Teräs1-16/+20
Add also a new 'commit' group that is the common options for all applets that can commit package changes.
2013-06-28add, del: main dependencies -> 'world'Dubiousjim1-1/+1
Acked-by: Natanael Copa <ncopa@alpinelinux.org>
2013-06-28various: applet help text and comment fixesDubiousjim1-2/+3
Acked-by: Natanael Copa <ncopa@alpinelinux.org>
2013-06-19applets: unify help message by removing final dotsTimo Teräs1-3/+2
2013-06-18apk: use string array in applet mains, separate apk_name_foreach_matchingTimo Teräs1-8/+9
2013-05-30db: unify handling of special packagesTimo Teräs1-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.
2012-02-29solver, test: make conflicts unconditionalTimo Teräs1-2/+2
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-28add: allow specifying repository tag with added virtual packagesTimo Teräs1-2/+12
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-01-17solver, upgrade: properly detect missing repository tagsTimo Teräs1-7/+0
* upgrade needs explicit check so we don't try self-upgrade (which would print additional messages on screen) * add can fix problems, so check against the new world * merge the code in few places
2012-01-13add: make repository tag pinning strongerTimo Teräs1-1/+1
Previously we would not upgrade just by doing "apk add foo@tag" if foo was already installed. It required explicit '-u'. This allows 'apk add' to explicitly prefer the newly specified pinning.
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
2012-01-12add: fail if repository tag does not existTimo Teräs1-1/+9
2012-01-06add: print an error about malformed argumentsTimo Teräs1-1/+4
2011-10-18pkg, info: remember installed packages "replaces"Timo Teräs1-2/+3
"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-16solver: inheritable solver flagsTimo Teräs1-2/+6
allow per-name solver flags to be inheritable, and use them in self-upgrade, add -u and the fix applet. this gives more familiar behaviour for the upgrades.
2011-09-13all: update copyright year statementTimo Teräs1-1/+1
2011-09-13solver: add per-name specific flags, and fix the fix appletTimo Teräs1-5/+9
2011-09-09applets: start using solver codeTimo Teräs1-36/+13
still todo: - 'fix' is missing - 'del -R' does not work - 'upgrade' does not do self-upgrade first ... and a lot of testing.
2011-03-30state: use db in own struc when committingNatanael Copa1-1/+1
The db parameter to apk_state_commit is not needed so we remove it.
2011-01-05add: use default arch instead of noarch, improve errorsTimo Teräs1-0/+1
Packages without architecture should get the platforms default architecture (so we are backwards compatible). Only the virtual packages should get 'noarch' by default. Also print full path to the index file which failed.
2010-12-14various: use 'atoms' for certain package field and misc fixesTimo Teräs1-1/+1
- 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-06-11First steps for libapkNatanael Copa1-0/+1
2010-06-01state: improve error messages from dependency failuresTimo Teräs1-14/+12
Print more information why installation changeset calculation failed. Fixes #187.
2010-02-26add: print all failing packages instead of only firstNatanael Copa1-3/+5
We want see all packages that fails to install and not only the first
2009-08-13add, del, db: fix various bugs introduced by earlier commitsTimo Teras1-2/+3
- make virtual packages work again - make apk del (for non-empty packages) work again
2009-08-13add: refuse to add bad dependencies to worldTimo Teras1-20/+20
allow also overriding old (possibly bad) world dependency. hopefully it's more bullet proof now.
2009-08-11db, audit: audit symlinks (by hash of the link target)Timo Teras1-1/+1
2009-08-06add: world needs to be updated before state instantiationTimo Teras1-2/+1
otherwise old world deps are used and unintended results will happen.
2009-08-06state: bug fixTimo Teras1-1/+2
2009-08-06all: implement database open optionsTimo Teras1-24/+19
so user can override trusted keys directory and repositories file.
2009-08-04state: fix world dependencies to be honored alwaysTimo Teras1-0/+3
previously they might have been skipped on certain situations. this also fixes some other reverse dependency enforcements and implements new "pending" state for locked name.
2009-07-31apk: use *at instead of chdir+normal file syscallTimo Teras1-1/+1
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-24add, fetch: make handling of special options more logicalTimo Teras1-41/+0
2009-07-24db: remove APK_NAME_VIRTUAL flagTimo Teras1-1/+1
use the package 'installed_size' == 0 as a test instead for dependency only packages.
2009-07-24db: create cache index with non-repository packagesTimo Teras1-7/+20
this enables virtual packages and files specified from command line to work on non-harddisk installs.
2009-07-22signing: verify and generate identityTimo Teras1-2/+2
fixes verification of non-repository packages while installing them. this is final thing needed for full signing support (fixes #46).
2009-07-22add: fixes to installing non-repository packageTimo Teras1-3/+13
make sure cache is enabled on non-permanent rootfs setups. some optimizations and fixes too.