README.MultiArch 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. Before we start with this topic: Note that MultiArch is not yet ready for
  2. prime time and/or for the casual user. The implementation is so far widely
  3. untested and only useful for developers of packagemanagment tools which
  4. use APT and his friends and maintainers of (upcoming) MultiArch packages.
  5. This README is especially NOT written for the casual user and is NOT a
  6. usage guide - you have been warned. It is assumed that the reader has
  7. at least a bit of knowledge about APT internals, dependency relations
  8. and the MultiArch spec [0].
  9. Note also that the toolchain isn't ready yet, e.g. while you can simulate
  10. the installation of MultiArch packages they will more sooner than later
  11. cause enormous problems if really installed as dpkg can't handle MultiArch
  12. yet (no, --force-{overwrite,architecture} aren't good options here).
  13. Other parts of the big picture are missing and/or untested too.
  14. You have been warned!
  15. The implementation is focused on NOT breaking existing singleArch-only
  16. applications and/or systems as this is the current status-quo for all
  17. systems. Also, many systems don't need (or can't make use of) MultiArch,
  18. so APT will proceed in thinking SingleArch as long as it is not explicitly
  19. told to handle MultiArch:
  20. To activate MultiArch handling you need to specify architectures you
  21. want to be considered by APT with the config list APT::Architectures
  22. (Insert architectures in order of preference).
  23. APT will download Packages files for all these architectures in the
  24. update step. Exception: In the sourcelist is the optionfield used:
  25. deb [ arch=amd64,i386 ] http://example.org/ experimental main
  26. (This optionfield is a NOP in previous apt versions)
  27. Internally in APT a package is represented as a PkgIterator -
  28. before MultiArch this PkgIterator was architecture unaware,
  29. only VerIterators include the architecture they came from.
  30. This is/was a big problem as all versions in a package are
  31. considered for dependency resolution, so pinning will not work in all cases.
  32. The problem is solved by a conceptional change:
  33. A PkgIterator is now architecture aware, so the packages
  34. of foobar for amd64 and for i386 are now for apt internal totally
  35. different packages. That is a good thing for e.g. pinning, but
  36. sometimes you need the information that such packages are belonging together:
  37. All these foobar packages therefore form a Group accessible with GrpIterators.
  38. Note that the GrpIterator has the same name as all the packages in this group,
  39. so e.g. apt-cache pkgnames iterates over GrpIterator to get the package names:
  40. This is compatible to SingleArch as a Group consists only of a single package
  41. and also to MultiArch as a Group consists of possible many packages which
  42. all have the same name and are therefore out of interest for pkgnames.
  43. Given all these internal changes it is quite interesting that the actual
  44. implementation of MultiArch is trivial: Some implicit dependencies and a few
  45. more provides are all changes needed to get it working. Especially noteworthy
  46. is that it wasn't needed to change the resolver in any way and other parts only
  47. need to be told about using GrpIterator instead of PkgIterator, so chances are
  48. good that libapt-applications will proceed to work without or at least only
  49. require minor changes, but your mileage may vary…
  50. Known Issues and/or noteworthy stuff:
  51. * The implementation is mostly untested, so it is very likely that APT will
  52. eat your kids if you aren't as lucky as the author of these patches.
  53. [0] https://wiki.ubuntu.com/MultiarchSpec