Commit Graph

39 Commits (e9eaedff5071b94d166973f13df90e47ff4936fe)

Author SHA1 Message Date
Timo Teras 8d1eeb58e4 blob: some helpers to replace snprintf
snprintf is dog slow. make the blob stuff have some helper functions
so we can use them in code paths that are executed often.
2009-07-14 13:27:21 +03:00
Timo Teras 4562f44f9b bstream: make tokenizable and load index using bstream
some fixes on index reading code too.
2009-07-14 09:33:47 +03:00
Timo Teras e69b81f525 io: move csumming away from bstream to gunzip
in future we want to checksum on gzip boundary basis, not the
full file.
2009-07-13 20:37:03 +03:00
Natanael Copa 5eab547de6 package: removed debug code 2009-06-22 09:41:49 +00: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 968dfbb8b3 pkg: apk_deps_del helper introduced 2009-04-16 16:32:04 +03:00
Timo Teras d6f4fcacd1 pkg: fix apk v1.0 URL field import 2009-04-16 14:03:59 +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
Timo Teras 7735cc644d pkg: write dependencies directly file instead of buffer
So we don't get artificial limits on the amount of dependencies
(fixes #8).
2009-03-17 13:19:06 +02:00
Timo Teras b75ae58b78 pkg: show warning if deprecated .INSTALL is present in package 2009-02-27 11:32:37 +02:00
Natanael Copa dfc8d4ce4c Revert "Revert "pkg: use absolute filenames for packages""
This reverts commit 600f9e7e03.

My bad. This was correct.
2009-01-21 09:59:12 +00:00
Natanael Copa 600f9e7e03 Revert "pkg: use absolute filenames for packages"
This reverts commit 46430ceb56.
The problem this was suppoed to fix was fixed by letting apk_db_open()
return with same working dir.
2009-01-21 09:04:31 +00:00
Timo Teras 46430ceb56 pkg: use absolute filenames for packages 2009-01-20 14:30:07 +02:00
Timo Teras 3e6fc1389f add: --upgrade|-u to control if upgrading is preferred or not 2009-01-16 13:59:36 +02:00
Timo Teras b7f9f9bdb2 info: implement who owns packages query (apk_info -W)
In quiet mode e.g. "apk info -q -W <file list>" a list of dependencies
suitable for .PKGINFO is output in one line.
2009-01-13 15:22:14 +02:00
Timo Teras ca364e34e2 pkg: use generic blob functions to parse dependencies 2009-01-13 09:32:04 +02:00
Natanael Copa 09385545d9 db, package: new dependency format, second try
dependencies are separated with single space rather than ', '.
makes db file slightly easier to parse from a shell script which
might be handy.
2009-01-11 14:03:55 +00:00
Natanael Copa 3867b4c71f Revert "db: change format for dependencies"
This reverts commit b852d670a9.
2009-01-09 11:00:20 +00:00
Natanael Copa b852d670a9 db: change format for dependencies
Each dep is separated with a single space. I.E:

D:dep1 dep2 dep3
2009-01-08 13:55:51 +00:00
Natanael Copa d704e93f8d src/package.c: fix compiler warning on 64 bit hosts 2009-01-08 07:16:53 +00:00
Timo Teras 052fbe3f86 various: make fancy progress bar and update todo 2009-01-07 21:45:11 +02:00
Timo Teras 0314104d93 db, pkg: fix rest of memory leaks 2009-01-06 21:23:26 +02:00
Timo Teras dc2ffc30e8 io: apk_ostream stuff 2008-11-28 16:28:54 +02:00
Timo Teras 5ea81ca564 add: add support to install packages not in a repository 2008-11-28 13:34:40 +02:00
Timo Teras 545a915faf db: rework 'files' to 'installed'
Make the db of installed packages more similar to index file and
reuse the code. Also rename the database file.
2008-11-28 13:15:06 +02:00
Timo Teras f0609951b9 hash, db: use apk_blob_t and list_* 2008-11-27 20:25:01 +02:00
Timo Teras 8e23a2ba4e db: checksum installed files, protect config files
Checksum of installed is computed on the fly when extracting them
and it'll be saved to fdb. When installing config files those are
diverted with suffix .apk-new if earlier version of same file with
local changes exist.
2008-11-14 14:26:59 +02:00
Timo Teras 86676ac8c4 build: remove pthreads references 2008-11-12 11:57:53 +02:00
Timo Teras 791cf6f05b pkg: speed up indexing of version 2 .apks 2008-11-07 19:18:53 +02:00
Timo Teras aef0f036f0 use zlib internally to decompress 2008-11-07 17:11:08 +02:00
Timo Teras 6967c28b96 db: fix installation of apk v1 packages 2008-11-07 13:22:16 +02:00
Timo Teras 36f73847ee pkg: support for new scripts 2008-11-07 13:05:55 +02:00
Timo Teras 57154db85d db: parse new style .PKGINFO 2008-11-06 16:58:58 +02:00
Natanael Copa cb25f35ed4 give more helpful error messages 2008-10-26 11:35:34 +00:00
Timo Teras 219a1b2ee8 Overwriting of bb files, apk_create (from old apk-tools), chdir changes,
other stuff.
2008-04-22 08:16:26 +00:00
Timo Teras 823283edca Argument parsing. Some other stuff too. 2008-04-21 16:30:10 +00: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