]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt.cc
webserver: use pthreads to handle multiple clients
[apt.git] / cmdline / apt.cc
index 38610e7313df6b6ebc5209f734ce1e424c836923..4bcae0aba8ac71a07f9bc30d4e2679e899d83af7 100644 (file)
@@ -41,6 +41,7 @@
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/indexfile.h>
 #include <apt-pkg/metaindex.h>
+#include <apt-pkg/hashes.h>
 
 #include <apti18n.h>
 
 #include <apt-private/private-show.h>
 #include <apt-private/private-main.h>
 #include <apt-private/private-utils.h>
+#include <apt-private/private-sources.h>
                                                                        /*}}}*/
 
-// EditSource - EditSourcesList                                        /*{{{*/
-// ---------------------------------------------------------------------
-bool EditSources(CommandLine &CmdL)
-{
-   // FIXME: suport CmdL.FileList to specify sources.list.d files
-
-   std::string sourceslist = _config->FindFile("Dir::Etc::sourcelist");
-
-   // FIXME: take hash before, 
-   //        when changed display message to apt update
-   bool res;
-   pkgSourceList sl;
-
-   do {
-      EditFileInSensibleEditor(sourceslist);
-      _error->PushToStack();
-      res = sl.Read(sourceslist);
-      if (!res) {
-         std::string outs;
-         strprintf(outs, _("Failed to parse %s. Edit again? "),
-                   sourceslist.c_str());
-         std::cout << outs;
-         res = !YnPrompt(true);
-      }
-      _error->RevertToStack();
-   } while (res == false);
-
-   return true;
-}
-                                                                       /*}}}*/
 
 
 bool ShowHelp(CommandLine &CmdL)