summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-02-04 22:56:51 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-02-04 22:56:51 +0100
commit7fefa1842da668283785113ae174df34f97f6df5 (patch)
tree3db0dd7669c1f46f72eca118a686e6e4b9f27c12
parenteb76e936982bd65ebd6a147c1c23ef2613891367 (diff)
* cmdline/apt-cache.cc:
- remove not implemented 'apt-cache add' command * doc/apt-cache.8.xml: - describe reality as apt-cache just queries and doesn't manipulate the caches. Thanks to Enrico Zini for spotting it! (Closes: #612009)
-rw-r--r--cmdline/apt-cache.cc59
-rw-r--r--debian/changelog7
-rw-r--r--doc/apt-cache.8.xml10
3 files changed, 10 insertions, 66 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 45ea50433..34070ba9b 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1118,58 +1118,6 @@ bool Dotty(CommandLine &CmdL)
return true;
}
/*}}}*/
-// DoAdd - Perform an adding operation /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool DoAdd(CommandLine &CmdL)
-{
- return _error->Error("Unimplemented");
-#if 0
- // Make sure there is at least one argument
- if (CmdL.FileSize() <= 1)
- return _error->Error("You must give at least one file name");
-
- // Open the cache
- FileFd CacheF(_config->FindFile("Dir::Cache::pkgcache"),FileFd::WriteAny);
- if (_error->PendingError() == true)
- return false;
-
- DynamicMMap Map(CacheF,MMap::Public);
- if (_error->PendingError() == true)
- return false;
-
- OpTextProgress Progress(*_config);
- pkgCacheGenerator Gen(Map,Progress);
- if (_error->PendingError() == true)
- return false;
-
- unsigned long Length = CmdL.FileSize() - 1;
- for (const char **I = CmdL.FileList + 1; *I != 0; I++)
- {
- Progress.OverallProgress(I - CmdL.FileList,Length,1,"Generating cache");
- Progress.SubProgress(Length);
-
- // Do the merge
- FileFd TagF(*I,FileFd::ReadOnly);
- debListParser Parser(TagF);
- if (_error->PendingError() == true)
- return _error->Error("Problem opening %s",*I);
-
- if (Gen.SelectFile(*I,"") == false)
- return _error->Error("Problem with SelectFile");
-
- if (Gen.MergeList(Parser) == false)
- return _error->Error("Problem with MergeList");
- }
-
- Progress.Done();
- GCache = &Gen.GetCache();
- Stats(CmdL);
-
- return true;
-#endif
-}
- /*}}}*/
// DisplayRecord - Displays the complete record for the package /*{{{*/
// ---------------------------------------------------------------------
/* This displays the package record from the proper package index file.
@@ -1743,15 +1691,13 @@ bool ShowHelp(CommandLine &Cmd)
cout <<
_("Usage: apt-cache [options] command\n"
- " apt-cache [options] add file1 [file2 ...]\n"
" apt-cache [options] showpkg pkg1 [pkg2 ...]\n"
" apt-cache [options] showsrc pkg1 [pkg2 ...]\n"
"\n"
- "apt-cache is a low-level tool used to manipulate APT's binary\n"
- "cache files, and query information from them\n"
+ "apt-cache is a low-level tool used to query information\n"
+ "from APT's binary cache files\n"
"\n"
"Commands:\n"
- " add - Add a package file to the source cache\n"
" gencaches - Build both the package and source cache\n"
" showpkg - Show some general information for a single package\n"
" showsrc - Show source records\n"
@@ -1811,7 +1757,6 @@ int main(int argc,const char *argv[]) /*{{{*/
{0,"enhances","APT::Cache::ShowEnhances",0},
{0,0,0,0}};
CommandLine::Dispatch CmdsA[] = {{"help",&ShowHelp},
- {"add",&DoAdd},
{"gencaches",&GenCaches},
{"showsrc",&ShowSrcPackage},
{0,0}};
diff --git a/debian/changelog b/debian/changelog
index 525654732..3f8f52101 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -70,6 +70,11 @@ apt (0.8.11) UNRELEASED; urgency=low
- print a good error message if FileSize() is zero
* apt-pkg/aptconfiguration.cc:
- remove the inbuilt Translation files whitelist
+ * cmdline/apt-cache.cc:
+ - remove not implemented 'apt-cache add' command
+ * doc/apt-cache.8.xml:
+ - describe reality as apt-cache just queries and doesn't manipulate
+ the caches. Thanks to Enrico Zini for spotting it! (Closes: #612009)
[ Michael Vogt ]
* methods/http.cc:
@@ -87,7 +92,7 @@ apt (0.8.11) UNRELEASED; urgency=low
will actually test uncompressed indexes regardless of the internal
default value of Acquire::GzipIndexes.
- -- David Kalnischkies <kalnischkies@gmail.com> Fri, 28 Jan 2011 12:22:25 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com> Fri, 04 Feb 2011 22:52:25 +0100
apt (0.8.10.3) unstable; urgency=low
diff --git a/doc/apt-cache.8.xml b/doc/apt-cache.8.xml
index 359d210ea..9c6c64dac 100644
--- a/doc/apt-cache.8.xml
+++ b/doc/apt-cache.8.xml
@@ -18,7 +18,7 @@
&apt-email;
&apt-product;
<!-- The last update date -->
- <date>29 February 2004</date>
+ <date>04 February 2011</date>
</refentryinfo>
<refmeta>
@@ -30,7 +30,7 @@
<!-- Man page title -->
<refnamediv>
<refname>apt-cache</refname>
- <refpurpose>APT package handling utility -- cache manipulator</refpurpose>
+ <refpurpose>query the APT cache</refpurpose>
</refnamediv>
<!-- Arguments -->
@@ -41,7 +41,6 @@
<arg><option>-o=<replaceable>config string</replaceable></option></arg>
<arg><option>-c=<replaceable>file</replaceable></option></arg>
<group choice="req">
- <arg>add <arg choice="plain" rep="repeat"><replaceable>file</replaceable></arg></arg>
<arg>gencaches</arg>
<arg>showpkg <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
<arg>showsrc <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
@@ -72,11 +71,6 @@
commands below must be present.</para>
<variablelist>
- <varlistentry><term>add <replaceable>file(s)</replaceable></term>
- <listitem><para><literal>add</literal> adds the named package index files to the package cache.
- This is for debugging only.</para></listitem>
- </varlistentry>
-
<varlistentry><term>gencaches</term>
<listitem><para><literal>gencaches</literal> performs the same operation as
<command>apt-get check</command>. It builds the source and package caches from