Commit Graph

1180 Commits (48008f95629a450707287fc73cc277a7c16a297e)

Author SHA1 Message Date
Natanael Copa a9640ba8e6 add: coffe-cup 2009-05-21 14:20:22 +00:00
Natanael Copa ec68b6822b add: fix segfault when no packages are given 2009-05-19 09:55:15 +00:00
Natanael Copa 9e58b2dd55 db: warn rather than fail with error if a repo index fails to load 2009-05-19 09:39:57 +00:00
Natanael Copa 250dee4101 db: fix bug that made inverted new installs and upgrades
We upgrade when we have an oldpkg.
2009-05-18 14:22:43 +00:00
Natanael Copa 32064c35cf add: create csum for virtuals. only add the virtual to world 2009-05-15 11:47:11 +00:00
Natanael Copa 7950a2b5a5 add: improve error reporting for virtual packages
By locking all the given dependendencies for virtual packages first
we can catch invalid deps and report those. This is alot more helpful
than just reporting "Unable to install <virutalpkg>"
2009-05-15 07:46:43 +00:00
Natanael Copa b91f9406da add: support for virtual meta packages
implements 'apk add --virutal metaname dep1 dep2...' where metaname will
be an empy meta package with dep1 and dep2 as dependencies.

This is useful to prevent abuild to add each makedepend to world which
causes some headache when it comes to unintalling them after sucessful build.
2009-05-14 12:01:09 +00:00
Natanael Copa 6db3bbd790 index: fix segfault bug when trying to deleting an unresolved dep 2009-05-14 07:18:11 +00:00
Natanael Copa 83840727f0 fix uninitialized variable bug 2009-05-14 08:49:26 +02:00
Natanael Copa 2b6e5d6e40 index: support for -d to delete packages from given index
The syntax is: apk index -d /path/to/APK_INDEX.gz pkg...

It does not seem like its possible to remove packages in the db so we
trick apk_db_index_write() by setting the repo to on-zero.

It's still not perfect since it does not recalculate the dependencies.
2009-05-12 06:27:25 +00:00
Natanael Copa ade1841541 fix misc compiler warnings about unintialized variables.
The compiler is actually right about those.
2009-05-11 12:17:35 +00:00
Natanael Copa 110611c53c add: delay state initialization til we have all pkgs in db
The state size is taken from name_id and cannot be extended. So we
must wait with initializing the state til we have all packages added
to the db.

We must also always allocate the package name, incase its not in the
repository. This is done with apk_db_get_name().
2009-05-11 12:02:00 +00:00
Natanael Copa bf70eef53c make: test for .git existence before using git describe to set version 2009-05-08 09:32:41 +00:00
Timo Teras 72f2503874 apk-tools-2.0_pre11 2009-05-06 16:19:17 +03:00
Natanael Copa d8cddc4329 change apk audit letters to correspond to old sfic/lbu letters
A = "added"
U = "updated"
2009-05-06 13:15:46 +00:00
Natanael Copa 5daa663a86 info: let -e print which packages are installed 2009-04-21 12:23:34 +00:00
Natanael Copa b0921ebac5 info: do not read the repositories as this tool only query the statedb
This allows you to query the state db even if you do not have write
permissions in cache dir (which is needed if you have remote repositories)

This should speed up things and save some memory if you have big and slow
remote repositories.
2009-04-21 11:39:16 +00:00
Natanael Copa 0dfbee9537 search: do not read the state db as this tool only query repos
This should be slightly faster and comsume less memory in theory
2009-04-21 11:37:48 +00:00
Natanael Copa 9e70b1c9c7 url: rename to .backup rather than unlink before wget 2009-04-21 11:15:24 +00:00
Natanael Copa 74b5e4f535 db: do not assume root ends with '/' 2009-04-21 08:51:18 +00:00
Natanael Copa 64e0adf0c7 url: unlink file before trying to download 2009-04-21 08:40:50 +00:00
Natanael Copa 9d22718d1d db: improve error reporting
apk_db_add_repository does its own error reporting and does not set errno
reliable. This patch also tell which repository it failed to load the index
for rather than just say it failed to open "APK_INDEX.gz" which does not tell
much.
2009-04-21 08:17:17 +00:00
Natanael Copa 1ae6f9d972 db: fix bug in apk_repository_update() 2009-04-21 08:12:12 +00:00
Natanael Copa 8a47023d3e Makefile: add -nopie to LDFLAGS 2009-04-21 07:40:11 +00:00
Timo Teras 4c2bfd9ded db: cache index files, 'update' applet
Cache non-local index files always locally.
Introduce 'update' applet to force refresh of cached index files.
Fixes #19.
2009-04-16 20:05:22 +03:00
Timo Teras aaa3c227b8 build: eliminate "Nothing to be done for `all'" message 2009-04-16 18:06:35 +03:00
Timo Teras 97a71cc5c3 build: improve dependency file generation 2009-04-16 17:54:28 +03: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 4e08c87621 del: first remove all targets from world, and then calculate changes 2009-04-16 15:37:53 +03:00
Timo Teras d6f4fcacd1 pkg: fix apk v1.0 URL field import 2009-04-16 14:03:59 +03:00
Timo Teras 18db1c4cd3 db: fix addition of .apks not in any repository 2009-04-16 14:03:17 +03:00
Timo Teras af1b460033 build: rewrite make system to something slightly similar to kbuild
Tracks now probler header file dependencies and command line parameters
used to build files. E.g. changing CFLAGS rebuild all C-files. And changing
version rebuild now the files where it's used.
2009-04-16 13:49:16 +03:00
Timo Teras 9c5200f0e1 todo: update 2009-04-15 17:02:13 +03:00
Timo Teras 371b68b8bf state: print also the changeset affect on installed-size 2009-04-15 17:01:46 +03:00
Timo Teras 6f7719d3f4 state: fix installation of package broken by autoclean patch 2009-04-15 16:38:22 +03:00
Timo Teras 55b7b89e65 state: auto clean packages
Automatically remove packages that are no longer required by a top
level dependency.
2009-04-15 16:05:17 +03:00
Timo Teras a9b6d18f7f state: make package deletion safer
Refuse to delete explicitly specified top-level packages unless
--force is specified.
2009-04-15 13:20:35 +03:00
Natanael Copa 33da51c596 fetch: close downloaded file. unlink on failure 2009-04-15 10:00:14 +00:00
Timo Teras ebe43a5e01 state: do not derefence unallocated memory
Enforce name_id to be within apk_state allocated area. New apk_name:s
can be created later for e.g. unknown packages requested at command line.
2009-04-15 12:44:24 +03:00
Timo Teras 33c2bc0d1a state: more uninitialized variables initialized 2009-04-15 12:41:01 +03:00
Natanael Copa cc1a0187ee state: style fix, init variable at declaration 2009-04-15 09:38:15 +00:00
Natanael Copa 0c1933a4d6 state: fix bug with uninitialized variable 'latest' 2009-04-15 09:29:00 +00:00
Timo Teras 9567337fd2 fetch: new applet to download .apk files
Fixes #24.
2009-04-15 09:56:09 +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 7cef96c30d blob: add strspn helpers 2009-04-14 18:46:35 +03:00
Timo Teras 024480aca0 info: option '-r' to print "required by" info 2009-04-14 09:35:02 +03:00
Timo Teras c11b70c7f0 db: track reverse dependencies
This will be used later by the commit change calculator (for improved
changeset calculation, ref #7). Will be also used by "apk info" to show
reverse dependencies or "required by" information.
2009-04-14 09:21:30 +03:00
Timo Teras f4210298ad build: use version from git describe if available 2009-04-14 08:56:06 +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