]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/sourcelist.cc
Comment touch ups
[apt.git] / apt-pkg / sourcelist.cc
index bce3e5990dcf46b8fd2a9c057cb8b2fdf5c2d6cb..faae6a3303d1680dfd1ec57b402ad162a203c229 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: sourcelist.cc,v 1.2 1998/07/09 05:12:28 jgg Exp $
+// $Id: sourcelist.cc,v 1.4 1998/07/19 04:22:04 jgg Exp $
 /* ######################################################################
 
    List of Sources
@@ -9,13 +9,13 @@
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
 #ifdef __GNUG__
-#pragma implementation "pkglib/sourcelist.h"
+#pragma implementation "apt-pkg/sourcelist.h"
 #endif
 
-#include <pkglib/sourcelist.h>
-#include <pkglib/error.h>
-#include <pkglib/fileutl.h>
-#include <pkglib/configuration.h>
+#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/configuration.h>
 #include <strutl.h>
 
 #include <fstream.h>
@@ -108,45 +108,6 @@ bool pkgSourceList::Read(string File)
    return true;
 }
                                                                        /*}}}*/
-// SourceList::SanitizeURI - Hash the uri                              /*{{{*/
-// ---------------------------------------------------------------------
-/* This converts a URI into a safe filename. It quotes all unsafe characters
-   and converts / to _ and removes the scheme identifier. */
-string pkgSourceList::SanitizeURI(string URI)
-{
-   string::const_iterator I = URI.begin() + URI.find(':') + 1;
-   for (; I < URI.end() && *I == '/'; I++);
-
-   // "\x00-\x20{}|\\\\^\\[\\]<>\"\x7F-\xFF";
-   URI = QuoteString(string(I,URI.end() - I),"\\|{}[]<>\"^~_=!@#$%^&*");
-   string::iterator J = URI.begin();
-   for (; J != URI.end(); J++)
-      if (*J == '/') 
-        *J = '_';
-   return URI;
-}
-                                                                       /*}}}*/
-// SourceList::MatchPkgFile - Find the package file that has the ver   /*{{{*/
-// ---------------------------------------------------------------------
-/* This will return List.end() if it could not find the matching 
-   file */
-pkgSourceList::const_iterator pkgSourceList::MatchPkgFile(pkgCache::VerIterator Ver)
-{
-   string Base = _config->Find("APT::Architecture");
-   for (const_iterator I = List.begin(); I != List.end(); I++)
-   {
-      string URI = I->PackagesURI();
-      switch (I->Type)
-      {
-        case Item::Deb:
-/*      if (Base + SanitizeURI(URI) == Ver.File().FileName())
-           return I;*/
-        break;
-      };      
-   }
-   return List.end();
-}
-                                                                       /*}}}*/
 // SourceList::Item << - Writes the item to a stream                   /*{{{*/
 // ---------------------------------------------------------------------
 /* This is not suitable for rebuilding the sourcelist file but it good for