summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmdline/apt-get.cc132
-rw-r--r--debian/changelog7
-rw-r--r--po/apt-all.pot175
3 files changed, 174 insertions, 140 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index b419a05d9..7b7780a48 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1611,68 +1611,86 @@ bool DoInstall(CommandLine &CmdL)
string SuggestsVersions, RecommendsVersions;
for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
{
- pkgCache::PkgIterator I(Cache,Cache.List[J]);
+ pkgCache::PkgIterator Pkg(Cache,Cache.List[J]);
/* Just look at the ones we want to install */
- if ((*Cache)[I].Install() == false)
+ if ((*Cache)[Pkg].Install() == false)
continue;
- for (pkgCache::VerIterator V = I.VersionList(); V.end() == false; V++)
- {
- for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; )
- {
- pkgCache::DepIterator Start;
- pkgCache::DepIterator End;
- D.GlobOr(Start,End); // advances D
-
- /*
- * If this is a virtual package, we need to check the list of
- * packages that provide it and see if any of those are
- * installed
- */
-
- bool providedBySomething = false;
- for (pkgCache::PrvIterator Prv = Start.TargetPkg().ProvidesList();
- Prv.end() != true;
- Prv++)
- if ((*Cache)[Prv.OwnerPkg()].InstVerIter(*Cache).end() == false)
- {
- providedBySomething = true;
- break;
- }
-
- if (providedBySomething) continue;
-
- for(;;)
- {
- /* Skip if package is installed already, or is about to be */
- string target = string(Start.TargetPkg().Name()) + " ";
-
- if ((*Start.TargetPkg()).SelectedState == pkgCache::State::Install
- || Cache[Start.TargetPkg()].Install())
- break;
-
- /* Skip if we already saw it */
- if (int(SuggestsList.find(target)) != -1 || int(RecommendsList.find(target)) != -1)
- break;
-
- if (Start->Type == pkgCache::Dep::Suggests) {
- SuggestsList += target;
- SuggestsVersions += string(Cache[Start.TargetPkg()].CandVersion) + "\n";
- }
-
- if (Start->Type == pkgCache::Dep::Recommends) {
- RecommendsList += target;
- RecommendsVersions += string(Cache[Start.TargetPkg()].CandVersion) + "\n";
- }
-
- if (Start >= End)
- break;
- Start++;
- }
- }
- }
+ // get the recommends/suggests for the candidate ver
+ pkgCache::VerIterator CV = (*Cache)[Pkg].CandidateVerIter(*Cache);
+ for (pkgCache::DepIterator D = CV.DependsList(); D.end() == false; )
+ {
+ pkgCache::DepIterator Start;
+ pkgCache::DepIterator End;
+ D.GlobOr(Start,End); // advances D
+
+ // FIXME: we really should display a or-group as a or-group to the user
+ // the problem is that ShowList is incapable of doing this
+ string RecommendsOrList,RecommendsOrVersions;
+ string SuggestsOrList,SuggestsOrVersions;
+ bool foundInstalledInOrGroup = false;
+ for(;;)
+ {
+ /* Skip if package is installed already, or is about to be */
+ string target = string(Start.TargetPkg().Name()) + " ";
+
+ if ((*Start.TargetPkg()).SelectedState == pkgCache::State::Install
+ || Cache[Start.TargetPkg()].Install())
+ {
+ foundInstalledInOrGroup=true;
+ break;
+ }
+
+ /* Skip if we already saw it */
+ if (int(SuggestsList.find(target)) != -1 || int(RecommendsList.find(target)) != -1)
+ {
+ foundInstalledInOrGroup=true;
+ break;
+ }
+
+ // this is a dep on a virtual pkg, check if any package that provides it
+ // should be installed
+ if(Start.TargetPkg().ProvidesList() != 0)
+ {
+ pkgCache::PrvIterator I = Start.TargetPkg().ProvidesList();
+ for (; I.end() == false; I++)
+ {
+ pkgCache::PkgIterator Pkg = I.OwnerPkg();
+ if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer() &&
+ Pkg.CurrentVer() != 0)
+ foundInstalledInOrGroup=true;
+ }
+ }
+
+ if (Start->Type == pkgCache::Dep::Suggests)
+ {
+ SuggestsOrList += target;
+ SuggestsOrVersions += string(Cache[Start.TargetPkg()].CandVersion) + "\n";
+ }
+
+ if (Start->Type == pkgCache::Dep::Recommends)
+ {
+ RecommendsOrList += target;
+ RecommendsOrVersions += string(Cache[Start.TargetPkg()].CandVersion) + "\n";
+ }
+
+ if (Start >= End)
+ break;
+ Start++;
+ }
+
+ if(foundInstalledInOrGroup == false)
+ {
+ RecommendsList += RecommendsOrList;
+ RecommendsVersions += RecommendsOrVersions;
+ SuggestsList += SuggestsOrList;
+ SuggestsVersions += SuggestsOrVersions;
+ }
+
+ }
}
+
ShowList(c1out,_("Suggested packages:"),SuggestsList,SuggestsVersions);
ShowList(c1out,_("Recommended packages:"),RecommendsList,RecommendsVersions);
diff --git a/debian/changelog b/debian/changelog
index ec802a80c..de9a43d49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,12 @@
apt (0.6.45.1) unstable; urgency=low
* debian/control:
- - switched to libdb4.4 for building
+ - switched to libdb4.4 for building (closes: #381019)
+ * cmdline/apt-get.cc:
+ - show only the recommends/suggests for the candidate-version, not for all
+ versions of the package (closes: #257054)
+ - properly handle recommends/suggests or-groups when printing the list of
+ suggested/recommends packages (closes: #311619)
-- Michael Vogt <michael.vogt@ubuntu.com> Wed, 9 Aug 2006 14:27:54 +0200
diff --git a/po/apt-all.pot b/po/apt-all.pot
index 6929345af..095de7f6d 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-05-27 13:46+0200\n"
+"POT-Creation-Date: 2006-08-09 16:17+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -148,7 +148,7 @@ msgstr ""
#: cmdline/apt-cache.cc:1652 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
#: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:550
-#: cmdline/apt-get.cc:2369 cmdline/apt-sortpkgs.cc:144
+#: cmdline/apt-get.cc:2380 cmdline/apt-sortpkgs.cc:144
#, c-format
msgid "%s %s for %s %s compiled on %s %s\n"
msgstr ""
@@ -327,115 +327,126 @@ msgstr ""
msgid "Some files are missing in the package file group `%s'"
msgstr ""
-#: ftparchive/cachedb.cc:45
+#: ftparchive/cachedb.cc:47
#, c-format
msgid "DB was corrupted, file renamed to %s.old"
msgstr ""
-#: ftparchive/cachedb.cc:63
+#: ftparchive/cachedb.cc:65
#, c-format
msgid "DB is old, attempting to upgrade %s"
msgstr ""
-#: ftparchive/cachedb.cc:73
+#: ftparchive/cachedb.cc:76
+msgid ""
+"DB format is invalid. If you upgraded from a older version of apt, please "
+"remove and re-create the database."
+msgstr ""
+
+#: ftparchive/cachedb.cc:81
#, c-format
msgid "Unable to open DB file %s: %s"
msgstr ""
-#: ftparchive/cachedb.cc:114
+#: ftparchive/cachedb.cc:127 apt-inst/extract.cc:181 apt-inst/extract.cc:193
+#: apt-inst/extract.cc:210 apt-inst/deb/dpkgdb.cc:121 methods/gpgv.cc:272
#, c-format
-msgid "File date has changed %s"
+msgid "Failed to stat %s"
msgstr ""
-#: ftparchive/cachedb.cc:155
+#: ftparchive/cachedb.cc:242
msgid "Archive has no control record"
msgstr ""
-#: ftparchive/cachedb.cc:267
+#: ftparchive/cachedb.cc:448
msgid "Unable to get a cursor"
msgstr ""
-#: ftparchive/writer.cc:78
+#: ftparchive/writer.cc:79
#, c-format
msgid "W: Unable to read directory %s\n"
msgstr ""
-#: ftparchive/writer.cc:83
+#: ftparchive/writer.cc:84
#, c-format
msgid "W: Unable to stat %s\n"
msgstr ""
-#: ftparchive/writer.cc:125
+#: ftparchive/writer.cc:135
msgid "E: "
msgstr ""
-#: ftparchive/writer.cc:127
+#: ftparchive/writer.cc:137
msgid "W: "
msgstr ""
-#: ftparchive/writer.cc:134
+#: ftparchive/writer.cc:144
msgid "E: Errors apply to file "
msgstr ""
-#: ftparchive/writer.cc:151 ftparchive/writer.cc:181
+#: ftparchive/writer.cc:161 ftparchive/writer.cc:191
#, c-format
msgid "Failed to resolve %s"
msgstr ""
-#: ftparchive/writer.cc:163
+#: ftparchive/writer.cc:173
msgid "Tree walking failed"
msgstr ""
-#: ftparchive/writer.cc:188
+#: ftparchive/writer.cc:198
#, c-format
msgid "Failed to open %s"
msgstr ""
-#: ftparchive/writer.cc:245
+#: ftparchive/writer.cc:257
#, c-format
msgid " DeLink %s [%s]\n"
msgstr ""
-#: ftparchive/writer.cc:253
+#: ftparchive/writer.cc:265
#, c-format
msgid "Failed to readlink %s"
msgstr ""
-#: ftparchive/writer.cc:257
+#: ftparchive/writer.cc:269
#, c-format
msgid "Failed to unlink %s"
msgstr ""
-#: ftparchive/writer.cc:264
+#: ftparchive/writer.cc:276
#, c-format
msgid "*** Failed to link %s to %s"
msgstr ""
-#: ftparchive/writer.cc:274
+#: ftparchive/writer.cc:286
#, c-format
msgid " DeLink limit of %sB hit.\n"
msgstr ""
-#: ftparchive/writer.cc:358 apt-inst/extract.cc:181 apt-inst/extract.cc:193
-#: apt-inst/extract.cc:210 apt-inst/deb/dpkgdb.cc:121 methods/gpgv.cc:266
-#, c-format
-msgid "Failed to stat %s"
-msgstr ""
-
-#: ftparchive/writer.cc:386
+#: ftparchive/writer.cc:390
msgid "Archive had no package field"
msgstr ""
-#: ftparchive/writer.cc:394 ftparchive/writer.cc:603
+#: ftparchive/writer.cc:398 ftparchive/writer.cc:613
#, c-format
msgid " %s has no override entry\n"
msgstr ""
-#: ftparchive/writer.cc:437 ftparchive/writer.cc:689
+#: ftparchive/writer.cc:443 ftparchive/writer.cc:701
#, c-format
msgid " %s maintainer is %s not %s\n"
msgstr ""
+#: ftparchive/writer.cc:623
+#, c-format
+msgid " %s has no source override entry\n"
+msgstr ""
+
+#: ftparchive/writer.cc:627
+#, c-format
+msgid " %s has no binary override entry either\n"
+msgstr ""
+
#: ftparchive/contents.cc:317
#, c-format
msgid "Internal error, could not locate member %s"
@@ -694,11 +705,11 @@ msgstr ""
msgid "Internal error, Ordering didn't finish"
msgstr ""
-#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1800 cmdline/apt-get.cc:1833
+#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1811 cmdline/apt-get.cc:1844
msgid "Unable to lock the download directory"
msgstr ""
-#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1881 cmdline/apt-get.cc:2117
+#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1892 cmdline/apt-get.cc:2128
#: apt-pkg/cachefile.cc:67
msgid "The list of sources could not be read."
msgstr ""
@@ -727,7 +738,7 @@ msgstr ""
msgid "After unpacking %sB disk space will be freed.\n"
msgstr ""
-#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1971
+#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1982
#, c-format
msgid "Couldn't determine free space in %s"
msgstr ""
@@ -761,7 +772,7 @@ msgstr ""
msgid "Do you want to continue [Y/n]? "
msgstr ""
-#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2014
+#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2025
#, c-format
msgid "Failed to fetch %s %s\n"
msgstr ""
@@ -770,7 +781,7 @@ msgstr ""
msgid "Some files failed to download"
msgstr ""
-#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2023
+#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2034
msgid "Download complete and in download only mode"
msgstr ""
@@ -927,144 +938,144 @@ msgstr ""
msgid "The following extra packages will be installed:"
msgstr ""
-#: cmdline/apt-get.cc:1674
+#: cmdline/apt-get.cc:1685
msgid "Suggested packages:"
msgstr ""
-#: cmdline/apt-get.cc:1675
+#: cmdline/apt-get.cc:1686
msgid "Recommended packages:"
msgstr ""
-#: cmdline/apt-get.cc:1695
+#: cmdline/apt-get.cc:1706
msgid "Calculating upgrade... "
msgstr ""
-#: cmdline/apt-get.cc:1698 methods/ftp.cc:702 methods/connect.cc:101
+#: cmdline/apt-get.cc:1709 methods/ftp.cc:702 methods/connect.cc:101
msgid "Failed"
msgstr ""
-#: cmdline/apt-get.cc:1703
+#: cmdline/apt-get.cc:1714
msgid "Done"
msgstr ""
-#: cmdline/apt-get.cc:1768 cmdline/apt-get.cc:1776
+#: cmdline/apt-get.cc:1779 cmdline/apt-get.cc:1787
msgid "Internal error, problem resolver broke stuff"
msgstr ""
-#: cmdline/apt-get.cc:1876
+#: cmdline/apt-get.cc:1887
msgid "Must specify at least one package to fetch source for"
msgstr ""
-#: cmdline/apt-get.cc:1906 cmdline/apt-get.cc:2135
+#: cmdline/apt-get.cc:1917 cmdline/apt-get.cc:2146
#, c-format
msgid "Unable to find a source package for %s"
msgstr ""
-#: cmdline/apt-get.cc:1950
+#: cmdline/apt-get.cc:1961
#, c-format
msgid "Skipping already downloaded file '%s'\n"
msgstr ""
-#: cmdline/apt-get.cc:1974
+#: cmdline/apt-get.cc:1985
#, c-format
msgid "You don't have enough free space in %s"
msgstr ""
-#: cmdline/apt-get.cc:1979
+#: cmdline/apt-get.cc:1990
#, c-format
msgid "Need to get %sB/%sB of source archives.\n"
msgstr ""
-#: cmdline/apt-get.cc:1982
+#: cmdline/apt-get.cc:1993
#, c-format
msgid "Need to get %sB of source archives.\n"
msgstr ""
-#: cmdline/apt-get.cc:1988
+#: cmdline/apt-get.cc:1999
#, c-format
msgid "Fetch source %s\n"
msgstr ""
-#: cmdline/apt-get.cc:2019
+#: cmdline/apt-get.cc:2030
msgid "Failed to fetch some archives."
msgstr ""
-#: cmdline/apt-get.cc:2047
+#: cmdline/apt-get.cc:2058
#, c-format
msgid "Skipping unpack of already unpacked source in %s\n"
msgstr ""
-#: cmdline/apt-get.cc:2059
+#: cmdline/apt-get.cc:2070
#, c-format
msgid "Unpack command '%s' failed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2060
+#: cmdline/apt-get.cc:2071
#, c-format
msgid "Check if the 'dpkg-dev' package is installed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2077
+#: cmdline/apt-get.cc:2088
#, c-format
msgid "Build command '%s' failed.\n"
msgstr ""
-#: cmdline/apt-get.cc:2096
+#: cmdline/apt-get.cc:2107
msgid "Child process failed"
msgstr ""
-#: cmdline/apt-get.cc:2112
+#: cmdline/apt-get.cc:2123
msgid "Must specify at least one package to check builddeps for"
msgstr ""
-#: cmdline/apt-get.cc:2140
+#: cmdline/apt-get.cc:2151
#, c-format
msgid "Unable to get build-dependency information for %s"
msgstr ""
-#: cmdline/apt-get.cc:2160
+#: cmdline/apt-get.cc:2171
#, c-format
msgid "%s has no build depends.\n"
msgstr ""
-#: cmdline/apt-get.cc:2212
+#: cmdline/apt-get.cc:2223
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because the package %s cannot be "
"found"
msgstr ""
-#: cmdline/apt-get.cc:2264
+#: cmdline/apt-get.cc:2275
#, c-format
msgid ""
"%s dependency for %s cannot be satisfied because no available versions of "
"package %s can satisfy version requirements"
msgstr ""
-#: cmdline/apt-get.cc:2299
+#: cmdline/apt-get.cc:2310
#, c-format
msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
msgstr ""
-#: cmdline/apt-get.cc:2324
+#: cmdline/apt-get.cc:2335
#, c-format
msgid "Failed to satisfy %s dependency for %s: %s"
msgstr ""
-#: cmdline/apt-get.cc:2338
+#: cmdline/apt-get.cc:2349
#, c-format
msgid "Build-dependencies for %s could not be satisfied."
msgstr ""
-#: cmdline/apt-get.cc:2342
+#: cmdline/apt-get.cc:2353
msgid "Failed to process build dependencies"
msgstr ""
-#: cmdline/apt-get.cc:2374
+#: cmdline/apt-get.cc:2385
msgid "Supported modules:"
msgstr ""
-#: cmdline/apt-get.cc:2415
+#: cmdline/apt-get.cc:2426
msgid ""
"Usage: apt-get [options] command\n"
" apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@ -1192,19 +1203,19 @@ msgstr ""
msgid "Failed to create pipes"
msgstr ""
-#: apt-inst/contrib/extracttar.cc:143
+#: apt-inst/contrib/extracttar.cc:144
msgid "Failed to exec gzip "
msgstr ""
-#: apt-inst/contrib/extracttar.cc:180 apt-inst/contrib/extracttar.cc:206
+#: apt-inst/contrib/extracttar.cc:181 apt-inst/contrib/extracttar.cc:207
msgid "Corrupted archive"
msgstr ""
-#: apt-inst/contrib/extracttar.cc:195
+#: apt-inst/contrib/extracttar.cc:196
msgid "Tar checksum failed, archive corrupted"
msgstr ""
-#: apt-inst/contrib/extracttar.cc:298
+#: apt-inst/contrib/extracttar.cc:299
#, c-format
msgid "Unknown TAR header type %u, member %s"
msgstr ""
@@ -1479,12 +1490,12 @@ msgstr ""
msgid "File not found"
msgstr ""
-#: methods/copy.cc:42 methods/gpgv.cc:275 methods/gzip.cc:133
+#: methods/copy.cc:42 methods/gpgv.cc:281 methods/gzip.cc:133
#: methods/gzip.cc:142
msgid "Failed to stat"
msgstr ""
-#: methods/copy.cc:79 methods/gpgv.cc:272 methods/gzip.cc:139
+#: methods/copy.cc:79 methods/gpgv.cc:278 methods/gzip.cc:139
msgid "Failed to set modification time"
msgstr ""
@@ -1694,38 +1705,38 @@ msgstr ""
msgid "Unable to connect to %s %s:"
msgstr ""
-#: methods/gpgv.cc:64
+#: methods/gpgv.cc:65
#, c-format
msgid "Couldn't access keyring: '%s'"
msgstr ""
-#: methods/gpgv.cc:99
+#: methods/gpgv.cc:100
msgid "E: Argument list from Acquire::gpgv::Options too long. Exiting."
msgstr ""
-#: methods/gpgv.cc:198
+#: methods/gpgv.cc:204
msgid ""
"Internal error: Good signature, but could not determine key fingerprint?!"
msgstr ""
-#: methods/gpgv.cc:203
+#: methods/gpgv.cc:209
msgid "At least one invalid signature was encountered."
msgstr ""
-#: methods/gpgv.cc:207
+#: methods/gpgv.cc:213
#, c-format
msgid "Could not execute '%s' to verify signature (is gnupg installed?)"
msgstr ""
-#: methods/gpgv.cc:212
+#: methods/gpgv.cc:218
msgid "Unknown error executing gpgv"
msgstr ""
-#: methods/gpgv.cc:243
+#: methods/gpgv.cc:249
msgid "The following signatures were invalid:\n"
msgstr ""
-#: methods/gpgv.cc:250
+#: methods/gpgv.cc:256
msgid ""
"The following signatures couldn't be verified because the public key is not "
"available:\n"
@@ -2101,12 +2112,12 @@ msgstr ""
msgid "Dependency generation"
msgstr ""
-#: apt-pkg/tagfile.cc:72
+#: apt-pkg/tagfile.cc:85 apt-pkg/tagfile.cc:92
#, c-format
msgid "Unable to parse package file %s (1)"
msgstr ""
-#: apt-pkg/tagfile.cc:102
+#: apt-pkg/tagfile.cc:186
#, c-format
msgid "Unable to parse package file %s (2)"
msgstr ""