You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

apt-cache.cc 64 KiB

implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
6 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
6 years ago
* updated with mainline Patches applied: * andrelop@debian.org/apt--translation--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-79 * andrelop@debian.org/apt--translation--0--patch-1 Sync with Matt version. * andrelop@debian.org/apt--translation--0--patch-2 Update pt_BR translation * andrelop@debian.org/apt--translation--0--patch-3 Sync with bubulle's branch. * apt@packages.debian.org/apt--main--0--patch-88 Change debian/bugscript to use #!/bin/bash (Closes: #313402) * apt@packages.debian.org/apt--main--0--patch-89 Branch for Debian * apt@packages.debian.org/apt--main--0--patch-90 Update version in configure * apt@packages.debian.org/apt--main--0--patch-91 Fix French man page build * apt@packages.debian.org/apt--main--0--patch-92 Add the current Debian archive signing key * apt@packages.debian.org/apt--main--0--patch-93 Merge with mvo * apt@packages.debian.org/apt--main--0--patch-94 Update changelog * apt@packages.debian.org/apt--main--0--patch-95 Merge Christian's branch * apt@packages.debian.org/apt--main--0--patch-96 Update changelog * apt@packages.debian.org/apt--main--0--patch-97 Update priority of apt-utils to important, to match the override file * apt@packages.debian.org/apt--main--0--patch-98 Install only one keyring on each branch (Closes: #316119) * apt@packages.debian.org/apt--main--0--patch-99 Finalize 0.6.39 * apt@packages.debian.org/apt--main--0--patch-100 Use debian.org address in mainline * apt@packages.debian.org/apt--main--0--patch-101 Update pot file * apt@packages.debian.org/apt--main--0--patch-102 Open 0.6.40 * apt@packages.debian.org/apt--main--0--patch-103 Patch from Jordi Mallach to mark some additional strings for translation * apt@packages.debian.org/apt--main--0--patch-104 Updated Catalan translation from Jordi Mallach * apt@packages.debian.org/apt--main--0--patch-105 Merge from bubulle@debian.org--2005/apt--main--0 * apt@packages.debian.org/apt--main--0--patch-106 Restore lost changelog entries * apt@packages.debian.org/apt--main--0--patch-107 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-108 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-109 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-110 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * bubulle@debian.org--2005/apt--main--0--patch-82 Fix permissions * bubulle@debian.org--2005/apt--main--0--patch-83 French translation spellchecked * bubulle@debian.org--2005/apt--main--0--patch-84 Spell corrections in German translations * bubulle@debian.org--2005/apt--main--0--patch-85 Correct some file permissions * bubulle@debian.org--2005/apt--main--0--patch-86 Correct Hebrew translation * bubulle@debian.org--2005/apt--main--0--patch-87 Sync Portuguese translation with the POT file * bubulle@debian.org--2005/apt--main--0--patch-88 Updated Danish translation (not yet complete) * bubulle@debian.org--2005/apt--main--0--patch-89 Sync with Andre Luis Lopes and Otavio branches * bubulle@debian.org--2005/apt--main--0--patch-90 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-91 Updated Slovak translation * bubulle@debian.org--2005/apt--main--0--patch-92 Add apt-key French man page * bubulle@debian.org--2005/apt--main--0--patch-93 Update Greek translations * bubulle@debian.org--2005/apt--main--0--patch-94 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-95 Sync PO files with the POT file/French translation update * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-5 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-6 * build fix for apt--main--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-22 * added myself to uploaders, changelog is signed with mvo@debian.org and in sync with the debian/experimental upload * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-23 * apt-cache show <virtual-pkg> shows all virtual packages instead of nothing (thanks to otavio) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-24 * changelog updated * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-25 * make pinning on component work again (we just use the section, as apt-0.6 don't use per-section Release files anymore) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-27 * updated the changelog * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-28 * merged with my apt--fixes--0 branch * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-29 * added a missing OpProgress::Done() in depCache::Init(), removed the show-virtual-packages patch in apt-cache because matt does not like him :/ * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-30 * fix a stupid bug in the depcache::Init() code * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-31 * merged/removed conflicts with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-32 * merged apt--main and make sure that the po files come from apt--main (because they are more recent) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-85 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-1 * inital proof of concept code, understands what dpkg tells it already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-2 * progress reporting works now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-3 * added "APT::Status-Fd" variable * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-4 * do i18n now too * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-5 * define N_(x) if it is not defined already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-6 * PackageManager::DoInstall(int status_fd) added (does not break the ABI) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-7 * merged with apt--fixes--0 to make it build again * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-8 * added support for "error" and "conffile-prompt" messages from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-9 merge with main * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-10 * use sizeof() for all snprintf() uses; fix a potential line break problem in the status reading code; changed the N_() to _() calls * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-11 * added APT::KeepFDs configuration list for file descriptors that apt should leave open (needed for various frontends like debconf, synaptic) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-12 * fixed a API breakage * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-13 * doc added, should be releasable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-14 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-15 * more source comments, added Debug::DpkgPM debug code to inspect the dpkg<->apt communication, broke the abi (ok with matt) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-16 * the progress reporting has it's own "Debug::pkgDPkgProgressReporting" debug variable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-17 * merged PackageOps and TranslatedPackageOps into a single Map with the new DpkgState struct * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-18 * clear the APT::Keep-Fds configuration when it's no longer needed * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-19 * rewrote the reading from dpkg so that it never blocks * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-20 * merged the two status arrays into one * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-21 * added support for download progress reporting too (for Kamion and base-config) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-22 * ABI break; added Configuration::Clear(string List, {int,string} value) added (to remove a single Value from a list); test/conf_clear.cc added * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-23 * remvoed a debug string * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-24 * soname changed, fixed a bug in the parsing code when dpkg send the same state more than once (at the end) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-25 * merged with apt@packages.debian.org/apt--main--0, added changelog entry for the 0.6.40.1 upload * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-26 * fix a bug when out-of-order states are send from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-27 * changelog update * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-28 * a real changelog entry now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-29 * changelog finalized * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-30 * propper (and sane) support for pmerror and pmconffile added
16 years ago
* updated with mainline Patches applied: * andrelop@debian.org/apt--translation--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-79 * andrelop@debian.org/apt--translation--0--patch-1 Sync with Matt version. * andrelop@debian.org/apt--translation--0--patch-2 Update pt_BR translation * andrelop@debian.org/apt--translation--0--patch-3 Sync with bubulle's branch. * apt@packages.debian.org/apt--main--0--patch-88 Change debian/bugscript to use #!/bin/bash (Closes: #313402) * apt@packages.debian.org/apt--main--0--patch-89 Branch for Debian * apt@packages.debian.org/apt--main--0--patch-90 Update version in configure * apt@packages.debian.org/apt--main--0--patch-91 Fix French man page build * apt@packages.debian.org/apt--main--0--patch-92 Add the current Debian archive signing key * apt@packages.debian.org/apt--main--0--patch-93 Merge with mvo * apt@packages.debian.org/apt--main--0--patch-94 Update changelog * apt@packages.debian.org/apt--main--0--patch-95 Merge Christian's branch * apt@packages.debian.org/apt--main--0--patch-96 Update changelog * apt@packages.debian.org/apt--main--0--patch-97 Update priority of apt-utils to important, to match the override file * apt@packages.debian.org/apt--main--0--patch-98 Install only one keyring on each branch (Closes: #316119) * apt@packages.debian.org/apt--main--0--patch-99 Finalize 0.6.39 * apt@packages.debian.org/apt--main--0--patch-100 Use debian.org address in mainline * apt@packages.debian.org/apt--main--0--patch-101 Update pot file * apt@packages.debian.org/apt--main--0--patch-102 Open 0.6.40 * apt@packages.debian.org/apt--main--0--patch-103 Patch from Jordi Mallach to mark some additional strings for translation * apt@packages.debian.org/apt--main--0--patch-104 Updated Catalan translation from Jordi Mallach * apt@packages.debian.org/apt--main--0--patch-105 Merge from bubulle@debian.org--2005/apt--main--0 * apt@packages.debian.org/apt--main--0--patch-106 Restore lost changelog entries * apt@packages.debian.org/apt--main--0--patch-107 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-108 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-109 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-110 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * bubulle@debian.org--2005/apt--main--0--patch-82 Fix permissions * bubulle@debian.org--2005/apt--main--0--patch-83 French translation spellchecked * bubulle@debian.org--2005/apt--main--0--patch-84 Spell corrections in German translations * bubulle@debian.org--2005/apt--main--0--patch-85 Correct some file permissions * bubulle@debian.org--2005/apt--main--0--patch-86 Correct Hebrew translation * bubulle@debian.org--2005/apt--main--0--patch-87 Sync Portuguese translation with the POT file * bubulle@debian.org--2005/apt--main--0--patch-88 Updated Danish translation (not yet complete) * bubulle@debian.org--2005/apt--main--0--patch-89 Sync with Andre Luis Lopes and Otavio branches * bubulle@debian.org--2005/apt--main--0--patch-90 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-91 Updated Slovak translation * bubulle@debian.org--2005/apt--main--0--patch-92 Add apt-key French man page * bubulle@debian.org--2005/apt--main--0--patch-93 Update Greek translations * bubulle@debian.org--2005/apt--main--0--patch-94 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-95 Sync PO files with the POT file/French translation update * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-5 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-6 * build fix for apt--main--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-22 * added myself to uploaders, changelog is signed with mvo@debian.org and in sync with the debian/experimental upload * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-23 * apt-cache show <virtual-pkg> shows all virtual packages instead of nothing (thanks to otavio) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-24 * changelog updated * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-25 * make pinning on component work again (we just use the section, as apt-0.6 don't use per-section Release files anymore) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-27 * updated the changelog * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-28 * merged with my apt--fixes--0 branch * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-29 * added a missing OpProgress::Done() in depCache::Init(), removed the show-virtual-packages patch in apt-cache because matt does not like him :/ * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-30 * fix a stupid bug in the depcache::Init() code * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-31 * merged/removed conflicts with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-32 * merged apt--main and make sure that the po files come from apt--main (because they are more recent) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-85 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-1 * inital proof of concept code, understands what dpkg tells it already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-2 * progress reporting works now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-3 * added "APT::Status-Fd" variable * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-4 * do i18n now too * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-5 * define N_(x) if it is not defined already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-6 * PackageManager::DoInstall(int status_fd) added (does not break the ABI) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-7 * merged with apt--fixes--0 to make it build again * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-8 * added support for "error" and "conffile-prompt" messages from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-9 merge with main * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-10 * use sizeof() for all snprintf() uses; fix a potential line break problem in the status reading code; changed the N_() to _() calls * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-11 * added APT::KeepFDs configuration list for file descriptors that apt should leave open (needed for various frontends like debconf, synaptic) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-12 * fixed a API breakage * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-13 * doc added, should be releasable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-14 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-15 * more source comments, added Debug::DpkgPM debug code to inspect the dpkg<->apt communication, broke the abi (ok with matt) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-16 * the progress reporting has it's own "Debug::pkgDPkgProgressReporting" debug variable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-17 * merged PackageOps and TranslatedPackageOps into a single Map with the new DpkgState struct * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-18 * clear the APT::Keep-Fds configuration when it's no longer needed * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-19 * rewrote the reading from dpkg so that it never blocks * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-20 * merged the two status arrays into one * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-21 * added support for download progress reporting too (for Kamion and base-config) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-22 * ABI break; added Configuration::Clear(string List, {int,string} value) added (to remove a single Value from a list); test/conf_clear.cc added * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-23 * remvoed a debug string * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-24 * soname changed, fixed a bug in the parsing code when dpkg send the same state more than once (at the end) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-25 * merged with apt@packages.debian.org/apt--main--0, added changelog entry for the 0.6.40.1 upload * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-26 * fix a bug when out-of-order states are send from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-27 * changelog update * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-28 * a real changelog entry now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-29 * changelog finalized * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-30 * propper (and sane) support for pmerror and pmconffile added
16 years ago
* updated with mainline Patches applied: * andrelop@debian.org/apt--translation--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-79 * andrelop@debian.org/apt--translation--0--patch-1 Sync with Matt version. * andrelop@debian.org/apt--translation--0--patch-2 Update pt_BR translation * andrelop@debian.org/apt--translation--0--patch-3 Sync with bubulle's branch. * apt@packages.debian.org/apt--main--0--patch-88 Change debian/bugscript to use #!/bin/bash (Closes: #313402) * apt@packages.debian.org/apt--main--0--patch-89 Branch for Debian * apt@packages.debian.org/apt--main--0--patch-90 Update version in configure * apt@packages.debian.org/apt--main--0--patch-91 Fix French man page build * apt@packages.debian.org/apt--main--0--patch-92 Add the current Debian archive signing key * apt@packages.debian.org/apt--main--0--patch-93 Merge with mvo * apt@packages.debian.org/apt--main--0--patch-94 Update changelog * apt@packages.debian.org/apt--main--0--patch-95 Merge Christian's branch * apt@packages.debian.org/apt--main--0--patch-96 Update changelog * apt@packages.debian.org/apt--main--0--patch-97 Update priority of apt-utils to important, to match the override file * apt@packages.debian.org/apt--main--0--patch-98 Install only one keyring on each branch (Closes: #316119) * apt@packages.debian.org/apt--main--0--patch-99 Finalize 0.6.39 * apt@packages.debian.org/apt--main--0--patch-100 Use debian.org address in mainline * apt@packages.debian.org/apt--main--0--patch-101 Update pot file * apt@packages.debian.org/apt--main--0--patch-102 Open 0.6.40 * apt@packages.debian.org/apt--main--0--patch-103 Patch from Jordi Mallach to mark some additional strings for translation * apt@packages.debian.org/apt--main--0--patch-104 Updated Catalan translation from Jordi Mallach * apt@packages.debian.org/apt--main--0--patch-105 Merge from bubulle@debian.org--2005/apt--main--0 * apt@packages.debian.org/apt--main--0--patch-106 Restore lost changelog entries * apt@packages.debian.org/apt--main--0--patch-107 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-108 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-109 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-110 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * bubulle@debian.org--2005/apt--main--0--patch-82 Fix permissions * bubulle@debian.org--2005/apt--main--0--patch-83 French translation spellchecked * bubulle@debian.org--2005/apt--main--0--patch-84 Spell corrections in German translations * bubulle@debian.org--2005/apt--main--0--patch-85 Correct some file permissions * bubulle@debian.org--2005/apt--main--0--patch-86 Correct Hebrew translation * bubulle@debian.org--2005/apt--main--0--patch-87 Sync Portuguese translation with the POT file * bubulle@debian.org--2005/apt--main--0--patch-88 Updated Danish translation (not yet complete) * bubulle@debian.org--2005/apt--main--0--patch-89 Sync with Andre Luis Lopes and Otavio branches * bubulle@debian.org--2005/apt--main--0--patch-90 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-91 Updated Slovak translation * bubulle@debian.org--2005/apt--main--0--patch-92 Add apt-key French man page * bubulle@debian.org--2005/apt--main--0--patch-93 Update Greek translations * bubulle@debian.org--2005/apt--main--0--patch-94 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-95 Sync PO files with the POT file/French translation update * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-5 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-6 * build fix for apt--main--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-22 * added myself to uploaders, changelog is signed with mvo@debian.org and in sync with the debian/experimental upload * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-23 * apt-cache show <virtual-pkg> shows all virtual packages instead of nothing (thanks to otavio) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-24 * changelog updated * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-25 * make pinning on component work again (we just use the section, as apt-0.6 don't use per-section Release files anymore) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-27 * updated the changelog * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-28 * merged with my apt--fixes--0 branch * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-29 * added a missing OpProgress::Done() in depCache::Init(), removed the show-virtual-packages patch in apt-cache because matt does not like him :/ * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-30 * fix a stupid bug in the depcache::Init() code * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-31 * merged/removed conflicts with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-32 * merged apt--main and make sure that the po files come from apt--main (because they are more recent) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-85 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-1 * inital proof of concept code, understands what dpkg tells it already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-2 * progress reporting works now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-3 * added "APT::Status-Fd" variable * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-4 * do i18n now too * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-5 * define N_(x) if it is not defined already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-6 * PackageManager::DoInstall(int status_fd) added (does not break the ABI) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-7 * merged with apt--fixes--0 to make it build again * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-8 * added support for "error" and "conffile-prompt" messages from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-9 merge with main * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-10 * use sizeof() for all snprintf() uses; fix a potential line break problem in the status reading code; changed the N_() to _() calls * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-11 * added APT::KeepFDs configuration list for file descriptors that apt should leave open (needed for various frontends like debconf, synaptic) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-12 * fixed a API breakage * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-13 * doc added, should be releasable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-14 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-15 * more source comments, added Debug::DpkgPM debug code to inspect the dpkg<->apt communication, broke the abi (ok with matt) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-16 * the progress reporting has it's own "Debug::pkgDPkgProgressReporting" debug variable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-17 * merged PackageOps and TranslatedPackageOps into a single Map with the new DpkgState struct * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-18 * clear the APT::Keep-Fds configuration when it's no longer needed * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-19 * rewrote the reading from dpkg so that it never blocks * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-20 * merged the two status arrays into one * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-21 * added support for download progress reporting too (for Kamion and base-config) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-22 * ABI break; added Configuration::Clear(string List, {int,string} value) added (to remove a single Value from a list); test/conf_clear.cc added * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-23 * remvoed a debug string * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-24 * soname changed, fixed a bug in the parsing code when dpkg send the same state more than once (at the end) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-25 * merged with apt@packages.debian.org/apt--main--0, added changelog entry for the 0.6.40.1 upload * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-26 * fix a bug when out-of-order states are send from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-27 * changelog update * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-28 * a real changelog entry now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-29 * changelog finalized * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-30 * propper (and sane) support for pmerror and pmconffile added
16 years ago
* updated with mainline Patches applied: * andrelop@debian.org/apt--translation--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-79 * andrelop@debian.org/apt--translation--0--patch-1 Sync with Matt version. * andrelop@debian.org/apt--translation--0--patch-2 Update pt_BR translation * andrelop@debian.org/apt--translation--0--patch-3 Sync with bubulle's branch. * apt@packages.debian.org/apt--main--0--patch-88 Change debian/bugscript to use #!/bin/bash (Closes: #313402) * apt@packages.debian.org/apt--main--0--patch-89 Branch for Debian * apt@packages.debian.org/apt--main--0--patch-90 Update version in configure * apt@packages.debian.org/apt--main--0--patch-91 Fix French man page build * apt@packages.debian.org/apt--main--0--patch-92 Add the current Debian archive signing key * apt@packages.debian.org/apt--main--0--patch-93 Merge with mvo * apt@packages.debian.org/apt--main--0--patch-94 Update changelog * apt@packages.debian.org/apt--main--0--patch-95 Merge Christian's branch * apt@packages.debian.org/apt--main--0--patch-96 Update changelog * apt@packages.debian.org/apt--main--0--patch-97 Update priority of apt-utils to important, to match the override file * apt@packages.debian.org/apt--main--0--patch-98 Install only one keyring on each branch (Closes: #316119) * apt@packages.debian.org/apt--main--0--patch-99 Finalize 0.6.39 * apt@packages.debian.org/apt--main--0--patch-100 Use debian.org address in mainline * apt@packages.debian.org/apt--main--0--patch-101 Update pot file * apt@packages.debian.org/apt--main--0--patch-102 Open 0.6.40 * apt@packages.debian.org/apt--main--0--patch-103 Patch from Jordi Mallach to mark some additional strings for translation * apt@packages.debian.org/apt--main--0--patch-104 Updated Catalan translation from Jordi Mallach * apt@packages.debian.org/apt--main--0--patch-105 Merge from bubulle@debian.org--2005/apt--main--0 * apt@packages.debian.org/apt--main--0--patch-106 Restore lost changelog entries * apt@packages.debian.org/apt--main--0--patch-107 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-108 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-109 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-110 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * bubulle@debian.org--2005/apt--main--0--patch-82 Fix permissions * bubulle@debian.org--2005/apt--main--0--patch-83 French translation spellchecked * bubulle@debian.org--2005/apt--main--0--patch-84 Spell corrections in German translations * bubulle@debian.org--2005/apt--main--0--patch-85 Correct some file permissions * bubulle@debian.org--2005/apt--main--0--patch-86 Correct Hebrew translation * bubulle@debian.org--2005/apt--main--0--patch-87 Sync Portuguese translation with the POT file * bubulle@debian.org--2005/apt--main--0--patch-88 Updated Danish translation (not yet complete) * bubulle@debian.org--2005/apt--main--0--patch-89 Sync with Andre Luis Lopes and Otavio branches * bubulle@debian.org--2005/apt--main--0--patch-90 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-91 Updated Slovak translation * bubulle@debian.org--2005/apt--main--0--patch-92 Add apt-key French man page * bubulle@debian.org--2005/apt--main--0--patch-93 Update Greek translations * bubulle@debian.org--2005/apt--main--0--patch-94 Merge with Matt * bubulle@debian.org--2005/apt--main--0--patch-95 Sync PO files with the POT file/French translation update * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-5 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-6 * build fix for apt--main--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-22 * added myself to uploaders, changelog is signed with mvo@debian.org and in sync with the debian/experimental upload * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-23 * apt-cache show <virtual-pkg> shows all virtual packages instead of nothing (thanks to otavio) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-24 * changelog updated * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-25 * make pinning on component work again (we just use the section, as apt-0.6 don't use per-section Release files anymore) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-27 * updated the changelog * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-28 * merged with my apt--fixes--0 branch * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-29 * added a missing OpProgress::Done() in depCache::Init(), removed the show-virtual-packages patch in apt-cache because matt does not like him :/ * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-30 * fix a stupid bug in the depcache::Init() code * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-31 * merged/removed conflicts with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-32 * merged apt--main and make sure that the po files come from apt--main (because they are more recent) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-85 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-1 * inital proof of concept code, understands what dpkg tells it already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-2 * progress reporting works now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-3 * added "APT::Status-Fd" variable * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-4 * do i18n now too * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-5 * define N_(x) if it is not defined already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-6 * PackageManager::DoInstall(int status_fd) added (does not break the ABI) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-7 * merged with apt--fixes--0 to make it build again * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-8 * added support for "error" and "conffile-prompt" messages from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-9 merge with main * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-10 * use sizeof() for all snprintf() uses; fix a potential line break problem in the status reading code; changed the N_() to _() calls * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-11 * added APT::KeepFDs configuration list for file descriptors that apt should leave open (needed for various frontends like debconf, synaptic) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-12 * fixed a API breakage * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-13 * doc added, should be releasable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-14 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-15 * more source comments, added Debug::DpkgPM debug code to inspect the dpkg<->apt communication, broke the abi (ok with matt) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-16 * the progress reporting has it's own "Debug::pkgDPkgProgressReporting" debug variable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-17 * merged PackageOps and TranslatedPackageOps into a single Map with the new DpkgState struct * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-18 * clear the APT::Keep-Fds configuration when it's no longer needed * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-19 * rewrote the reading from dpkg so that it never blocks * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-20 * merged the two status arrays into one * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-21 * added support for download progress reporting too (for Kamion and base-config) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-22 * ABI break; added Configuration::Clear(string List, {int,string} value) added (to remove a single Value from a list); test/conf_clear.cc added * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-23 * remvoed a debug string * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-24 * soname changed, fixed a bug in the parsing code when dpkg send the same state more than once (at the end) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-25 * merged with apt@packages.debian.org/apt--main--0, added changelog entry for the 0.6.40.1 upload * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-26 * fix a bug when out-of-order states are send from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-27 * changelog update * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-28 * a real changelog entry now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-29 * changelog finalized * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-30 * propper (and sane) support for pmerror and pmconffile added
16 years ago
Merge apt--authentication--0 Patches applied: * apt@arch.ubuntu.com/apt--experimental--0.6--base-0 tag of apt@arch.ubuntu.com/apt--MAIN--0--patch-1190 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-1 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-2 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-3 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-4 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-5 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-6 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-7 Merge working copy of v0.6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-8 0.6.0 is headed for experimental, not unstable * apt@arch.ubuntu.com/apt--experimental--0.6--patch-9 Date * apt@arch.ubuntu.com/apt--experimental--0.6--patch-10 Update LIB_APT_PKG_MAJOR * apt@arch.ubuntu.com/apt--experimental--0.6--patch-11 - Fix a heap corruption bug in pkgSrcRecords::pkgSrcRec... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-12 Resynch * apt@arch.ubuntu.com/apt--experimental--0.6--patch-13 * Merge apt 0.5.17 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-14 * Rearrange Release file authentication code to be more... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-15 * Convert distribution "../project/experimental" to "ex... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-16 Merge 1.11 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-17 Merge 1.7 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-18 Merge 1.10 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-19 * Make a number of Release file errors into warnings; f... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-20 * Add space between package names when multiple unauthe... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-21 * Provide apt-key with a secret keyring and a trustdb, ... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-22 * Fix typo in apt-key(8) (standard input is '-', not '/') * apt@arch.ubuntu.com/apt--experimental--0.6--patch-23 0.6.2 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-24 Resynch * apt@arch.ubuntu.com/apt--experimental--0.6--patch-25 * Fix MetaIndexURI for flat ("foo/") sources * apt@arch.ubuntu.com/apt--experimental--0.6--patch-26 0.6.3 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-27 * Use the top-level Release file in LoadReleaseInfo, ra... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-28 0.6.4 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-29 Clarify * apt@arch.ubuntu.com/apt--experimental--0.6--patch-30 * Move the authentication check into a separate functio... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-31 * Fix display of unauthenticated packages when they are... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-32 * Move the authentication check into a separate functio... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-33 * Restore the ugly hack I removed from indexRecords::Lo... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-34 0.6.6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-35 * Forgot to revert part of the changes to tagfile in 0.... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-36 * Add a config option and corresponding command line option * apt@arch.ubuntu.com/apt--experimental--0.6--patch-37 0.6.8 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-38 hopefully avoid more segfaults * apt@arch.ubuntu.com/apt--experimental--0.6--patch-39 XXX * apt@arch.ubuntu.com/apt--experimental--0.6--patch-40 * Another tagfile workaround * apt@arch.ubuntu.com/apt--experimental--0.6--patch-41 * Use "Codename" (woody, sarge, etc.) to supply the val... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-42 * Support IMS requests of Release.gpg and Release * apt@arch.ubuntu.com/apt--experimental--0.6--patch-43 * Have pkgAcquireIndex calculate an MD5 sum if one is n... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-44 * Merge 0.5.18 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-45 apt (0.6.13) experimental; urgency=low * apt@arch.ubuntu.com/apt--experimental--0.6--patch-46 0.6.13 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-47 Merge 0.5.20 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-48 The source list works a bit differently in 0.6; fix the... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-49 * s/Debug::Acquire::gpg/&v/ * apt@arch.ubuntu.com/apt--experimental--0.6--patch-50 * Honor the [vendor] syntax in sources.list again (thou... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-51 * Don't ship vendors.list(5) since it isn't used yet * apt@arch.ubuntu.com/apt--experimental--0.6--patch-52 * Revert change from 0.6.10; it was right in the first ... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-53 * Fix some cases where the .gpg file could be left in p... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-54 Print a warning if gnupg is not installed * apt@arch.ubuntu.com/apt--experimental--0.6--patch-55 * Handle more IMS stuff correctly * apt@arch.ubuntu.com/apt--experimental--0.6--patch-56 0.6.17 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-57 * Merge 0.5.21 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-58 * Add new Debian Archive Automatic Signing Key to the d... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-59 0.6.18 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-60 * Merge 0.5.22 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-61 * Convert apt-key(8) to docbook XML * apt@arch.ubuntu.com/apt--experimental--0.6--patch-62 Merge 0.5.23 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-63 Remove bogus partial 0.5.22 changelog entry * apt@arch.ubuntu.com/apt--experimental--0.6--patch-64 Make the auth warning a bit less redundant * apt@arch.ubuntu.com/apt--experimental--0.6--patch-65 * Merge 0.5.24 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-66 * Make the unauthenticated packages prompt more intuiti... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-67 Merge 0.5.25 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-68 * Remove obsolete pkgIterator::TargetVer() (Closes: #230159) * apt@arch.ubuntu.com/apt--experimental--0.6--patch-69 * Reverse test in CheckAuth to match new prompt (Closes... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-70 Update version * apt@arch.ubuntu.com/apt--experimental--0.6--patch-71 Fix backwards sense of CheckAuth prompt * apt@arch.ubuntu.com/apt--experimental--0.6--patch-72 0.6.24 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-73 Close bug * apt@arch.ubuntu.com/apt--experimental--0.6--patch-74 * Fix handling of two-part sources for sources.list deb... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-75 0.6.25 * apt@packages.debian.org/apt--authentication--0--base-0 tag of apt@arch.ubuntu.com/apt--experimental--0.6--patch-75 * apt@packages.debian.org/apt--authentication--0--patch-1 Michael Vogt's merge of apt--experimental--0 onto apt--main--0 * apt@packages.debian.org/apt--authentication--0--patch-2 Merge from apt--main--0 * apt@packages.debian.org/apt--authentication--0--patch-3 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-4 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-5 Update version number in configure.in * apt@packages.debian.org/apt--authentication--0--patch-6 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-7 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-8 Merge from mvo's branch * apt@packages.debian.org/apt--authentication--0--patch-9 Merge from mvo's tree * apt@packages.debian.org/apt--authentication--0--patch-10 Merge from mvo * apt@packages.debian.org/apt--authentication--0--patch-11 Fix permissions AGAIN * michael.vogt@canonical.com--2004--laptop/apt--authentication-mvo--0--base-0 tag of michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-12 * michael.vogt@canonical.com--2004--laptop/apt--authentication-mvo--0--patch-1 * star-merged matt's changes (bz2 support for data-members in debs) * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-1 tag of apt@packages.debian.org/apt--authentication--0--base-0 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-2 merged "tla apply-delta -A foo@ apt@arch.ubuntu.com/apt--MAIN--0--patch-1190 apt@arch.ubuntu.com/apt--MAIN--0--patch-1343" and cleaned up conflicts * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-3 * missing bits from the merge added * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-4 * star-merged with apt@packages.debian.org/apt--main--0 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-5 * tree-synced to the apt--authentication tree * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-6 * use the ubuntu-key in this version * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-7 * imported the patches from mdz * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-8 * apt-get update --print-uris works now as before (fallback to 0.5.x behaviour) * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-9 * fix for the "if any source unauthenticated, all other sources are unauthenticated too" problem * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-10 * reworked the "--print-uris" patch. it no longer uses: "APT::Get::Print-URIs" in the library * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-11 * version of the library set to 3.6 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-12 * changelog finallized, will upload to people.ubuntulinux.org/~mvo/apt-authentication * michael.vogt@canonical.com--2004/apt--main-authentication--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-22 * michael.vogt@canonical.com--2004/apt--main-authentication--0--patch-1 * star-merge from apt--experimental--0.6 * michael.vogt@canonical.com--2004/apt--main-authentication--0--patch-2 * compile failure fix for methods/http.cc, po-file fixes
17 years ago
Merge apt--authentication--0 Patches applied: * apt@arch.ubuntu.com/apt--experimental--0.6--base-0 tag of apt@arch.ubuntu.com/apt--MAIN--0--patch-1190 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-1 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-2 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-3 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-4 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-5 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-6 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-7 Merge working copy of v0.6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-8 0.6.0 is headed for experimental, not unstable * apt@arch.ubuntu.com/apt--experimental--0.6--patch-9 Date * apt@arch.ubuntu.com/apt--experimental--0.6--patch-10 Update LIB_APT_PKG_MAJOR * apt@arch.ubuntu.com/apt--experimental--0.6--patch-11 - Fix a heap corruption bug in pkgSrcRecords::pkgSrcRec... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-12 Resynch * apt@arch.ubuntu.com/apt--experimental--0.6--patch-13 * Merge apt 0.5.17 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-14 * Rearrange Release file authentication code to be more... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-15 * Convert distribution "../project/experimental" to "ex... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-16 Merge 1.11 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-17 Merge 1.7 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-18 Merge 1.10 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-19 * Make a number of Release file errors into warnings; f... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-20 * Add space between package names when multiple unauthe... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-21 * Provide apt-key with a secret keyring and a trustdb, ... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-22 * Fix typo in apt-key(8) (standard input is '-', not '/') * apt@arch.ubuntu.com/apt--experimental--0.6--patch-23 0.6.2 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-24 Resynch * apt@arch.ubuntu.com/apt--experimental--0.6--patch-25 * Fix MetaIndexURI for flat ("foo/") sources * apt@arch.ubuntu.com/apt--experimental--0.6--patch-26 0.6.3 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-27 * Use the top-level Release file in LoadReleaseInfo, ra... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-28 0.6.4 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-29 Clarify * apt@arch.ubuntu.com/apt--experimental--0.6--patch-30 * Move the authentication check into a separate functio... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-31 * Fix display of unauthenticated packages when they are... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-32 * Move the authentication check into a separate functio... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-33 * Restore the ugly hack I removed from indexRecords::Lo... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-34 0.6.6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-35 * Forgot to revert part of the changes to tagfile in 0.... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-36 * Add a config option and corresponding command line option * apt@arch.ubuntu.com/apt--experimental--0.6--patch-37 0.6.8 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-38 hopefully avoid more segfaults * apt@arch.ubuntu.com/apt--experimental--0.6--patch-39 XXX * apt@arch.ubuntu.com/apt--experimental--0.6--patch-40 * Another tagfile workaround * apt@arch.ubuntu.com/apt--experimental--0.6--patch-41 * Use "Codename" (woody, sarge, etc.) to supply the val... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-42 * Support IMS requests of Release.gpg and Release * apt@arch.ubuntu.com/apt--experimental--0.6--patch-43 * Have pkgAcquireIndex calculate an MD5 sum if one is n... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-44 * Merge 0.5.18 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-45 apt (0.6.13) experimental; urgency=low * apt@arch.ubuntu.com/apt--experimental--0.6--patch-46 0.6.13 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-47 Merge 0.5.20 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-48 The source list works a bit differently in 0.6; fix the... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-49 * s/Debug::Acquire::gpg/&v/ * apt@arch.ubuntu.com/apt--experimental--0.6--patch-50 * Honor the [vendor] syntax in sources.list again (thou... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-51 * Don't ship vendors.list(5) since it isn't used yet * apt@arch.ubuntu.com/apt--experimental--0.6--patch-52 * Revert change from 0.6.10; it was right in the first ... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-53 * Fix some cases where the .gpg file could be left in p... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-54 Print a warning if gnupg is not installed * apt@arch.ubuntu.com/apt--experimental--0.6--patch-55 * Handle more IMS stuff correctly * apt@arch.ubuntu.com/apt--experimental--0.6--patch-56 0.6.17 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-57 * Merge 0.5.21 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-58 * Add new Debian Archive Automatic Signing Key to the d... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-59 0.6.18 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-60 * Merge 0.5.22 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-61 * Convert apt-key(8) to docbook XML * apt@arch.ubuntu.com/apt--experimental--0.6--patch-62 Merge 0.5.23 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-63 Remove bogus partial 0.5.22 changelog entry * apt@arch.ubuntu.com/apt--experimental--0.6--patch-64 Make the auth warning a bit less redundant * apt@arch.ubuntu.com/apt--experimental--0.6--patch-65 * Merge 0.5.24 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-66 * Make the unauthenticated packages prompt more intuiti... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-67 Merge 0.5.25 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-68 * Remove obsolete pkgIterator::TargetVer() (Closes: #230159) * apt@arch.ubuntu.com/apt--experimental--0.6--patch-69 * Reverse test in CheckAuth to match new prompt (Closes... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-70 Update version * apt@arch.ubuntu.com/apt--experimental--0.6--patch-71 Fix backwards sense of CheckAuth prompt * apt@arch.ubuntu.com/apt--experimental--0.6--patch-72 0.6.24 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-73 Close bug * apt@arch.ubuntu.com/apt--experimental--0.6--patch-74 * Fix handling of two-part sources for sources.list deb... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-75 0.6.25 * apt@packages.debian.org/apt--authentication--0--base-0 tag of apt@arch.ubuntu.com/apt--experimental--0.6--patch-75 * apt@packages.debian.org/apt--authentication--0--patch-1 Michael Vogt's merge of apt--experimental--0 onto apt--main--0 * apt@packages.debian.org/apt--authentication--0--patch-2 Merge from apt--main--0 * apt@packages.debian.org/apt--authentication--0--patch-3 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-4 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-5 Update version number in configure.in * apt@packages.debian.org/apt--authentication--0--patch-6 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-7 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-8 Merge from mvo's branch * apt@packages.debian.org/apt--authentication--0--patch-9 Merge from mvo's tree * apt@packages.debian.org/apt--authentication--0--patch-10 Merge from mvo * apt@packages.debian.org/apt--authentication--0--patch-11 Fix permissions AGAIN * michael.vogt@canonical.com--2004--laptop/apt--authentication-mvo--0--base-0 tag of michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-12 * michael.vogt@canonical.com--2004--laptop/apt--authentication-mvo--0--patch-1 * star-merged matt's changes (bz2 support for data-members in debs) * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-1 tag of apt@packages.debian.org/apt--authentication--0--base-0 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-2 merged "tla apply-delta -A foo@ apt@arch.ubuntu.com/apt--MAIN--0--patch-1190 apt@arch.ubuntu.com/apt--MAIN--0--patch-1343" and cleaned up conflicts * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-3 * missing bits from the merge added * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-4 * star-merged with apt@packages.debian.org/apt--main--0 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-5 * tree-synced to the apt--authentication tree * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-6 * use the ubuntu-key in this version * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-7 * imported the patches from mdz * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-8 * apt-get update --print-uris works now as before (fallback to 0.5.x behaviour) * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-9 * fix for the "if any source unauthenticated, all other sources are unauthenticated too" problem * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-10 * reworked the "--print-uris" patch. it no longer uses: "APT::Get::Print-URIs" in the library * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-11 * version of the library set to 3.6 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-12 * changelog finallized, will upload to people.ubuntulinux.org/~mvo/apt-authentication * michael.vogt@canonical.com--2004/apt--main-authentication--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-22 * michael.vogt@canonical.com--2004/apt--main-authentication--0--patch-1 * star-merge from apt--experimental--0.6 * michael.vogt@canonical.com--2004/apt--main-authentication--0--patch-2 * compile failure fix for methods/http.cc, po-file fixes
17 years ago
Merge apt--authentication--0 Patches applied: * apt@arch.ubuntu.com/apt--experimental--0.6--base-0 tag of apt@arch.ubuntu.com/apt--MAIN--0--patch-1190 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-1 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-2 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-3 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-4 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-5 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-6 Creation of branch v0_6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-7 Merge working copy of v0.6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-8 0.6.0 is headed for experimental, not unstable * apt@arch.ubuntu.com/apt--experimental--0.6--patch-9 Date * apt@arch.ubuntu.com/apt--experimental--0.6--patch-10 Update LIB_APT_PKG_MAJOR * apt@arch.ubuntu.com/apt--experimental--0.6--patch-11 - Fix a heap corruption bug in pkgSrcRecords::pkgSrcRec... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-12 Resynch * apt@arch.ubuntu.com/apt--experimental--0.6--patch-13 * Merge apt 0.5.17 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-14 * Rearrange Release file authentication code to be more... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-15 * Convert distribution "../project/experimental" to "ex... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-16 Merge 1.11 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-17 Merge 1.7 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-18 Merge 1.10 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-19 * Make a number of Release file errors into warnings; f... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-20 * Add space between package names when multiple unauthe... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-21 * Provide apt-key with a secret keyring and a trustdb, ... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-22 * Fix typo in apt-key(8) (standard input is '-', not '/') * apt@arch.ubuntu.com/apt--experimental--0.6--patch-23 0.6.2 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-24 Resynch * apt@arch.ubuntu.com/apt--experimental--0.6--patch-25 * Fix MetaIndexURI for flat ("foo/") sources * apt@arch.ubuntu.com/apt--experimental--0.6--patch-26 0.6.3 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-27 * Use the top-level Release file in LoadReleaseInfo, ra... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-28 0.6.4 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-29 Clarify * apt@arch.ubuntu.com/apt--experimental--0.6--patch-30 * Move the authentication check into a separate functio... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-31 * Fix display of unauthenticated packages when they are... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-32 * Move the authentication check into a separate functio... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-33 * Restore the ugly hack I removed from indexRecords::Lo... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-34 0.6.6 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-35 * Forgot to revert part of the changes to tagfile in 0.... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-36 * Add a config option and corresponding command line option * apt@arch.ubuntu.com/apt--experimental--0.6--patch-37 0.6.8 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-38 hopefully avoid more segfaults * apt@arch.ubuntu.com/apt--experimental--0.6--patch-39 XXX * apt@arch.ubuntu.com/apt--experimental--0.6--patch-40 * Another tagfile workaround * apt@arch.ubuntu.com/apt--experimental--0.6--patch-41 * Use "Codename" (woody, sarge, etc.) to supply the val... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-42 * Support IMS requests of Release.gpg and Release * apt@arch.ubuntu.com/apt--experimental--0.6--patch-43 * Have pkgAcquireIndex calculate an MD5 sum if one is n... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-44 * Merge 0.5.18 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-45 apt (0.6.13) experimental; urgency=low * apt@arch.ubuntu.com/apt--experimental--0.6--patch-46 0.6.13 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-47 Merge 0.5.20 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-48 The source list works a bit differently in 0.6; fix the... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-49 * s/Debug::Acquire::gpg/&v/ * apt@arch.ubuntu.com/apt--experimental--0.6--patch-50 * Honor the [vendor] syntax in sources.list again (thou... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-51 * Don't ship vendors.list(5) since it isn't used yet * apt@arch.ubuntu.com/apt--experimental--0.6--patch-52 * Revert change from 0.6.10; it was right in the first ... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-53 * Fix some cases where the .gpg file could be left in p... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-54 Print a warning if gnupg is not installed * apt@arch.ubuntu.com/apt--experimental--0.6--patch-55 * Handle more IMS stuff correctly * apt@arch.ubuntu.com/apt--experimental--0.6--patch-56 0.6.17 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-57 * Merge 0.5.21 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-58 * Add new Debian Archive Automatic Signing Key to the d... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-59 0.6.18 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-60 * Merge 0.5.22 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-61 * Convert apt-key(8) to docbook XML * apt@arch.ubuntu.com/apt--experimental--0.6--patch-62 Merge 0.5.23 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-63 Remove bogus partial 0.5.22 changelog entry * apt@arch.ubuntu.com/apt--experimental--0.6--patch-64 Make the auth warning a bit less redundant * apt@arch.ubuntu.com/apt--experimental--0.6--patch-65 * Merge 0.5.24 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-66 * Make the unauthenticated packages prompt more intuiti... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-67 Merge 0.5.25 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-68 * Remove obsolete pkgIterator::TargetVer() (Closes: #230159) * apt@arch.ubuntu.com/apt--experimental--0.6--patch-69 * Reverse test in CheckAuth to match new prompt (Closes... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-70 Update version * apt@arch.ubuntu.com/apt--experimental--0.6--patch-71 Fix backwards sense of CheckAuth prompt * apt@arch.ubuntu.com/apt--experimental--0.6--patch-72 0.6.24 * apt@arch.ubuntu.com/apt--experimental--0.6--patch-73 Close bug * apt@arch.ubuntu.com/apt--experimental--0.6--patch-74 * Fix handling of two-part sources for sources.list deb... * apt@arch.ubuntu.com/apt--experimental--0.6--patch-75 0.6.25 * apt@packages.debian.org/apt--authentication--0--base-0 tag of apt@arch.ubuntu.com/apt--experimental--0.6--patch-75 * apt@packages.debian.org/apt--authentication--0--patch-1 Michael Vogt's merge of apt--experimental--0 onto apt--main--0 * apt@packages.debian.org/apt--authentication--0--patch-2 Merge from apt--main--0 * apt@packages.debian.org/apt--authentication--0--patch-3 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-4 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-5 Update version number in configure.in * apt@packages.debian.org/apt--authentication--0--patch-6 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-7 Merge from main * apt@packages.debian.org/apt--authentication--0--patch-8 Merge from mvo's branch * apt@packages.debian.org/apt--authentication--0--patch-9 Merge from mvo's tree * apt@packages.debian.org/apt--authentication--0--patch-10 Merge from mvo * apt@packages.debian.org/apt--authentication--0--patch-11 Fix permissions AGAIN * michael.vogt@canonical.com--2004--laptop/apt--authentication-mvo--0--base-0 tag of michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-12 * michael.vogt@canonical.com--2004--laptop/apt--authentication-mvo--0--patch-1 * star-merged matt's changes (bz2 support for data-members in debs) * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-1 tag of apt@packages.debian.org/apt--authentication--0--base-0 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-2 merged "tla apply-delta -A foo@ apt@arch.ubuntu.com/apt--MAIN--0--patch-1190 apt@arch.ubuntu.com/apt--MAIN--0--patch-1343" and cleaned up conflicts * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-3 * missing bits from the merge added * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-4 * star-merged with apt@packages.debian.org/apt--main--0 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-5 * tree-synced to the apt--authentication tree * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-6 * use the ubuntu-key in this version * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-7 * imported the patches from mdz * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-8 * apt-get update --print-uris works now as before (fallback to 0.5.x behaviour) * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-9 * fix for the "if any source unauthenticated, all other sources are unauthenticated too" problem * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-10 * reworked the "--print-uris" patch. it no longer uses: "APT::Get::Print-URIs" in the library * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-11 * version of the library set to 3.6 * michael.vogt@canonical.com--2004/apt--authentication-mvo--0--patch-12 * changelog finallized, will upload to people.ubuntulinux.org/~mvo/apt-authentication * michael.vogt@canonical.com--2004/apt--main-authentication--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-22 * michael.vogt@canonical.com--2004/apt--main-authentication--0--patch-1 * star-merge from apt--experimental--0.6 * michael.vogt@canonical.com--2004/apt--main-authentication--0--patch-2 * compile failure fix for methods/http.cc, po-file fixes
17 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: apt-cache.cc,v 1.72 2004/04/30 04:34:03 mdz Exp $
  4. /* ######################################################################
  5. apt-cache - Manages the cache files
  6. apt-cache provides some functions fo manipulating the cache files.
  7. It uses the command line interface common to all the APT tools.
  8. Returns 100 on failure, 0 on success.
  9. ##################################################################### */
  10. /*}}}*/
  11. // Include Files /*{{{*/
  12. #include<config.h>
  13. #include <apt-pkg/algorithms.h>
  14. #include <apt-pkg/cachefile.h>
  15. #include <apt-pkg/cacheset.h>
  16. #include <apt-pkg/cmndline.h>
  17. #include <apt-pkg/error.h>
  18. #include <apt-pkg/fileutl.h>
  19. #include <apt-pkg/indexfile.h>
  20. #include <apt-pkg/init.h>
  21. #include <apt-pkg/metaindex.h>
  22. #include <apt-pkg/pkgrecords.h>
  23. #include <apt-pkg/pkgsystem.h>
  24. #include <apt-pkg/policy.h>
  25. #include <apt-pkg/progress.h>
  26. #include <apt-pkg/sourcelist.h>
  27. #include <apt-pkg/sptr.h>
  28. #include <apt-pkg/srcrecords.h>
  29. #include <apt-pkg/strutl.h>
  30. #include <apt-pkg/tagfile.h>
  31. #include <apt-pkg/version.h>
  32. #include <apt-pkg/cacheiterators.h>
  33. #include <apt-pkg/configuration.h>
  34. #include <apt-pkg/depcache.h>
  35. #include <apt-pkg/macros.h>
  36. #include <apt-pkg/mmap.h>
  37. #include <apt-pkg/pkgcache.h>
  38. #include <apt-private/private-cacheset.h>
  39. #include <apt-private/private-cmndline.h>
  40. #include <regex.h>
  41. #include <stddef.h>
  42. #include <stdio.h>
  43. #include <stdlib.h>
  44. #include <unistd.h>
  45. #include <algorithm>
  46. #include <cstring>
  47. #include <iomanip>
  48. #include <iostream>
  49. #include <list>
  50. #include <map>
  51. #include <set>
  52. #include <string>
  53. #include <vector>
  54. #include <apti18n.h>
  55. /*}}}*/
  56. using namespace std;
  57. // LocalitySort - Sort a version list by package file locality /*{{{*/
  58. // ---------------------------------------------------------------------
  59. /* */
  60. static int LocalityCompare(const void *a, const void *b)
  61. {
  62. pkgCache::VerFile *A = *(pkgCache::VerFile **)a;
  63. pkgCache::VerFile *B = *(pkgCache::VerFile **)b;
  64. if (A == 0 && B == 0)
  65. return 0;
  66. if (A == 0)
  67. return 1;
  68. if (B == 0)
  69. return -1;
  70. if (A->File == B->File)
  71. return A->Offset - B->Offset;
  72. return A->File - B->File;
  73. }
  74. static void LocalitySort(pkgCache::VerFile **begin,
  75. unsigned long Count,size_t Size)
  76. {
  77. qsort(begin,Count,Size,LocalityCompare);
  78. }
  79. static void LocalitySort(pkgCache::DescFile **begin,
  80. unsigned long Count,size_t Size)
  81. {
  82. qsort(begin,Count,Size,LocalityCompare);
  83. }
  84. /*}}}*/
  85. // UnMet - Show unmet dependencies /*{{{*/
  86. // ---------------------------------------------------------------------
  87. /* */
  88. static bool ShowUnMet(pkgCache::VerIterator const &V, bool const Important)
  89. {
  90. bool Header = false;
  91. for (pkgCache::DepIterator D = V.DependsList(); D.end() == false;)
  92. {
  93. // Collect or groups
  94. pkgCache::DepIterator Start;
  95. pkgCache::DepIterator End;
  96. D.GlobOr(Start,End);
  97. // Important deps only
  98. if (Important == true)
  99. if (End->Type != pkgCache::Dep::PreDepends &&
  100. End->Type != pkgCache::Dep::Depends)
  101. continue;
  102. // Skip conflicts and replaces
  103. if (End.IsNegative() == true || End->Type == pkgCache::Dep::Replaces)
  104. continue;
  105. // Verify the or group
  106. bool OK = false;
  107. pkgCache::DepIterator RealStart = Start;
  108. do
  109. {
  110. // See if this dep is Ok
  111. pkgCache::Version **VList = Start.AllTargets();
  112. if (*VList != 0)
  113. {
  114. OK = true;
  115. delete [] VList;
  116. break;
  117. }
  118. delete [] VList;
  119. if (Start == End)
  120. break;
  121. ++Start;
  122. }
  123. while (1);
  124. // The group is OK
  125. if (OK == true)
  126. continue;
  127. // Oops, it failed..
  128. if (Header == false)
  129. ioprintf(cout,_("Package %s version %s has an unmet dep:\n"),
  130. V.ParentPkg().FullName(true).c_str(),V.VerStr());
  131. Header = true;
  132. // Print out the dep type
  133. cout << " " << End.DepType() << ": ";
  134. // Show the group
  135. Start = RealStart;
  136. do
  137. {
  138. cout << Start.TargetPkg().FullName(true);
  139. if (Start.TargetVer() != 0)
  140. cout << " (" << Start.CompType() << " " << Start.TargetVer() <<
  141. ")";
  142. if (Start == End)
  143. break;
  144. cout << " | ";
  145. ++Start;
  146. }
  147. while (1);
  148. cout << endl;
  149. }
  150. return true;
  151. }
  152. static bool UnMet(CommandLine &CmdL)
  153. {
  154. bool const Important = _config->FindB("APT::Cache::Important",false);
  155. pkgCacheFile CacheFile;
  156. if (unlikely(CacheFile.GetPkgCache() == NULL))
  157. return false;
  158. if (CmdL.FileSize() <= 1)
  159. {
  160. for (pkgCache::PkgIterator P = CacheFile.GetPkgCache()->PkgBegin(); P.end() == false; ++P)
  161. for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V)
  162. if (ShowUnMet(V, Important) == false)
  163. return false;
  164. }
  165. else
  166. {
  167. CacheSetHelperVirtuals helper(true, GlobalError::NOTICE);
  168. APT::VersionList verset = APT::VersionList::FromCommandLine(CacheFile, CmdL.FileList + 1,
  169. APT::CacheSetHelper::CANDIDATE, helper);
  170. for (APT::VersionList::iterator V = verset.begin(); V != verset.end(); ++V)
  171. if (ShowUnMet(V, Important) == false)
  172. return false;
  173. }
  174. return true;
  175. }
  176. /*}}}*/
  177. // DumpPackage - Show a dump of a package record /*{{{*/
  178. // ---------------------------------------------------------------------
  179. /* */
  180. static bool DumpPackage(CommandLine &CmdL)
  181. {
  182. pkgCacheFile CacheFile;
  183. APT::CacheSetHelper helper(true, GlobalError::NOTICE);
  184. APT::PackageList pkgset = APT::PackageList::FromCommandLine(CacheFile, CmdL.FileList + 1, helper);
  185. for (APT::PackageList::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
  186. {
  187. cout << "Package: " << Pkg.FullName(true) << endl;
  188. cout << "Versions: " << endl;
  189. for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; ++Cur)
  190. {
  191. cout << Cur.VerStr();
  192. for (pkgCache::VerFileIterator Vf = Cur.FileList(); Vf.end() == false; ++Vf)
  193. cout << " (" << Vf.File().FileName() << ")";
  194. cout << endl;
  195. for (pkgCache::DescIterator D = Cur.DescriptionList(); D.end() == false; ++D)
  196. {
  197. cout << " Description Language: " << D.LanguageCode() << endl
  198. << " File: " << D.FileList().File().FileName() << endl
  199. << " MD5: " << D.md5() << endl;
  200. }
  201. cout << endl;
  202. }
  203. cout << endl;
  204. cout << "Reverse Depends: " << endl;
  205. for (pkgCache::DepIterator D = Pkg.RevDependsList(); D.end() != true; ++D)
  206. {
  207. cout << " " << D.ParentPkg().FullName(true) << ',' << D.TargetPkg().FullName(true);
  208. if (D->Version != 0)
  209. cout << ' ' << DeNull(D.TargetVer()) << endl;
  210. else
  211. cout << endl;
  212. }
  213. cout << "Dependencies: " << endl;
  214. for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; ++Cur)
  215. {
  216. cout << Cur.VerStr() << " - ";
  217. for (pkgCache::DepIterator Dep = Cur.DependsList(); Dep.end() != true; ++Dep)
  218. cout << Dep.TargetPkg().FullName(true) << " (" << (int)Dep->CompareOp << " " << DeNull(Dep.TargetVer()) << ") ";
  219. cout << endl;
  220. }
  221. cout << "Provides: " << endl;
  222. for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; ++Cur)
  223. {
  224. cout << Cur.VerStr() << " - ";
  225. for (pkgCache::PrvIterator Prv = Cur.ProvidesList(); Prv.end() != true; ++Prv)
  226. cout << Prv.ParentPkg().FullName(true) << " (= " << (Prv->ProvideVersion == 0 ? "" : Prv.ProvideVersion()) << ") ";
  227. cout << endl;
  228. }
  229. cout << "Reverse Provides: " << endl;
  230. for (pkgCache::PrvIterator Prv = Pkg.ProvidesList(); Prv.end() != true; ++Prv)
  231. cout << Prv.OwnerPkg().FullName(true) << " " << Prv.OwnerVer().VerStr() << " (= " << (Prv->ProvideVersion == 0 ? "" : Prv.ProvideVersion()) << ")"<< endl;
  232. }
  233. return true;
  234. }
  235. /*}}}*/
  236. // ShowHashTableStats - Show stats about a hashtable /*{{{*/
  237. // ---------------------------------------------------------------------
  238. /* */
  239. static map_pointer_t PackageNext(pkgCache::Package const * const P) { return P->NextPackage; }
  240. static map_pointer_t GroupNext(pkgCache::Group const * const G) { return G->Next; }
  241. template<class T>
  242. static void ShowHashTableStats(std::string Type,
  243. T *StartP,
  244. map_pointer_t *Hashtable,
  245. unsigned long Size,
  246. map_pointer_t(*Next)(T const * const))
  247. {
  248. // hashtable stats for the HashTable
  249. unsigned long NumBuckets = Size;
  250. unsigned long UsedBuckets = 0;
  251. unsigned long UnusedBuckets = 0;
  252. unsigned long LongestBucket = 0;
  253. unsigned long ShortestBucket = NumBuckets;
  254. unsigned long Entries = 0;
  255. for (unsigned int i=0; i < NumBuckets; ++i)
  256. {
  257. T *P = StartP + Hashtable[i];
  258. if(P == 0 || P == StartP)
  259. {
  260. ++UnusedBuckets;
  261. continue;
  262. }
  263. ++UsedBuckets;
  264. unsigned long ThisBucketSize = 0;
  265. for (; P != StartP; P = StartP + Next(P))
  266. ++ThisBucketSize;
  267. Entries += ThisBucketSize;
  268. LongestBucket = std::max(ThisBucketSize, LongestBucket);
  269. ShortestBucket = std::min(ThisBucketSize, ShortestBucket);
  270. }
  271. cout << "Total buckets in " << Type << ": " << NumBuckets << std::endl;
  272. cout << " Unused: " << UnusedBuckets << std::endl;
  273. cout << " Used: " << UsedBuckets << std::endl;
  274. cout << " Average entries: " << Entries/(double)NumBuckets << std::endl;
  275. cout << " Longest: " << LongestBucket << std::endl;
  276. cout << " Shortest: " << ShortestBucket << std::endl;
  277. }
  278. /*}}}*/
  279. // Stats - Dump some nice statistics /*{{{*/
  280. // ---------------------------------------------------------------------
  281. /* */
  282. static bool Stats(CommandLine &CmdL)
  283. {
  284. pkgCacheFile CacheFile;
  285. pkgCache *Cache = CacheFile.GetPkgCache();
  286. if (CmdL.FileSize() > 1) {
  287. _error->Error(_("apt-cache stats does not take any arguments"));
  288. return false;
  289. }
  290. if (unlikely(Cache == NULL))
  291. return false;
  292. cout << _("Total package names: ") << Cache->Head().GroupCount << " (" <<
  293. SizeToStr(Cache->Head().GroupCount*Cache->Head().GroupSz) << ')' << endl
  294. << _("Total package structures: ") << Cache->Head().PackageCount << " (" <<
  295. SizeToStr(Cache->Head().PackageCount*Cache->Head().PackageSz) << ')' << endl;
  296. int Normal = 0;
  297. int Virtual = 0;
  298. int NVirt = 0;
  299. int DVirt = 0;
  300. int Missing = 0;
  301. pkgCache::PkgIterator I = Cache->PkgBegin();
  302. for (;I.end() != true; ++I)
  303. {
  304. if (I->VersionList != 0 && I->ProvidesList == 0)
  305. {
  306. Normal++;
  307. continue;
  308. }
  309. if (I->VersionList != 0 && I->ProvidesList != 0)
  310. {
  311. NVirt++;
  312. continue;
  313. }
  314. if (I->VersionList == 0 && I->ProvidesList != 0)
  315. {
  316. // Only 1 provides
  317. if (I.ProvidesList()->NextProvides == 0)
  318. {
  319. DVirt++;
  320. }
  321. else
  322. Virtual++;
  323. continue;
  324. }
  325. if (I->VersionList == 0 && I->ProvidesList == 0)
  326. {
  327. Missing++;
  328. continue;
  329. }
  330. }
  331. cout << _(" Normal packages: ") << Normal << endl;
  332. cout << _(" Pure virtual packages: ") << Virtual << endl;
  333. cout << _(" Single virtual packages: ") << DVirt << endl;
  334. cout << _(" Mixed virtual packages: ") << NVirt << endl;
  335. cout << _(" Missing: ") << Missing << endl;
  336. cout << _("Total distinct versions: ") << Cache->Head().VersionCount << " (" <<
  337. SizeToStr(Cache->Head().VersionCount*Cache->Head().VersionSz) << ')' << endl;
  338. cout << _("Total distinct descriptions: ") << Cache->Head().DescriptionCount << " (" <<
  339. SizeToStr(Cache->Head().DescriptionCount*Cache->Head().DescriptionSz) << ')' << endl;
  340. cout << _("Total dependencies: ") << Cache->Head().DependsCount << "/" << Cache->Head().DependsDataCount << " (" <<
  341. SizeToStr((Cache->Head().DependsCount*Cache->Head().DependencySz) +
  342. (Cache->Head().DependsDataCount*Cache->Head().DependencyDataSz)) << ')' << endl;
  343. cout << _("Total ver/file relations: ") << Cache->Head().VerFileCount << " (" <<
  344. SizeToStr(Cache->Head().VerFileCount*Cache->Head().VerFileSz) << ')' << endl;
  345. cout << _("Total Desc/File relations: ") << Cache->Head().DescFileCount << " (" <<
  346. SizeToStr(Cache->Head().DescFileCount*Cache->Head().DescFileSz) << ')' << endl;
  347. cout << _("Total Provides mappings: ") << Cache->Head().ProvidesCount << " (" <<
  348. SizeToStr(Cache->Head().ProvidesCount*Cache->Head().ProvidesSz) << ')' << endl;
  349. // String list stats
  350. std::set<map_stringitem_t> stritems;
  351. for (pkgCache::GrpIterator G = Cache->GrpBegin(); G.end() == false; ++G)
  352. stritems.insert(G->Name);
  353. for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; ++P)
  354. {
  355. stritems.insert(P->Arch);
  356. for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V)
  357. {
  358. if (V->VerStr != 0)
  359. stritems.insert(V->VerStr);
  360. if (V->Section != 0)
  361. stritems.insert(V->Section);
  362. stritems.insert(V->SourcePkgName);
  363. stritems.insert(V->SourceVerStr);
  364. for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; ++D)
  365. {
  366. if (D->Version != 0)
  367. stritems.insert(D->Version);
  368. }
  369. for (pkgCache::DescIterator D = V.DescriptionList(); D.end() == false; ++D)
  370. {
  371. stritems.insert(D->md5sum);
  372. stritems.insert(D->language_code);
  373. }
  374. }
  375. for (pkgCache::PrvIterator Prv = P.ProvidesList(); Prv.end() == false; ++Prv)
  376. {
  377. if (Prv->ProvideVersion != 0)
  378. stritems.insert(Prv->ProvideVersion);
  379. }
  380. }
  381. for (pkgCache::RlsFileIterator F = Cache->RlsFileBegin(); F != Cache->RlsFileEnd(); ++F)
  382. {
  383. stritems.insert(F->FileName);
  384. stritems.insert(F->Archive);
  385. stritems.insert(F->Codename);
  386. stritems.insert(F->Version);
  387. stritems.insert(F->Origin);
  388. stritems.insert(F->Label);
  389. stritems.insert(F->Site);
  390. }
  391. for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); ++F)
  392. {
  393. stritems.insert(F->FileName);
  394. stritems.insert(F->Architecture);
  395. stritems.insert(F->Component);
  396. stritems.insert(F->IndexType);
  397. }
  398. unsigned long Size = 0;
  399. for (std::set<map_stringitem_t>::const_iterator i = stritems.begin(); i != stritems.end(); ++i)
  400. Size += strlen(Cache->StrP + *i) + 1;
  401. cout << _("Total globbed strings: ") << stritems.size() << " (" << SizeToStr(Size) << ')' << endl;
  402. stritems.clear();
  403. unsigned long Slack = 0;
  404. for (int I = 0; I != 7; I++)
  405. Slack += Cache->Head().Pools[I].ItemSize*Cache->Head().Pools[I].Count;
  406. cout << _("Total slack space: ") << SizeToStr(Slack) << endl;
  407. unsigned long Total = 0;
  408. #define APT_CACHESIZE(X,Y) (Cache->Head().X * Cache->Head().Y)
  409. Total = Slack + Size +
  410. APT_CACHESIZE(GroupCount, GroupSz) +
  411. APT_CACHESIZE(PackageCount, PackageSz) +
  412. APT_CACHESIZE(VersionCount, VersionSz) +
  413. APT_CACHESIZE(DescriptionCount, DescriptionSz) +
  414. APT_CACHESIZE(DependsCount, DependencySz) +
  415. APT_CACHESIZE(DependsDataCount, DependencyDataSz) +
  416. APT_CACHESIZE(ReleaseFileCount, ReleaseFileSz) +
  417. APT_CACHESIZE(PackageFileCount, PackageFileSz) +
  418. APT_CACHESIZE(VerFileCount, VerFileSz) +
  419. APT_CACHESIZE(DescFileCount, DescFileSz) +
  420. APT_CACHESIZE(ProvidesCount, ProvidesSz) +
  421. (2 * Cache->Head().GetHashTableSize() * sizeof(map_id_t));
  422. cout << _("Total space accounted for: ") << SizeToStr(Total) << endl;
  423. #undef APT_CACHESIZE
  424. // hashtable stats
  425. ShowHashTableStats<pkgCache::Package>("PkgHashTable", Cache->PkgP, Cache->Head().PkgHashTableP(), Cache->Head().GetHashTableSize(), PackageNext);
  426. ShowHashTableStats<pkgCache::Group>("GrpHashTable", Cache->GrpP, Cache->Head().GrpHashTableP(), Cache->Head().GetHashTableSize(), GroupNext);
  427. return true;
  428. }
  429. /*}}}*/
  430. // Dump - show everything /*{{{*/
  431. // ---------------------------------------------------------------------
  432. /* This is worthless except fer debugging things */
  433. static bool Dump(CommandLine &)
  434. {
  435. pkgCacheFile CacheFile;
  436. pkgCache *Cache = CacheFile.GetPkgCache();
  437. if (unlikely(Cache == NULL))
  438. return false;
  439. std::cout << "Using Versioning System: " << Cache->VS->Label << std::endl;
  440. for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; ++P)
  441. {
  442. std::cout << "Package: " << P.FullName(true) << std::endl;
  443. for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V)
  444. {
  445. std::cout << " Version: " << V.VerStr() << std::endl;
  446. std::cout << " File: " << V.FileList().File().FileName() << std::endl;
  447. for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; ++D)
  448. std::cout << " Depends: " << D.TargetPkg().FullName(true) << ' ' <<
  449. DeNull(D.TargetVer()) << std::endl;
  450. for (pkgCache::DescIterator D = V.DescriptionList(); D.end() == false; ++D)
  451. {
  452. std::cout << " Description Language: " << D.LanguageCode() << std::endl
  453. << " File: " << D.FileList().File().FileName() << std::endl
  454. << " MD5: " << D.md5() << std::endl;
  455. }
  456. }
  457. }
  458. for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F.end() == false; ++F)
  459. {
  460. std::cout << "File: " << F.FileName() << std::endl;
  461. std::cout << " Type: " << F.IndexType() << std::endl;
  462. std::cout << " Size: " << F->Size << std::endl;
  463. std::cout << " ID: " << F->ID << std::endl;
  464. std::cout << " Flags: " << F->Flags << std::endl;
  465. std::cout << " Time: " << TimeRFC1123(F->mtime) << std::endl;
  466. std::cout << " Archive: " << DeNull(F.Archive()) << std::endl;
  467. std::cout << " Component: " << DeNull(F.Component()) << std::endl;
  468. std::cout << " Version: " << DeNull(F.Version()) << std::endl;
  469. std::cout << " Origin: " << DeNull(F.Origin()) << std::endl;
  470. std::cout << " Site: " << DeNull(F.Site()) << std::endl;
  471. std::cout << " Label: " << DeNull(F.Label()) << std::endl;
  472. std::cout << " Architecture: " << DeNull(F.Architecture()) << std::endl;
  473. }
  474. return true;
  475. }
  476. /*}}}*/
  477. // DumpAvail - Print out the available list /*{{{*/
  478. // ---------------------------------------------------------------------
  479. /* This is needed to make dpkg --merge happy.. I spent a bit of time to
  480. make this run really fast, perhaps I went a little overboard.. */
  481. static bool DumpAvail(CommandLine &)
  482. {
  483. pkgCacheFile CacheFile;
  484. pkgCache *Cache = CacheFile.GetPkgCache();
  485. if (unlikely(Cache == NULL || CacheFile.BuildPolicy() == false))
  486. return false;
  487. unsigned long Count = Cache->HeaderP->PackageCount+1;
  488. pkgCache::VerFile **VFList = new pkgCache::VerFile *[Count];
  489. memset(VFList,0,sizeof(*VFList)*Count);
  490. // Map versions that we want to write out onto the VerList array.
  491. for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; ++P)
  492. {
  493. if (P->VersionList == 0)
  494. continue;
  495. /* Find the proper version to use. If the policy says there are no
  496. possible selections we return the installed version, if available..
  497. This prevents dselect from making it obsolete. */
  498. pkgCache::VerIterator V = CacheFile.GetPolicy()->GetCandidateVer(P);
  499. if (V.end() == true)
  500. {
  501. if (P->CurrentVer == 0)
  502. continue;
  503. V = P.CurrentVer();
  504. }
  505. pkgCache::VerFileIterator VF = V.FileList();
  506. for (; VF.end() == false ; ++VF)
  507. if ((VF.File()->Flags & pkgCache::Flag::NotSource) == 0)
  508. break;
  509. /* Okay, here we have a bit of a problem.. The policy has selected the
  510. currently installed package - however it only exists in the
  511. status file.. We need to write out something or dselect will mark
  512. the package as obsolete! Thus we emit the status file entry, but
  513. below we remove the status line to make it valid for the
  514. available file. However! We only do this if their do exist *any*
  515. non-source versions of the package - that way the dselect obsolete
  516. handling works OK. */
  517. if (VF.end() == true)
  518. {
  519. for (pkgCache::VerIterator Cur = P.VersionList(); Cur.end() != true; ++Cur)
  520. {
  521. for (VF = Cur.FileList(); VF.end() == false; ++VF)
  522. {
  523. if ((VF.File()->Flags & pkgCache::Flag::NotSource) == 0)
  524. {
  525. VF = V.FileList();
  526. break;
  527. }
  528. }
  529. if (VF.end() == false)
  530. break;
  531. }
  532. }
  533. VFList[P->ID] = VF;
  534. }
  535. LocalitySort(VFList,Count,sizeof(*VFList));
  536. std::vector<pkgTagSection::Tag> RW;
  537. RW.push_back(pkgTagSection::Tag::Remove("Status"));
  538. RW.push_back(pkgTagSection::Tag::Remove("Config-Version"));
  539. FileFd stdoutfd;
  540. stdoutfd.OpenDescriptor(STDOUT_FILENO, FileFd::WriteOnly, false);
  541. // Iterate over all the package files and write them out.
  542. char *Buffer = new char[Cache->HeaderP->MaxVerFileSize+10];
  543. for (pkgCache::VerFile **J = VFList; *J != 0;)
  544. {
  545. pkgCache::PkgFileIterator File(*Cache,(*J)->File + Cache->PkgFileP);
  546. if (File.IsOk() == false)
  547. {
  548. _error->Error(_("Package file %s is out of sync."),File.FileName());
  549. break;
  550. }
  551. FileFd PkgF(File.FileName(),FileFd::ReadOnly, FileFd::Extension);
  552. if (_error->PendingError() == true)
  553. break;
  554. /* Write all of the records from this package file, since we
  555. already did locality sorting we can now just seek through the
  556. file in read order. We apply 1 more optimization here, since often
  557. there will be < 1 byte gaps between records (for the \n) we read that
  558. into the next buffer and offset a bit.. */
  559. unsigned long Pos = 0;
  560. for (; *J != 0; J++)
  561. {
  562. if ((*J)->File + Cache->PkgFileP != File)
  563. break;
  564. const pkgCache::VerFile &VF = **J;
  565. // Read the record and then write it out again.
  566. unsigned long Jitter = VF.Offset - Pos;
  567. if (Jitter > 8)
  568. {
  569. if (PkgF.Seek(VF.Offset) == false)
  570. break;
  571. Jitter = 0;
  572. }
  573. if (PkgF.Read(Buffer,VF.Size + Jitter) == false)
  574. break;
  575. Buffer[VF.Size + Jitter] = '\n';
  576. // See above..
  577. if ((File->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource)
  578. {
  579. pkgTagSection Tags;
  580. if (Tags.Scan(Buffer+Jitter,VF.Size+1) == false ||
  581. Tags.Write(stdoutfd, NULL, RW) == false ||
  582. stdoutfd.Write("\n", 1) == false)
  583. {
  584. _error->Error("Internal Error, Unable to parse a package record");
  585. break;
  586. }
  587. }
  588. else
  589. {
  590. if (stdoutfd.Write(Buffer + Jitter, VF.Size + 1) == false)
  591. break;
  592. }
  593. Pos = VF.Offset + VF.Size;
  594. }
  595. if (_error->PendingError() == true)
  596. break;
  597. }
  598. delete [] Buffer;
  599. delete [] VFList;
  600. return !_error->PendingError();
  601. }
  602. /*}}}*/
  603. // ShowDepends - Helper for printing out a dependency tree /*{{{*/
  604. static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
  605. {
  606. pkgCacheFile CacheFile;
  607. pkgCache *Cache = CacheFile.GetPkgCache();
  608. if (unlikely(Cache == NULL))
  609. return false;
  610. CacheSetHelperVirtuals helper(false);
  611. APT::VersionList verset = APT::VersionList::FromCommandLine(CacheFile, CmdL.FileList + 1, APT::CacheSetHelper::CANDIDATE, helper);
  612. if (verset.empty() == true && helper.virtualPkgs.empty() == true)
  613. return _error->Error(_("No packages found"));
  614. std::vector<bool> Shown(Cache->Head().PackageCount);
  615. bool const Recurse = _config->FindB("APT::Cache::RecurseDepends", false);
  616. bool const Installed = _config->FindB("APT::Cache::Installed", false);
  617. bool const Important = _config->FindB("APT::Cache::Important", false);
  618. bool const ShowDepType = _config->FindB("APT::Cache::ShowDependencyType", RevDepends == false);
  619. bool const ShowVersion = _config->FindB("APT::Cache::ShowVersion", false);
  620. bool const ShowPreDepends = _config->FindB("APT::Cache::ShowPre-Depends", true);
  621. bool const ShowDepends = _config->FindB("APT::Cache::ShowDepends", true);
  622. bool const ShowRecommends = _config->FindB("APT::Cache::ShowRecommends", Important == false);
  623. bool const ShowSuggests = _config->FindB("APT::Cache::ShowSuggests", Important == false);
  624. bool const ShowReplaces = _config->FindB("APT::Cache::ShowReplaces", Important == false);
  625. bool const ShowConflicts = _config->FindB("APT::Cache::ShowConflicts", Important == false);
  626. bool const ShowBreaks = _config->FindB("APT::Cache::ShowBreaks", Important == false);
  627. bool const ShowEnhances = _config->FindB("APT::Cache::ShowEnhances", Important == false);
  628. bool const ShowOnlyFirstOr = _config->FindB("APT::Cache::ShowOnlyFirstOr", false);
  629. bool const ShowImplicit = _config->FindB("APT::Cache::ShowImplicit", false);
  630. while (verset.empty() != true)
  631. {
  632. pkgCache::VerIterator Ver = *verset.begin();
  633. verset.erase(verset.begin());
  634. pkgCache::PkgIterator Pkg = Ver.ParentPkg();
  635. Shown[Pkg->ID] = true;
  636. cout << Pkg.FullName(true) << endl;
  637. if (RevDepends == true)
  638. cout << "Reverse Depends:" << endl;
  639. for (pkgCache::DepIterator D = RevDepends ? Pkg.RevDependsList() : Ver.DependsList();
  640. D.end() == false; ++D)
  641. {
  642. switch (D->Type) {
  643. case pkgCache::Dep::PreDepends: if (!ShowPreDepends) continue; break;
  644. case pkgCache::Dep::Depends: if (!ShowDepends) continue; break;
  645. case pkgCache::Dep::Recommends: if (!ShowRecommends) continue; break;
  646. case pkgCache::Dep::Suggests: if (!ShowSuggests) continue; break;
  647. case pkgCache::Dep::Replaces: if (!ShowReplaces) continue; break;
  648. case pkgCache::Dep::Conflicts: if (!ShowConflicts) continue; break;
  649. case pkgCache::Dep::DpkgBreaks: if (!ShowBreaks) continue; break;
  650. case pkgCache::Dep::Enhances: if (!ShowEnhances) continue; break;
  651. }
  652. if (ShowImplicit == false && D.IsImplicit())
  653. continue;
  654. pkgCache::PkgIterator Trg = RevDepends ? D.ParentPkg() : D.TargetPkg();
  655. if((Installed && Trg->CurrentVer != 0) || !Installed)
  656. {
  657. if ((D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or && ShowOnlyFirstOr == false)
  658. cout << " |";
  659. else
  660. cout << " ";
  661. // Show the package
  662. if (ShowDepType == true)
  663. cout << D.DepType() << ": ";
  664. if (Trg->VersionList == 0)
  665. cout << "<" << Trg.FullName(true) << ">";
  666. else
  667. cout << Trg.FullName(true);
  668. if (ShowVersion == true && D->Version != 0)
  669. cout << " (" << pkgCache::CompTypeDeb(D->CompareOp) << ' ' << D.TargetVer() << ')';
  670. cout << std::endl;
  671. if (Recurse == true && Shown[Trg->ID] == false)
  672. {
  673. Shown[Trg->ID] = true;
  674. verset.insert(APT::VersionSet::FromPackage(CacheFile, Trg, APT::CacheSetHelper::CANDIDATE, helper));
  675. }
  676. }
  677. // Display all solutions
  678. std::unique_ptr<pkgCache::Version *[]> List(D.AllTargets());
  679. pkgPrioSortList(*Cache,List.get());
  680. for (pkgCache::Version **I = List.get(); *I != 0; I++)
  681. {
  682. pkgCache::VerIterator V(*Cache,*I);
  683. if (V != Cache->VerP + V.ParentPkg()->VersionList ||
  684. V->ParentPkg == D->Package)
  685. continue;
  686. cout << " " << V.ParentPkg().FullName(true) << endl;
  687. if (Recurse == true && Shown[V.ParentPkg()->ID] == false)
  688. {
  689. Shown[V.ParentPkg()->ID] = true;
  690. verset.insert(APT::VersionSet::FromPackage(CacheFile, V.ParentPkg(), APT::CacheSetHelper::CANDIDATE, helper));
  691. }
  692. }
  693. if (ShowOnlyFirstOr == true)
  694. while ((D->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or) ++D;
  695. }
  696. }
  697. for (APT::PackageSet::const_iterator Pkg = helper.virtualPkgs.begin();
  698. Pkg != helper.virtualPkgs.end(); ++Pkg)
  699. cout << '<' << Pkg.FullName(true) << '>' << endl;
  700. return true;
  701. }
  702. /*}}}*/
  703. // Depends - Print out a dependency tree /*{{{*/
  704. // ---------------------------------------------------------------------
  705. /* */
  706. static bool Depends(CommandLine &CmdL)
  707. {
  708. return ShowDepends(CmdL, false);
  709. }
  710. /*}}}*/
  711. // RDepends - Print out a reverse dependency tree /*{{{*/
  712. // ---------------------------------------------------------------------
  713. /* */
  714. static bool RDepends(CommandLine &CmdL)
  715. {
  716. return ShowDepends(CmdL, true);
  717. }
  718. /*}}}*/
  719. // xvcg - Generate a graph for xvcg /*{{{*/
  720. // ---------------------------------------------------------------------
  721. // Code contributed from Junichi Uekawa <dancer@debian.org> on 20 June 2002.
  722. static bool XVcg(CommandLine &CmdL)
  723. {
  724. pkgCacheFile CacheFile;
  725. pkgCache *Cache = CacheFile.GetPkgCache();
  726. if (unlikely(Cache == NULL))
  727. return false;
  728. bool GivenOnly = _config->FindB("APT::Cache::GivenOnly",false);
  729. /* Normal packages are boxes
  730. Pure Provides are triangles
  731. Mixed are diamonds
  732. rhomb are missing packages*/
  733. const char *Shapes[] = {"ellipse","triangle","box","rhomb"};
  734. /* Initialize the list of packages to show.
  735. 1 = To Show
  736. 2 = To Show no recurse
  737. 3 = Emitted no recurse
  738. 4 = Emitted
  739. 0 = None */
  740. enum States {None=0, ToShow, ToShowNR, DoneNR, Done};
  741. enum TheFlags {ForceNR=(1<<0)};
  742. unsigned char *Show = new unsigned char[Cache->Head().PackageCount];
  743. unsigned char *Flags = new unsigned char[Cache->Head().PackageCount];
  744. unsigned char *ShapeMap = new unsigned char[Cache->Head().PackageCount];
  745. // Show everything if no arguments given
  746. if (CmdL.FileList[1] == 0)
  747. for (unsigned long I = 0; I != Cache->Head().PackageCount; I++)
  748. Show[I] = ToShow;
  749. else
  750. for (unsigned long I = 0; I != Cache->Head().PackageCount; I++)
  751. Show[I] = None;
  752. memset(Flags,0,sizeof(*Flags)*Cache->Head().PackageCount);
  753. // Map the shapes
  754. for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg)
  755. {
  756. if (Pkg->VersionList == 0)
  757. {
  758. // Missing
  759. if (Pkg->ProvidesList == 0)
  760. ShapeMap[Pkg->ID] = 0;
  761. else
  762. ShapeMap[Pkg->ID] = 1;
  763. }
  764. else
  765. {
  766. // Normal
  767. if (Pkg->ProvidesList == 0)
  768. ShapeMap[Pkg->ID] = 2;
  769. else
  770. ShapeMap[Pkg->ID] = 3;
  771. }
  772. }
  773. // Load the list of packages from the command line into the show list
  774. APT::CacheSetHelper helper(true, GlobalError::NOTICE);
  775. std::list<APT::CacheSetHelper::PkgModifier> mods;
  776. mods.push_back(APT::CacheSetHelper::PkgModifier(0, ",", APT::PackageSet::Modifier::POSTFIX));
  777. mods.push_back(APT::CacheSetHelper::PkgModifier(1, "^", APT::PackageSet::Modifier::POSTFIX));
  778. std::map<unsigned short, APT::PackageSet> pkgsets =
  779. APT::PackageSet::GroupedFromCommandLine(CacheFile, CmdL.FileList + 1, mods, 0, helper);
  780. for (APT::PackageSet::const_iterator Pkg = pkgsets[0].begin();
  781. Pkg != pkgsets[0].end(); ++Pkg)
  782. Show[Pkg->ID] = ToShow;
  783. for (APT::PackageSet::const_iterator Pkg = pkgsets[1].begin();
  784. Pkg != pkgsets[1].end(); ++Pkg)
  785. {
  786. Show[Pkg->ID] = ToShow;
  787. Flags[Pkg->ID] |= ForceNR;
  788. }
  789. // Little header
  790. cout << "graph: { title: \"packages\"" << endl <<
  791. "xmax: 700 ymax: 700 x: 30 y: 30" << endl <<
  792. "layout_downfactor: 8" << endl;
  793. bool Act = true;
  794. while (Act == true)
  795. {
  796. Act = false;
  797. for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg)
  798. {
  799. // See we need to show this package
  800. if (Show[Pkg->ID] == None || Show[Pkg->ID] >= DoneNR)
  801. continue;
  802. //printf ("node: { title: \"%s\" label: \"%s\" }\n", Pkg.Name(), Pkg.Name());
  803. // Colour as done
  804. if (Show[Pkg->ID] == ToShowNR || (Flags[Pkg->ID] & ForceNR) == ForceNR)
  805. {
  806. // Pure Provides and missing packages have no deps!
  807. if (ShapeMap[Pkg->ID] == 0 || ShapeMap[Pkg->ID] == 1)
  808. Show[Pkg->ID] = Done;
  809. else
  810. Show[Pkg->ID] = DoneNR;
  811. }
  812. else
  813. Show[Pkg->ID] = Done;
  814. Act = true;
  815. // No deps to map out
  816. if (Pkg->VersionList == 0 || Show[Pkg->ID] == DoneNR)
  817. continue;
  818. pkgCache::VerIterator Ver = Pkg.VersionList();
  819. for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; ++D)
  820. {
  821. // See if anything can meet this dep
  822. // Walk along the actual package providing versions
  823. bool Hit = false;
  824. pkgCache::PkgIterator DPkg = D.TargetPkg();
  825. for (pkgCache::VerIterator I = DPkg.VersionList();
  826. I.end() == false && Hit == false; ++I)
  827. {
  828. if (Cache->VS->CheckDep(I.VerStr(),D->CompareOp,D.TargetVer()) == true)
  829. Hit = true;
  830. }
  831. // Follow all provides
  832. for (pkgCache::PrvIterator I = DPkg.ProvidesList();
  833. I.end() == false && Hit == false; ++I)
  834. {
  835. if (Cache->VS->CheckDep(I.ProvideVersion(),D->CompareOp,D.TargetVer()) == false)
  836. Hit = true;
  837. }
  838. // Only graph critical deps
  839. if (D.IsCritical() == true)
  840. {
  841. printf ("edge: { sourcename: \"%s\" targetname: \"%s\" class: 2 ",Pkg.FullName(true).c_str(), D.TargetPkg().FullName(true).c_str() );
  842. // Colour the node for recursion
  843. if (Show[D.TargetPkg()->ID] <= DoneNR)
  844. {
  845. /* If a conflicts does not meet anything in the database
  846. then show the relation but do not recurse */
  847. if (Hit == false && D.IsNegative() == true)
  848. {
  849. if (Show[D.TargetPkg()->ID] == None &&
  850. Show[D.TargetPkg()->ID] != ToShow)
  851. Show[D.TargetPkg()->ID] = ToShowNR;
  852. }
  853. else
  854. {
  855. if (GivenOnly == true && Show[D.TargetPkg()->ID] != ToShow)
  856. Show[D.TargetPkg()->ID] = ToShowNR;
  857. else
  858. Show[D.TargetPkg()->ID] = ToShow;
  859. }
  860. }
  861. // Edge colour
  862. switch(D->Type)
  863. {
  864. case pkgCache::Dep::Conflicts:
  865. printf("label: \"conflicts\" color: lightgreen }\n");
  866. break;
  867. case pkgCache::Dep::DpkgBreaks:
  868. printf("label: \"breaks\" color: lightgreen }\n");
  869. break;
  870. case pkgCache::Dep::Obsoletes:
  871. printf("label: \"obsoletes\" color: lightgreen }\n");
  872. break;
  873. case pkgCache::Dep::PreDepends:
  874. printf("label: \"predepends\" color: blue }\n");
  875. break;
  876. default:
  877. printf("}\n");
  878. break;
  879. }
  880. }
  881. }
  882. }
  883. }
  884. /* Draw the box colours after the fact since we can not tell what colour
  885. they should be until everything is finished drawing */
  886. for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg)
  887. {
  888. if (Show[Pkg->ID] < DoneNR)
  889. continue;
  890. if (Show[Pkg->ID] == DoneNR)
  891. printf("node: { title: \"%s\" label: \"%s\" color: orange shape: %s }\n", Pkg.FullName(true).c_str(), Pkg.FullName(true).c_str(),
  892. Shapes[ShapeMap[Pkg->ID]]);
  893. else
  894. printf("node: { title: \"%s\" label: \"%s\" shape: %s }\n", Pkg.FullName(true).c_str(), Pkg.FullName(true).c_str(),
  895. Shapes[ShapeMap[Pkg->ID]]);
  896. }
  897. delete[] Show;
  898. delete[] Flags;
  899. delete[] ShapeMap;
  900. printf("}\n");
  901. return true;
  902. }
  903. /*}}}*/
  904. // Dotty - Generate a graph for Dotty /*{{{*/
  905. // ---------------------------------------------------------------------
  906. /* Dotty is the graphvis program for generating graphs. It is a fairly
  907. simple queuing algorithm that just writes dependencies and nodes.
  908. http://www.research.att.com/sw/tools/graphviz/ */
  909. static bool Dotty(CommandLine &CmdL)
  910. {
  911. pkgCacheFile CacheFile;
  912. pkgCache *Cache = CacheFile.GetPkgCache();
  913. if (unlikely(Cache == NULL))
  914. return false;
  915. bool GivenOnly = _config->FindB("APT::Cache::GivenOnly",false);
  916. /* Normal packages are boxes
  917. Pure Provides are triangles
  918. Mixed are diamonds
  919. Hexagons are missing packages*/
  920. const char *Shapes[] = {"hexagon","triangle","box","diamond"};
  921. /* Initialize the list of packages to show.
  922. 1 = To Show
  923. 2 = To Show no recurse
  924. 3 = Emitted no recurse
  925. 4 = Emitted
  926. 0 = None */
  927. enum States {None=0, ToShow, ToShowNR, DoneNR, Done};
  928. enum TheFlags {ForceNR=(1<<0)};
  929. unsigned char *Show = new unsigned char[Cache->Head().PackageCount];
  930. unsigned char *Flags = new unsigned char[Cache->Head().PackageCount];
  931. unsigned char *ShapeMap = new unsigned char[Cache->Head().PackageCount];
  932. // Show everything if no arguments given
  933. if (CmdL.FileList[1] == 0)
  934. for (unsigned long I = 0; I != Cache->Head().PackageCount; I++)
  935. Show[I] = ToShow;
  936. else
  937. for (unsigned long I = 0; I != Cache->Head().PackageCount; I++)
  938. Show[I] = None;
  939. memset(Flags,0,sizeof(*Flags)*Cache->Head().PackageCount);
  940. // Map the shapes
  941. for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg)
  942. {
  943. if (Pkg->VersionList == 0)
  944. {
  945. // Missing
  946. if (Pkg->ProvidesList == 0)
  947. ShapeMap[Pkg->ID] = 0;
  948. else
  949. ShapeMap[Pkg->ID] = 1;
  950. }
  951. else
  952. {
  953. // Normal
  954. if (Pkg->ProvidesList == 0)
  955. ShapeMap[Pkg->ID] = 2;
  956. else
  957. ShapeMap[Pkg->ID] = 3;
  958. }
  959. }
  960. // Load the list of packages from the command line into the show list
  961. APT::CacheSetHelper helper(true, GlobalError::NOTICE);
  962. std::list<APT::CacheSetHelper::PkgModifier> mods;
  963. mods.push_back(APT::CacheSetHelper::PkgModifier(0, ",", APT::PackageSet::Modifier::POSTFIX));
  964. mods.push_back(APT::CacheSetHelper::PkgModifier(1, "^", APT::PackageSet::Modifier::POSTFIX));
  965. std::map<unsigned short, APT::PackageSet> pkgsets =
  966. APT::PackageSet::GroupedFromCommandLine(CacheFile, CmdL.FileList + 1, mods, 0, helper);
  967. for (APT::PackageSet::const_iterator Pkg = pkgsets[0].begin();
  968. Pkg != pkgsets[0].end(); ++Pkg)
  969. Show[Pkg->ID] = ToShow;
  970. for (APT::PackageSet::const_iterator Pkg = pkgsets[1].begin();
  971. Pkg != pkgsets[1].end(); ++Pkg)
  972. {
  973. Show[Pkg->ID] = ToShow;
  974. Flags[Pkg->ID] |= ForceNR;
  975. }
  976. // Little header
  977. printf("digraph packages {\n");
  978. printf("concentrate=true;\n");
  979. printf("size=\"30,40\";\n");
  980. bool Act = true;
  981. while (Act == true)
  982. {
  983. Act = false;
  984. for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg)
  985. {
  986. // See we need to show this package
  987. if (Show[Pkg->ID] == None || Show[Pkg->ID] >= DoneNR)
  988. continue;
  989. // Colour as done
  990. if (Show[Pkg->ID] == ToShowNR || (Flags[Pkg->ID] & ForceNR) == ForceNR)
  991. {
  992. // Pure Provides and missing packages have no deps!
  993. if (ShapeMap[Pkg->ID] == 0 || ShapeMap[Pkg->ID] == 1)
  994. Show[Pkg->ID] = Done;
  995. else
  996. Show[Pkg->ID] = DoneNR;
  997. }
  998. else
  999. Show[Pkg->ID] = Done;
  1000. Act = true;
  1001. // No deps to map out
  1002. if (Pkg->VersionList == 0 || Show[Pkg->ID] == DoneNR)
  1003. continue;
  1004. pkgCache::VerIterator Ver = Pkg.VersionList();
  1005. for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; ++D)
  1006. {
  1007. // See if anything can meet this dep
  1008. // Walk along the actual package providing versions
  1009. bool Hit = false;
  1010. pkgCache::PkgIterator DPkg = D.TargetPkg();
  1011. for (pkgCache::VerIterator I = DPkg.VersionList();
  1012. I.end() == false && Hit == false; ++I)
  1013. {
  1014. if (Cache->VS->CheckDep(I.VerStr(),D->CompareOp,D.TargetVer()) == true)
  1015. Hit = true;
  1016. }
  1017. // Follow all provides
  1018. for (pkgCache::PrvIterator I = DPkg.ProvidesList();
  1019. I.end() == false && Hit == false; ++I)
  1020. {
  1021. if (Cache->VS->CheckDep(I.ProvideVersion(),D->CompareOp,D.TargetVer()) == false)
  1022. Hit = true;
  1023. }
  1024. // Only graph critical deps
  1025. if (D.IsCritical() == true)
  1026. {
  1027. printf("\"%s\" -> \"%s\"",Pkg.FullName(true).c_str(),D.TargetPkg().FullName(true).c_str());
  1028. // Colour the node for recursion
  1029. if (Show[D.TargetPkg()->ID] <= DoneNR)
  1030. {
  1031. /* If a conflicts does not meet anything in the database
  1032. then show the relation but do not recurse */
  1033. if (Hit == false && D.IsNegative() == true)
  1034. {
  1035. if (Show[D.TargetPkg()->ID] == None &&
  1036. Show[D.TargetPkg()->ID] != ToShow)
  1037. Show[D.TargetPkg()->ID] = ToShowNR;
  1038. }
  1039. else
  1040. {
  1041. if (GivenOnly == true && Show[D.TargetPkg()->ID] != ToShow)
  1042. Show[D.TargetPkg()->ID] = ToShowNR;
  1043. else
  1044. Show[D.TargetPkg()->ID] = ToShow;
  1045. }
  1046. }
  1047. // Edge colour
  1048. switch(D->Type)
  1049. {
  1050. case pkgCache::Dep::Conflicts:
  1051. case pkgCache::Dep::Obsoletes:
  1052. case pkgCache::Dep::DpkgBreaks:
  1053. printf("[color=springgreen];\n");
  1054. break;
  1055. case pkgCache::Dep::PreDepends:
  1056. printf("[color=blue];\n");
  1057. break;
  1058. default:
  1059. printf(";\n");
  1060. break;
  1061. }
  1062. }
  1063. }
  1064. }
  1065. }
  1066. /* Draw the box colours after the fact since we can not tell what colour
  1067. they should be until everything is finished drawing */
  1068. for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); Pkg.end() == false; ++Pkg)
  1069. {
  1070. if (Show[Pkg->ID] < DoneNR)
  1071. continue;
  1072. // Orange box for early recursion stoppage
  1073. if (Show[Pkg->ID] == DoneNR)
  1074. printf("\"%s\" [color=orange,shape=%s];\n",Pkg.FullName(true).c_str(),
  1075. Shapes[ShapeMap[Pkg->ID]]);
  1076. else
  1077. printf("\"%s\" [shape=%s];\n",Pkg.FullName(true).c_str(),
  1078. Shapes[ShapeMap[Pkg->ID]]);
  1079. }
  1080. printf("}\n");
  1081. delete[] Show;
  1082. delete[] Flags;
  1083. delete[] ShapeMap;
  1084. return true;
  1085. }
  1086. /*}}}*/
  1087. // DisplayRecord - Displays the complete record for the package /*{{{*/
  1088. // ---------------------------------------------------------------------
  1089. /* This displays the package record from the proper package index file.
  1090. It is not used by DumpAvail for performance reasons. */
  1091. static APT_PURE unsigned char const* skipDescriptionFields(unsigned char const * DescP)
  1092. {
  1093. char const * const TagName = "\nDescription";
  1094. size_t const TagLen = strlen(TagName);
  1095. while ((DescP = (unsigned char*)strchr((char*)DescP, '\n')) != NULL)
  1096. {
  1097. if (DescP[1] == ' ')
  1098. DescP += 2;
  1099. else if (strncmp((char*)DescP, TagName, TagLen) == 0)
  1100. DescP += TagLen;
  1101. else
  1102. break;
  1103. }
  1104. if (DescP != NULL)
  1105. ++DescP;
  1106. return DescP;
  1107. }
  1108. static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V)
  1109. {
  1110. pkgCache *Cache = CacheFile.GetPkgCache();
  1111. if (unlikely(Cache == NULL))
  1112. return false;
  1113. // Find an appropriate file
  1114. pkgCache::VerFileIterator Vf = V.FileList();
  1115. for (; Vf.end() == false; ++Vf)
  1116. if ((Vf.File()->Flags & pkgCache::Flag::NotSource) == 0)
  1117. break;
  1118. if (Vf.end() == true)
  1119. Vf = V.FileList();
  1120. // Check and load the package list file
  1121. pkgCache::PkgFileIterator I = Vf.File();
  1122. if (I.IsOk() == false)
  1123. return _error->Error(_("Package file %s is out of sync."),I.FileName());
  1124. FileFd PkgF;
  1125. if (PkgF.Open(I.FileName(), FileFd::ReadOnly, FileFd::Extension) == false)
  1126. return false;
  1127. // Read the record (and ensure that it ends with a newline and NUL)
  1128. unsigned char *Buffer = new unsigned char[Cache->HeaderP->MaxVerFileSize+2];
  1129. Buffer[Vf->Size] = '\n';
  1130. Buffer[Vf->Size+1] = '\0';
  1131. if (PkgF.Seek(Vf->Offset) == false ||
  1132. PkgF.Read(Buffer,Vf->Size) == false)
  1133. {
  1134. delete [] Buffer;
  1135. return false;
  1136. }
  1137. // Get a pointer to start of Description field
  1138. const unsigned char *DescP = (unsigned char*)strstr((char*)Buffer, "\nDescription");
  1139. if (DescP != NULL)
  1140. ++DescP;
  1141. else
  1142. DescP = Buffer + Vf->Size;
  1143. // Write all but Description
  1144. size_t const length = DescP - Buffer;
  1145. if (length != 0 && FileFd::Write(STDOUT_FILENO, Buffer, length) == false)
  1146. {
  1147. delete [] Buffer;
  1148. return false;
  1149. }
  1150. // Show the right description
  1151. pkgRecords Recs(*Cache);
  1152. pkgCache::DescIterator Desc = V.TranslatedDescription();
  1153. if (Desc.end() == false)
  1154. {
  1155. pkgRecords::Parser &P = Recs.Lookup(Desc.FileList());
  1156. cout << "Description" << ( (strcmp(Desc.LanguageCode(),"") != 0) ? "-" : "" ) << Desc.LanguageCode() << ": " << P.LongDesc();
  1157. cout << std::endl << "Description-md5: " << Desc.md5() << std::endl;
  1158. // Find the first field after the description (if there is any)
  1159. DescP = skipDescriptionFields(DescP);
  1160. }
  1161. // else we have no translation, so we found a lonely Description-md5 -> don't skip it
  1162. // write the rest of the buffer, but skip mixed in Descriptions* fields
  1163. while (DescP != NULL)
  1164. {
  1165. const unsigned char * const Start = DescP;
  1166. const unsigned char *End = (unsigned char*)strstr((char*)DescP, "\nDescription");
  1167. if (End == NULL)
  1168. {
  1169. End = &Buffer[Vf->Size];
  1170. DescP = NULL;
  1171. }
  1172. else
  1173. {
  1174. ++End; // get the newline into the output
  1175. DescP = skipDescriptionFields(End + strlen("Description"));
  1176. }
  1177. size_t const length = End - Start;
  1178. if (length != 0 && FileFd::Write(STDOUT_FILENO, Start, length) == false)
  1179. {
  1180. delete [] Buffer;
  1181. return false;
  1182. }
  1183. }
  1184. // write a final newline after the last field
  1185. cout<<endl;
  1186. delete [] Buffer;
  1187. return true;
  1188. }
  1189. /*}}}*/
  1190. struct ExDescFile
  1191. {
  1192. pkgCache::DescFile *Df;
  1193. pkgCache::VerIterator V;
  1194. map_id_t ID;
  1195. };
  1196. // Search - Perform a search /*{{{*/
  1197. // ---------------------------------------------------------------------
  1198. /* This searches the package names and package descriptions for a pattern */
  1199. static bool Search(CommandLine &CmdL)
  1200. {
  1201. bool const ShowFull = _config->FindB("APT::Cache::ShowFull",false);
  1202. bool const NamesOnly = _config->FindB("APT::Cache::NamesOnly",false);
  1203. unsigned int const NumPatterns = CmdL.FileSize() -1;
  1204. pkgCacheFile CacheFile;
  1205. pkgCache *Cache = CacheFile.GetPkgCache();
  1206. pkgDepCache::Policy *Plcy = CacheFile.GetPolicy();
  1207. if (unlikely(Cache == NULL || Plcy == NULL))
  1208. return false;
  1209. // Make sure there is at least one argument
  1210. if (NumPatterns < 1)
  1211. return _error->Error(_("You must give at least one search pattern"));
  1212. // Compile the regex pattern
  1213. regex_t *Patterns = new regex_t[NumPatterns];
  1214. memset(Patterns,0,sizeof(*Patterns)*NumPatterns);
  1215. for (unsigned I = 0; I != NumPatterns; I++)
  1216. {
  1217. if (regcomp(&Patterns[I],CmdL.FileList[I+1],REG_EXTENDED | REG_ICASE |
  1218. REG_NOSUB) != 0)
  1219. {
  1220. for (; I != 0; I--)
  1221. regfree(&Patterns[I]);
  1222. return _error->Error("Regex compilation error");
  1223. }
  1224. }
  1225. if (_error->PendingError() == true)
  1226. {
  1227. for (unsigned I = 0; I != NumPatterns; I++)
  1228. regfree(&Patterns[I]);
  1229. return false;
  1230. }
  1231. size_t const descCount = Cache->HeaderP->GroupCount + 1;
  1232. ExDescFile *DFList = new ExDescFile[descCount];
  1233. memset(DFList,0,sizeof(*DFList) * descCount);
  1234. bool *PatternMatch = new bool[descCount * NumPatterns];
  1235. memset(PatternMatch,false,sizeof(*PatternMatch) * descCount * NumPatterns);
  1236. // Map versions that we want to write out onto the VerList array.
  1237. for (pkgCache::GrpIterator G = Cache->GrpBegin(); G.end() == false; ++G)
  1238. {
  1239. size_t const PatternOffset = G->ID * NumPatterns;
  1240. size_t unmatched = 0, matched = 0;
  1241. for (unsigned I = 0; I < NumPatterns; ++I)
  1242. {
  1243. if (PatternMatch[PatternOffset + I] == true)
  1244. ++matched;
  1245. else if (regexec(&Patterns[I],G.Name(),0,0,0) == 0)
  1246. PatternMatch[PatternOffset + I] = true;
  1247. else
  1248. ++unmatched;
  1249. }
  1250. // already dealt with this package?
  1251. if (matched == NumPatterns)
  1252. continue;
  1253. // Doing names only, drop any that don't match..
  1254. if (NamesOnly == true && unmatched == NumPatterns)
  1255. continue;
  1256. // Find the proper version to use
  1257. pkgCache::PkgIterator P = G.FindPreferredPkg();
  1258. if (P.end() == true)
  1259. continue;
  1260. pkgCache::VerIterator V = Plcy->GetCandidateVer(P);
  1261. if (V.end() == false)
  1262. {
  1263. pkgCache::DescIterator const D = V.TranslatedDescription();
  1264. //FIXME: packages without a description can't be found
  1265. if (D.end() == true)
  1266. continue;
  1267. DFList[G->ID].Df = D.FileList();
  1268. DFList[G->ID].V = V;
  1269. DFList[G->ID].ID = G->ID;
  1270. }
  1271. if (unmatched == NumPatterns)
  1272. continue;
  1273. // Include all the packages that provide matching names too
  1274. for (pkgCache::PrvIterator Prv = P.ProvidesList() ; Prv.end() == false; ++Prv)
  1275. {
  1276. pkgCache::VerIterator V = Plcy->GetCandidateVer(Prv.OwnerPkg());
  1277. if (V.end() == true)
  1278. continue;
  1279. unsigned long id = Prv.OwnerPkg().Group()->ID;
  1280. pkgCache::DescIterator const D = V.TranslatedDescription();
  1281. //FIXME: packages without a description can't be found
  1282. if (D.end() == true)
  1283. continue;
  1284. DFList[id].Df = D.FileList();
  1285. DFList[id].V = V;
  1286. DFList[id].ID = id;
  1287. size_t const PrvPatternOffset = id * NumPatterns;
  1288. for (unsigned I = 0; I < NumPatterns; ++I)
  1289. PatternMatch[PrvPatternOffset + I] |= PatternMatch[PatternOffset + I];
  1290. }
  1291. }
  1292. LocalitySort(&DFList->Df,Cache->HeaderP->GroupCount,sizeof(*DFList));
  1293. // Create the text record parser
  1294. pkgRecords Recs(*Cache);
  1295. // Iterate over all the version records and check them
  1296. for (ExDescFile *J = DFList; J->Df != 0; ++J)
  1297. {
  1298. pkgRecords::Parser &P = Recs.Lookup(pkgCache::DescFileIterator(*Cache,J->Df));
  1299. size_t const PatternOffset = J->ID * NumPatterns;
  1300. if (NamesOnly == false)
  1301. {
  1302. string const LongDesc = P.LongDesc();
  1303. for (unsigned I = 0; I < NumPatterns; ++I)
  1304. {
  1305. if (PatternMatch[PatternOffset + I] == true)
  1306. continue;
  1307. else if (regexec(&Patterns[I],LongDesc.c_str(),0,0,0) == 0)
  1308. PatternMatch[PatternOffset + I] = true;
  1309. }
  1310. }