Commit Graph

514 Commits (4bf13c3d9a58d4f1685401c3569abb40c5649ca3)

Author SHA1 Message Date
Timo Teräs 4bf13c3d9a del: fix recursive deletion and messages (after solver merge)
Deduce the world dependencies to remove locally, and same for the
additional messages about packages not deleted.
2011-09-09 19:41:19 +03:00
Timo Teräs 31e4f58894 test: fix for updated solver api 2011-09-09 16:52:49 +03:00
Timo Teräs a5a7021658 applets: start using solver code
still todo:
  - 'fix' is missing
  - 'del -R' does not work
  - 'upgrade' does not do self-upgrade first

... and a lot of testing.
2011-09-09 16:32:31 +03:00
Timo Teräs 0e24207c2e solver: report 'complete' solutions with errors
Allow to select packages that conflict in case we are looking for
errors. This allows 'add --force' to install (on boot) the set of
packages with minimum conflicts.
2011-09-05 11:04:00 +03:00
Timo Teräs 1fb1afc5c2 solver: reintroduce install_if support
* each package name has two sorting positions, one which causes
   install_if triggers to be run, and other for bulk dependencies
 * fix also inverted ordering of package installations
2011-08-18 13:08:27 +03:00
Timo Teräs 48d368e7d5 solver: move topology sorting to solver code
this allows quite some optimizations to running time and memory
requirements.
2011-08-05 14:34:58 +03:00
Timo Teräs a5146f1b6c solver: generate proper error messages
* the solver no longer does look-ahead locking of names
   (could be possibly optimized later); instead names are now
   always ordered strictly to properly detect the package names
   which are unsolveable
 * basic error tests added, so we can see the most likely problem
   in dependencies easily
2011-08-01 16:21:47 +03:00
Timo Teräs 1a04425fad solver: don't consider package that we can't have
Packages that need (re-)installation but which are not available,
are excluded now properly.
2011-07-27 22:10:44 +03:00
Timo Teräs ad45a6de17 solver: permutate each preferred solution first
The first found solution is the most preferred one then.
2011-07-27 20:45:38 +03:00
Timo Teräs 034c02f0de test: don't crash if the expected files are not there 2011-07-27 15:25:58 +03:00
Natanael Copa 9cd57a8fc7 Makefile: make it possible to override pkg-config via PKG_CONFIG 2011-07-27 05:56:38 +00:00
Timo Teräs 79b53d4d76 solver: new package selection logic (which is not yet used)
* basic code for a backtracking, forward checking dependency satisfier
 * works better when there are tricky dependencies to solve
   (when can't just upgrade everything to most preferred versions)
 * the new code always evaluates all of 'world' constraints
   (old code just does incremental updates based on heuristics)
 * is probably somewhat slower than old code (probably unnoticeable
   difference in most cases)
 * makes easier to write support for provides and repository pinning
 * test applet and a bunch of test cases added which uses the new code
 * from the old feature set install_if is not yet implemented
2011-07-26 17:08:43 +03:00
Timo Teräs 169cb3a97e dot: applet to generate the dot attributed graph language files
This applet can be used to generate data for graphviz tools.
Useful to visualize package dependencies, and possible errors
in the repository.

Usage examples:
  apk dot gnome-desktop | tred | dot -Tpng gnome-desktop.png
    -- to generate simplified dependency chart of gnome-desktop
  apk dot --errors | dot -Tpng index-errors.png
    -- to generate chart visualizing dependency errors in index
2011-07-24 14:56:52 +03:00
Timo Teräs 04950974bf ver: database is not needed for version string checking and tests 2011-07-24 14:24:58 +03:00
Timo Teräs 6b24f3c399 apk: improve indented printing
* fixup the help messages to align up properly
 * refresh screen width on SIGWINCH
2011-07-22 12:08:35 +03:00
William Pitcock 384eada8af apk_database: add APK_DEFAULT_ARCH for ppc, ppc64 and arm ports 2011-07-16 04:31:27 -05:00
William Pitcock 86a67d4415 apk: use APK_DEFAULT_ARCH in version(). 2011-07-16 04:29:09 -05:00
William Pitcock 37a682e560 apk_database: move APK_DEFAULT_ARCH to headers so that we can use it in version(). 2011-07-16 04:28:41 -05:00
William Pitcock 1c54d13614 apk: display command descriptions in command list 2011-07-16 04:14:58 -05:00
Timo Teräs 9cb0ce545a cache: return error if cache sync or download fails
fixes #666
2011-07-11 11:22:26 +03:00
Timo Teräs 433da92e37 index: handle errors instead of silently failing
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-06-28 15:40:52 +03:00
Timo Teräs 95555ede4d db: more fix for read-only cache remounting
remount to read-write before trying to create the cache directory
subdirs. fix a fd leak that might prevent remounting back to rw.
2011-05-27 16:49:25 +03:00
Natanael Copa 38e54240a3 db: remount read-only after the file handles have been closed
The apk cache might be on the readonly media so we need wait with
remounting til after atleast this filehandle is closed.
2011-05-27 11:38:50 +00:00
Timo Teräs 2332d991a1 apk-tools-2.1.0 2011-05-23 16:29:21 +03:00
Timo Teräs 57572979a9 state: fix commit order of packages
commit 4e72075fba introduced a bug where package installation might happen
in wrong order (reminder for self to separate the package version deduction
to separate step from installation ordering). this restricts the earlier
commit to not mingle with the install order.
2011-05-23 15:35:02 +03:00
Timo Teräs c5de3cdc4c db: fix post-install script error message formatting 2011-05-23 15:32:32 +03:00
William Pitcock 9f219e4f46 state: make some of the interactive messages line up with apt which weren't already 2011-04-26 22:49:06 -05:00
Timo Teräs 9901058891 db: remount ro cache to rw earlier for update to work 2011-04-22 11:24:33 +03:00
Timo Teräs 595c66595c apk: default screen width 70 if ioctl says 0 as width 2011-04-22 11:13:32 +03:00
Natanael Copa cec1fa2b0f db: Allow override arch when using --root
This is so we can do x86 --root installs on x86_64 hosts.

Using --arch without --root can make great damage so we only enable it
if --root is used.
2011-04-14 19:59:01 +00:00
William Pitcock 762e0c717b state: make the progress bar look nice 2011-04-09 08:16:46 -05:00
William Pitcock 2911d0cad2 upgrade: Improve english messages on apk-tools/baselibs upgrade transaction. 2011-04-09 08:05:49 -05:00
Timo Teräs 91c4cc6c18 fetch: fix fetching of packages with arch 2011-04-07 14:14:27 +03:00
Timo Teräs 4a16ddbc10 apk-tools-2.1.0_rc1 2011-04-06 09:53:28 +03:00
Timo Teräs 5a9d8323a0 pkg: add origin, maintainer, build_time and commit id to index
Parse these fields from .PKGINFO, and write them to index.
2011-04-04 14:05:52 +03:00
Timo Teräs 0cc2086e27 index: support rewriting of architecture
Our build infra does not yet handle properly noarch, so for the
time being we will rewrite them as native packages in index. This
allows the package to be fetched from the proper URL. This feature
will be removed once abuild and the build infra handle noarch
properly.
2011-04-04 13:19:12 +03:00
Timo Teräs dded261924 state: late locking for install_if package selection
improves behaviour under certain corner case conditions.
2011-03-31 09:22:12 +03:00
Natanael Copa e43ec60874 state: use db in own struc when committing
The db parameter to apk_state_commit is not needed so we remove it.
2011-03-30 12:53:02 +00:00
Timo Teräs 0f6475b884 state, info: implement install_if (fixes #443)
Implement the logic for install_if lines. Update info applet to
also display the install_if related fields.
2011-03-29 16:36:10 +03:00
Timo Teräs 9eeb95470b apk-tools-2.1.0_pre1 2011-03-29 14:51:57 +03:00
Timo Teräs e783f20eff fetch: fix package version print
broke after making the version field an atom because the printf
was not updated accordingly.
2011-03-29 13:09:45 +03:00
Timo Teräs 8e01be4777 apk: fix gcc 4.6 warnings 2011-03-27 02:51:51 +02:00
Timo Teräs 79b7123b09 state: fix late locking of packages
commit 4e72075fba introduced late locking for top level packages,
but used the wrong package's top level flag for the check. this
fixes a problem that dependencies might not get pulled in.
2011-03-27 02:50:48 +02:00
Timo Teräs 116d9a0ea7 apk: improve progress bar
* make it as wide as the screen
 * make sure it's drawn after package change
 * and draw it using ansi escapes in line buffered stderr
2011-03-19 15:20:47 +02:00
Timo Teräs 7b6e44b11b upgrade: reset world dependencies during traversal
This allows us to get apk-tools dependencies get reset at proper
time in world. As a bonus, it reduces code amount.
2011-03-19 14:21:58 +02:00
Timo Teräs 4e72075fba state: lock package late for names specified on command line
This will fix certain scenarios where multiple packages are
installed with full package files specified on command line
and they depend on each other.
2011-03-19 14:17:02 +02:00
Timo Teräs 93eb38a31a db: relocate from /var/lib/apk
move all files therein to other places. this allows /var to be
mounted from harddisk, but rest of system be run from ramdisk.

this also removes support for historical version of the scripts
database which was obsoleted in 2.0_pre16 (in July 2009).
2011-03-16 16:53:07 +02:00
Timo Teräs 2222a15edd db: move lock file to /var/lock
in accordance with FSH. this also to clear /var of apk related things
as we might want to run /var as harddisk, but rest of system from
ramdisk.
2011-03-16 15:39:36 +02:00
Timo Teräs 20775276b9 apk: show progress bar by default for tty controlled runs
and make the progress bar disappear on regular runs too.
2011-03-16 15:22:05 +02:00
Timo Teräs 5d64bc5d8c db: fix cache tmpfs detection
comment out the code that was out for testing. duh.
2011-03-16 15:21:41 +02:00