Commit Graph

25 Commits (cute-signatures)

Author SHA1 Message Date
Timo Teräs 50ab589e9a version: increase number of digits supported in version component
Report also version numbers as invalid if there's more than 18
digits.

fixes #10774
2021-10-25 13:30:40 +03:00
Timo Teräs 010497cb5a add separate vertest applet for version string testing
start adding meson based tests
2020-10-09 16:09:19 +03:00
Timo Teräs efe0c4afec adb: introduce apk-tools database format, and few applets
This is a flat buffers inspired format that allows fast
mmaped access to the data with low overhead, signature support
and relatively good forward support.
2020-10-09 16:09:19 +03:00
TBK 5d796b5678 use SPDX-License-Identifier in source files 2020-05-07 10:45:42 +03:00
William Pitcock 5d439c4739 Revert "version: consider pkg-rX and pkg to be the same version"
This reverts commit ee5ce7284a.
2017-06-23 06:59:13 +00:00
William Pitcock 693b4bcdb0 version: add support for fuzzy version matching
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.
2017-05-27 21:49:53 +00:00
A. Wilcox ee5ce7284a version: consider pkg-rX and pkg to be the same version 2017-05-27 21:34:05 +00:00
Timo Teräs 1817b0a3c3 all: update copyright year statement 2011-09-13 11:53:01 +03:00
Timo Teräs 1f42cc1aed version: fix evaluation order to make valgrind happy
otherwise we get reads from uninitialized/unallocated memory.
2011-01-03 19:15:35 +02:00
Timo Teräs 1c7e8d2617 pkg: dependencies to specific package checksum
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-01 16:58:58 +02:00
Timo Teras 4dd183f3c1 version: add support for version control suffixes
add cvs, svn, git and mercurial tags for creating snapshot
packages.
2009-11-06 13:29:58 +02:00
Timo Teras ff45ff3152 version: fix remaining version comparisons
even more corner cases found which were broke. now all tests
should pass.
2009-11-06 13:21:00 +02:00
Timo Teras 44ac0b06af version: fix comparison of version again
-t 1.3-r0 1.3.1-r0 was broke
2009-11-05 17:49:12 +02:00
Timo Teras cc4644a54e version: fix comparision of pre-suffixes
got broke in 0b9bfa8d52 which
fixed another corner case. hopefully it's good now. fixes #191.
2009-10-26 09:33:12 +02:00
Timo Teras 0b9bfa8d52 version: fix comparison against empty version 2009-08-17 14:24:13 +03:00
Natanael Copa 5b75b40bf9 version: added apk_version_compare_blob() function
We want be able to compare blobs so we basicly revert the old change,
and make a wrapper that takes version strings.
2009-06-22 11:08:39 +02:00
Natanael Copa 4bbed2d648 ver: only compare the given packages, show version
make apk_version_compare() take strings rather than blobs
add apk_pkgversion_compare(), a wrapper that takes packages
2009-06-20 12:38:07 +02:00
Natanael Copa 20a1217e86 add: support for forced versions
Support version numbers specified with packages. For example:

 apk add 'busybox<1.14'
 apk add 'squid=>3.0'
2009-06-16 09:59:21 +00:00
Timo Teras ec5b63c5e4 pkg: clean up writing of dependencies 2009-04-16 17:05:27 +03:00
Timo Teras a23f6f4afb state: rework changeset calculation algorithm
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-04-14 18:48:02 +03:00
Natanael Copa 355626171d version: avoid end up in endless loop if we compare 2 equal invalid versions
fixes issue with apk version -t asdf asdf
2009-04-13 09:18:48 +00:00
Natanael Copa 916c396c02 version: allow more digits come after letter
This is so we can handle arpwatch-2.1a15
This makes us not 100% compatible with Gentoo
2009-04-13 09:13:09 +00:00
Natanael Copa 01a028cc2f version: allow token letter after digit_or_zero
Otherwise we only allow letters after first digit, i.e 2a, 2b but not
2.2a, 2.2b etc.
2009-04-13 08:37:25 +00:00
Natanael Copa d9879b72d5 version: allow only TOKEN_LETTER after a digit 2009-04-03 21:42:15 +02:00
Timo Teras d6c7435242 Initial commit of some stuff written so far. Still in state of flux. Expect
breakage and major changes.
2008-04-17 14:09:13 +00:00