README.Debian 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. apt-listchanges
  2. ===============
  3. ******************************************************************************
  4. Due to the demand, here is a quick overview of how apt-listchanges works.
  5. ******************************************************************************
  6. While upgrading a package _package_, apt-listchanges does the following:
  7. 1. finds the name of its _source package_ ;
  8. 2. see if this _source package_ has already showed up in its status database
  9. or not; if it has take the last seen version from the database
  10. and jump to 4 ;
  11. 3. in case the status database does not contain _source package_ entry, check
  12. with dpkg which version of the _package_ is installed (if any) and use
  13. that version as the last seen version of _source package_;
  14. otherwise skip this _package_;
  15. 4. if the last seen version is not lesser than the version being upgraded,
  16. then skip this _package_;
  17. 5. read _package_ NEWS and/or changelog files from its .deb and append the data
  18. to the data to be shown ;
  19. 6. update this _source package_ as seen and save its version in the status
  20. database.
  21. This is done for every package that is going to be installed or upgraded.
  22. The reasons for a NEWS and/or changelog not to show up are:
  23. * you never installed any binary package from that source package before,
  24. meaning that `apt-listchanges` breaks each time a source package is renamed,
  25. I can't fix that ;
  26. * there is no new NEWS/changelog entry:
  27. - `apt-get install --reinstall`) ;
  28. - or you already installed a binary package from the same source and the
  29. same version.
  30. * `apt-listchanges` was unable to guess the package source name (should not
  31. happen);
  32. * `apt-listchanges` was unable to find the Debian changelog in the binary
  33. package (should not happen either).
  34. Workaround in case of libdb downgrade or similar issues
  35. -------------------------------------------------------
  36. During the early months of 2008, there was an unfortunate situation
  37. where python bumped libdb to 4.6 to then downgrade it to 4.5 later
  38. on. That generates a situation where the apt-listchanges database was
  39. not readable anymore because updated to libdb2.6 format but then
  40. accessed with libdb2.5.
  41. You can read the full discussion at https://bugs.debian.org/469221 .
  42. In case situations like that one will happen again, we want to mention
  43. a way to recover the database:
  44. # install utilities to handle both db4.6 and db4.5 libdb files
  45. aptitude install db4.6-util db4.5-util
  46. # define a temporary database location
  47. TMPDB=$(mktemp -d)/listchanges.db
  48. # convert the current apt-listchanges database from 4.6 to 4.5
  49. db4.6_dump /var/lib/apt/listchanges.db | db4.5_load "$TMPDB"
  50. # keep a copy of the old db and move the converted db in place
  51. mv /var/lib/apt/listchanges.db /var/lib/apt/listchanges.db.old
  52. mv "$TMPDB" /var/lib/apt/listchanges.db
  53. Adapt the solution to the situation you're facing.
  54. Alternatively you can try to replace the database with its previous
  55. version stored in /var/lib/apt/listchanges-old.db (since version 3.1
  56. of apt-listchanges) or as a last resort you can remove the database,
  57. in which case you lose the history, but apt-listchanges should still
  58. work, as it will switch to comparing the currently installed version
  59. of the package with the version being installed (see point 3 of the
  60. algorithm given at the top of this file).
  61. Sharing the status database between machines
  62. --------------------------------------------
  63. The status database can be shared between machines,
  64. see https://bugs.debian.org/658444 for a use case,
  65. using NFS-mounted storage, as long as you do not run more than one
  66. instance of apt-listchanges at time (otherwise the database might
  67. get corrupted due to lack of locking). The '--dump-seen' option
  68. can be used to examine the contents of the database.