Просмотр исходного кода

Merge with Matt and update French translation

Patches applied:

 * apt@packages.debian.org/apt--main--0--patch-49
   Merge michael.vogt@canonical.com--2004/apt--status-fd--0

 * apt@packages.debian.org/apt--main--0--patch-50
   Increment libapt-pkg version

 * apt@packages.debian.org/apt--main--0--patch-51
   0.6.30

 * apt@packages.debian.org/apt--main--0--patch-52
   0.6.31

 * apt@packages.debian.org/apt--main--0--patch-53
   Remove debugging from apt.cron.daily

 * apt@packages.debian.org/apt--main--0--patch-54
   allow SHA1Summation to process a file descriptor until EOF

 * apt@packages.debian.org/apt--main--0--patch-55
   Fix syntax in sha1.cc

 * apt@packages.debian.org/apt--main--0--patch-56
   Fix build/install of Polish offline documentation

 * apt@packages.debian.org/apt--main--0--patch-57
   Move CD-ROM handling backend into libapt-pkg

 * apt@packages.debian.org/apt--main--0--patch-58
   Fix compilation errors from apt--auth-cdrom--0

 * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--base-0
   tag of apt@packages.debian.org/apt--main--0--patch-32

 * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-1
   

 * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-2
   * changed version of the library 

 * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-3
   * merged with matt again

 * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-4
   * merged with apt--main--0 and fixed permissions in po/

 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-1
   tag of michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-4

 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-2
   * merged with matt's tree

 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-3
   * removed a stupid "<<<" merge in the changelog

 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-4
   * star-merged with apt@packages.debian.org/apt--main--0

 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-5
   * removed the "pre-fork/post-fork" change and put it into it's own branch, star-merged with matt so that it applies cleanly

 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-6
   * cleaned a incorrect log-file merge

 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-7
   * removed a conflict in =tagging-method

 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-8
   * cleaned up the delta so that it no longer contains unreleated whitespace changes

 * michael.vogt@ubuntu.com--2005/apt--auth-cdrom--0--base-0
   tag of apt@packages.debian.org/apt--main--0--patch-51

 * michael.vogt@ubuntu.com--2005/apt--auth-cdrom--0--patch-1
   * added support for signed cdroms 

 * michael.vogt@ubuntu.com--2005/apt--auth-cdrom--0--patch-2
   * merged with apt--main, seperated cmdline/apt-cdrom.cc into a library (apt-pkg/cdrom.{cc,h})

 * michael.vogt@ubuntu.com--2005/apt--auth-cdrom--0--patch-3
   * cleaned up the cmdline/apt-cdrom.cc code
Christian Perrier лет назад: 21
Родитель
Сommit
1b5a62221c
52 измененных файлов с 9271 добавлено и 5488 удалено
  1. 776 0
      apt-pkg/cdrom.cc
  2. 71 0
      apt-pkg/cdrom.h
  3. 3 2
      apt-pkg/contrib/fileutl.cc
  4. 1 1
      apt-pkg/contrib/fileutl.h
  5. 8 3
      apt-pkg/contrib/sha1.cc
  6. 17 2
      apt-pkg/deb/dpkgpm.cc
  7. 1 1
      apt-pkg/deb/dpkgpm.h
  8. 164 44
      cmdline/indexcopy.cc
  9. 15 1
      cmdline/indexcopy.h
  10. 11 0
      apt-pkg/indexrecords.cc
  11. 3 1
      apt-pkg/indexrecords.h
  12. 3 3
      apt-pkg/makefile
  13. 1 1
      apt-pkg/packagemanager.h
  14. 56 649
      cmdline/apt-cdrom.cc
  15. 1 1
      cmdline/makefile
  16. 1 1
      configure.in
  17. 0 1
      debian/apt.cron.daily
  18. 20 2
      debian/changelog
  19. 1 1
      debian/rules
  20. 90 90
      doc/pl/offline.pl.sgml
  21. 103 13
      po/apt-all.pot
  22. 267 162
      po/bs.po
  23. 279 169
      po/ca.po
  24. 276 167
      po/cs.po
  25. 304 209
      po/da.po
  26. 282 197
      po/de.UTF-8.po
  27. 282 197
      po/de.po
  28. 311 185
      po/el.po
  29. 269 164
      po/en_GB.po
  30. 284 199
      po/es.po
  31. 296 177
      po/eu.po
  32. 277 167
      po/fi.po
  33. 117 21
      po/fr.po
  34. 265 162
      po/he.po
  35. 275 166
      po/hu.po
  36. 282 197
      po/it.po
  37. 276 167
      po/ja.po
  38. 276 167
      po/ko.po
  39. 106 13
      po/nb.po
  40. 276 167
      po/nl.po
  41. 276 167
      po/nn.po
  42. 106 13
      po/pl.po
  43. 277 171
      po/pt.po
  44. 277 171
      po/pt_BR.po
  45. 369 217
      po/ro.po
  46. 303 181
      po/ru.po
  47. 276 167
      po/sk.po
  48. 106 13
      po/sl.po
  49. 276 167
      po/sv.po
  50. 275 166
      po/tl.po
  51. 278 169
      po/zh_CN.po
  52. 106 16
      po/zh_TW.po

+ 776 - 0
apt-pkg/cdrom.cc

@@ -0,0 +1,776 @@
+/*
+ */
+
+#ifdef __GNUG__
+#pragma implementation "apt-pkg/cdrom.h"
+#endif
+#include<apt-pkg/init.h>
+#include<apt-pkg/error.h>
+#include<apt-pkg/cdromutl.h>
+#include<apt-pkg/strutl.h>
+#include<apt-pkg/cdrom.h>
+#include<sstream>
+#include<fstream>
+#include<config.h>
+#include<apti18n.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <dirent.h>
+#include <unistd.h>
+#include <stdio.h>
+
+
+#include "indexcopy.h"
+
+using namespace std;
+
+// FindPackages - Find the package files on the CDROM			/*{{{*/
+// ---------------------------------------------------------------------
+/* We look over the cdrom for package files. This is a recursive
+   search that short circuits when it his a package file in the dir.
+   This speeds it up greatly as the majority of the size is in the
+   binary-* sub dirs. */
+bool pkgCdrom::FindPackages(string CD,vector<string> &List,
+			    vector<string> &SList, vector<string> &SigList,
+			    string &InfoDir, pkgCdromStatus *log,
+			    unsigned int Depth)
+{
+   static ino_t Inodes[9];
+
+   // if we have a look we "pulse" now
+   if(log)
+      log->Update();
+
+   if (Depth >= 7)
+      return true;
+
+   if (CD[CD.length()-1] != '/')
+      CD += '/';   
+
+   if (chdir(CD.c_str()) != 0)
+      return _error->Errno("chdir","Unable to change to %s",CD.c_str());
+
+   // Look for a .disk subdirectory
+   struct stat Buf;
+   if (stat(".disk",&Buf) == 0)
+   {
+      if (InfoDir.empty() == true)
+	 InfoDir = CD + ".disk/";
+   }
+
+   // Don't look into directories that have been marked to ingore.
+   if (stat(".aptignr",&Buf) == 0)
+      return true;
+
+
+   /* Check _first_ for a signature file as apt-cdrom assumes that all files
+      under a Packages/Source file are in control of that file and stops 
+      the scanning
+   */
+   if (stat("Release.gpg",&Buf) == 0)
+   {
+      SigList.push_back(CD);
+   }
+   /* Aha! We found some package files. We assume that everything under 
+      this dir is controlled by those package files so we don't look down
+      anymore */
+   if (stat("Packages",&Buf) == 0 || stat("Packages.gz",&Buf) == 0)
+   {
+      List.push_back(CD);
+      
+      // Continue down if thorough is given
+      if (_config->FindB("APT::CDROM::Thorough",false) == false)
+	 return true;
+   }
+   if (stat("Sources.gz",&Buf) == 0 || stat("Sources",&Buf) == 0)
+   {
+      SList.push_back(CD);
+      
+      // Continue down if thorough is given
+      if (_config->FindB("APT::CDROM::Thorough",false) == false)
+	 return true;
+   }
+   
+   DIR *D = opendir(".");
+   if (D == 0)
+      return _error->Errno("opendir","Unable to read %s",CD.c_str());
+   
+   // Run over the directory
+   for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D))
+   {
+      // Skip some files..
+      if (strcmp(Dir->d_name,".") == 0 ||
+	  strcmp(Dir->d_name,"..") == 0 ||
+	  //strcmp(Dir->d_name,"source") == 0 ||
+	  strcmp(Dir->d_name,".disk") == 0 ||
+	  strcmp(Dir->d_name,"experimental") == 0 ||
+	  strcmp(Dir->d_name,"binary-all") == 0 ||
+          strcmp(Dir->d_name,"debian-installer") == 0)
+	 continue;
+
+      // See if the name is a sub directory
+      struct stat Buf;
+      if (stat(Dir->d_name,&Buf) != 0)
+	 continue;      
+      
+      if (S_ISDIR(Buf.st_mode) == 0)
+	 continue;
+      
+      unsigned int I;
+      for (I = 0; I != Depth; I++)
+	 if (Inodes[I] == Buf.st_ino)
+	    break;
+      if (I != Depth)
+	 continue;
+      
+      // Store the inodes weve seen
+      Inodes[Depth] = Buf.st_ino;
+
+      // Descend
+      if (FindPackages(CD + Dir->d_name,List,SList,SigList,InfoDir,log,Depth+1) == false)
+	 break;
+
+      if (chdir(CD.c_str()) != 0)
+	 return _error->Errno("chdir","Unable to change to %s",CD.c_str());
+   };
+
+   closedir(D);
+   
+   return !_error->PendingError();
+}
+
+// Score - We compute a 'score' for a path				/*{{{*/
+// ---------------------------------------------------------------------
+/* Paths are scored based on how close they come to what I consider
+   normal. That is ones that have 'dist' 'stable' 'testing' will score
+   higher than ones without. */
+int pkgCdrom::Score(string Path)
+{
+   int Res = 0;
+   if (Path.find("stable/") != string::npos)
+      Res += 29;
+   if (Path.find("/binary-") != string::npos)
+      Res += 20;
+   if (Path.find("testing/") != string::npos)
+      Res += 28;
+   if (Path.find("unstable/") != string::npos)
+      Res += 27;
+   if (Path.find("/dists/") != string::npos)
+      Res += 40;
+   if (Path.find("/main/") != string::npos)
+      Res += 20;
+   if (Path.find("/contrib/") != string::npos)
+      Res += 20;
+   if (Path.find("/non-free/") != string::npos)
+      Res += 20;
+   if (Path.find("/non-US/") != string::npos)
+      Res += 20;
+   if (Path.find("/source/") != string::npos)
+      Res += 10;
+   if (Path.find("/debian/") != string::npos)
+      Res -= 10;
+   return Res;
+}
+
+									/*}}}*/
+// DropBinaryArch - Dump dirs with a string like /binary-<foo>/		/*{{{*/
+// ---------------------------------------------------------------------
+/* Here we drop everything that is not this machines arch */
+bool pkgCdrom::DropBinaryArch(vector<string> &List)
+{
+   char S[300];
+   snprintf(S,sizeof(S),"/binary-%s/",
+	    _config->Find("Apt::Architecture").c_str());
+   
+   for (unsigned int I = 0; I < List.size(); I++)
+   {
+      const char *Str = List[I].c_str();
+      
+      const char *Res;
+      if ((Res = strstr(Str,"/binary-")) == 0)
+	 continue;
+
+      // Weird, remove it.
+      if (strlen(Res) < strlen(S))
+      {
+	 List.erase(List.begin() + I);
+	 I--;
+	 continue;
+      }
+	  
+      // See if it is our arch
+      if (stringcmp(Res,Res + strlen(S),S) == 0)
+	 continue;
+      
+      // Erase it
+      List.erase(List.begin() + I);
+      I--;
+   }
+   
+   return true;
+}
+
+
+// DropRepeats - Drop repeated files resulting from symlinks		/*{{{*/
+// ---------------------------------------------------------------------
+/* Here we go and stat every file that we found and strip dup inodes. */
+bool pkgCdrom::DropRepeats(vector<string> &List,const char *Name)
+{
+   // Get a list of all the inodes
+   ino_t *Inodes = new ino_t[List.size()];
+   for (unsigned int I = 0; I != List.size(); I++)
+   {
+      struct stat Buf;
+      if (stat((List[I] + Name).c_str(),&Buf) != 0 &&
+	  stat((List[I] + Name + ".gz").c_str(),&Buf) != 0)
+	 _error->Errno("stat","Failed to stat %s%s",List[I].c_str(),
+		       Name);
+      Inodes[I] = Buf.st_ino;
+   }
+   
+   if (_error->PendingError() == true)
+      return false;
+   
+   // Look for dups
+   for (unsigned int I = 0; I != List.size(); I++)
+   {
+      for (unsigned int J = I+1; J < List.size(); J++)
+      {
+	 // No match
+	 if (Inodes[J] != Inodes[I])
+	    continue;
+	 
+	 // We score the two paths.. and erase one
+	 int ScoreA = Score(List[I]);
+	 int ScoreB = Score(List[J]);
+	 if (ScoreA < ScoreB)
+	 {
+	    List[I] = string();
+	    break;
+	 }
+	 
+	 List[J] = string();
+      }
+   }  
+ 
+   // Wipe erased entries
+   for (unsigned int I = 0; I < List.size();)
+   {
+      if (List[I].empty() == false)
+	 I++;
+      else
+	 List.erase(List.begin()+I);
+   }
+   
+   return true;
+}
+									/*}}}*/
+
+// ReduceSourceList - Takes the path list and reduces it		/*{{{*/
+// ---------------------------------------------------------------------
+/* This takes the list of source list expressed entires and collects
+   similar ones to form a single entry for each dist */
+void pkgCdrom::ReduceSourcelist(string CD,vector<string> &List)
+{
+   sort(List.begin(),List.end());
+   
+   // Collect similar entries
+   for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+   {
+      // Find a space..
+      string::size_type Space = (*I).find(' ');
+      if (Space == string::npos)
+	 continue;
+      string::size_type SSpace = (*I).find(' ',Space + 1);
+      if (SSpace == string::npos)
+	 continue;
+
+      string Word1 = string(*I,Space,SSpace-Space);
+      string Prefix = string(*I,0,Space);
+      for (vector<string>::iterator J = List.begin(); J != I; J++)
+      {
+	 // Find a space..
+	 string::size_type Space2 = (*J).find(' ');
+	 if (Space2 == string::npos)
+	    continue;
+	 string::size_type SSpace2 = (*J).find(' ',Space2 + 1);
+	 if (SSpace2 == string::npos)
+	    continue;
+	 
+	 if (string(*J,0,Space2) != Prefix)
+	    continue;
+	 if (string(*J,Space2,SSpace2-Space2) != Word1)
+	    continue;
+	 
+	 *J += string(*I,SSpace);
+	 *I = string();
+      }
+   }   
+
+   // Wipe erased entries
+   for (unsigned int I = 0; I < List.size();)
+   {
+      if (List[I].empty() == false)
+	 I++;
+      else
+	 List.erase(List.begin()+I);
+   }
+}
+									/*}}}*/
+// WriteDatabase - Write the CDROM Database file			/*{{{*/
+// ---------------------------------------------------------------------
+/* We rewrite the configuration class associated with the cdrom database. */
+bool pkgCdrom::WriteDatabase(Configuration &Cnf)
+{
+   string DFile = _config->FindFile("Dir::State::cdroms");
+   string NewFile = DFile + ".new";
+   
+   unlink(NewFile.c_str());
+   ofstream Out(NewFile.c_str());
+   if (!Out)
+      return _error->Errno("ofstream::ofstream",
+			   "Failed to open %s.new",DFile.c_str());
+   
+   /* Write out all of the configuration directives by walking the
+      configuration tree */
+   const Configuration::Item *Top = Cnf.Tree(0);
+   for (; Top != 0;)
+   {
+      // Print the config entry
+      if (Top->Value.empty() == false)
+	 Out <<  Top->FullTag() + " \"" << Top->Value << "\";" << endl;
+      
+      if (Top->Child != 0)
+      {
+	 Top = Top->Child;
+	 continue;
+      }
+      
+      while (Top != 0 && Top->Next == 0)
+	 Top = Top->Parent;
+      if (Top != 0)
+	 Top = Top->Next;
+   }   
+
+   Out.close();
+   
+   rename(DFile.c_str(),string(DFile + '~').c_str());
+   if (rename(NewFile.c_str(),DFile.c_str()) != 0)
+      return _error->Errno("rename","Failed to rename %s.new to %s",
+			   DFile.c_str(),DFile.c_str());
+
+   return true;
+}
+									/*}}}*/
+// WriteSourceList - Write an updated sourcelist			/*{{{*/
+// ---------------------------------------------------------------------
+/* This reads the old source list and copies it into the new one. It 
+   appends the new CDROM entires just after the first block of comments.
+   This places them first in the file. It also removes any old entries
+   that were the same. */
+bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source)
+{
+   if (List.size() == 0)
+      return true;
+
+   string File = _config->FindFile("Dir::Etc::sourcelist");
+
+   // Open the stream for reading
+   ifstream F((FileExists(File)?File.c_str():"/dev/null"),
+	      ios::in );
+   if (!F != 0)
+      return _error->Errno("ifstream::ifstream","Opening %s",File.c_str());
+
+   string NewFile = File + ".new";
+   unlink(NewFile.c_str());
+   ofstream Out(NewFile.c_str());
+   if (!Out)
+      return _error->Errno("ofstream::ofstream",
+			   "Failed to open %s.new",File.c_str());
+
+   // Create a short uri without the path
+   string ShortURI = "cdrom:[" + Name + "]/";   
+   string ShortURI2 = "cdrom:" + Name + "/";     // For Compatibility
+
+   string Type;
+   if (Source == true)
+      Type = "deb-src";
+   else
+      Type = "deb";
+   
+   char Buffer[300];
+   int CurLine = 0;
+   bool First = true;
+   while (F.eof() == false)
+   {      
+      F.getline(Buffer,sizeof(Buffer));
+      CurLine++;
+      _strtabexpand(Buffer,sizeof(Buffer));
+      _strstrip(Buffer);
+            
+      // Comment or blank
+      if (Buffer[0] == '#' || Buffer[0] == 0)
+      {
+	 Out << Buffer << endl;
+	 continue;
+      }
+
+      if (First == true)
+      {
+	 for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+	 {
+	    string::size_type Space = (*I).find(' ');
+	    if (Space == string::npos)
+	       return _error->Error("Internal error");
+	    Out << Type << " cdrom:[" << Name << "]/" << string(*I,0,Space) <<
+	       " " << string(*I,Space+1) << endl;
+	 }
+      }
+      First = false;
+      
+      // Grok it
+      string cType;
+      string URI;
+      const char *C = Buffer;
+      if (ParseQuoteWord(C,cType) == false ||
+	  ParseQuoteWord(C,URI) == false)
+      {
+	 Out << Buffer << endl;
+	 continue;
+      }
+
+      // Emit lines like this one
+      if (cType != Type || (string(URI,0,ShortURI.length()) != ShortURI &&
+	  string(URI,0,ShortURI.length()) != ShortURI2))
+      {
+	 Out << Buffer << endl;
+	 continue;
+      }      
+   }
+   
+   // Just in case the file was empty
+   if (First == true)
+   {
+      for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+      {
+	 string::size_type Space = (*I).find(' ');
+	 if (Space == string::npos)
+	    return _error->Error("Internal error");
+	 
+	 Out << "deb cdrom:[" << Name << "]/" << string(*I,0,Space) << 
+	    " " << string(*I,Space+1) << endl;
+      }
+   }
+   
+   Out.close();
+
+   rename(File.c_str(),string(File + '~').c_str());
+   if (rename(NewFile.c_str(),File.c_str()) != 0)
+      return _error->Errno("rename","Failed to rename %s.new to %s",
+			   File.c_str(),File.c_str());
+   
+   return true;
+}
+
+
+bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log)
+{
+   stringstream msg;
+
+   // Startup
+   string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
+   if (CDROM[0] == '.')
+      CDROM= SafeGetCWD() + '/' + CDROM;
+
+   if(log) {
+      msg.str("");
+      ioprintf(msg, _("Using CD-ROM mount point %s\nMounting CD-ROM\n"),
+		      CDROM.c_str());
+      log->Update(msg.str());
+   }
+   if (MountCdrom(CDROM) == false)
+      return _error->Error("Failed to mount the cdrom.");
+
+   // Hash the CD to get an ID
+   if(log) 
+      log->Update(_("Identifying.. "));
+   
+
+   if (IdentCdrom(CDROM,ident) == false)
+   {
+      ident = "";
+      return false;
+   }
+
+   msg.str("");
+   ioprintf(msg, "[%s]\n",ident.c_str());
+   log->Update(msg.str());
+
+
+   // Read the database
+   Configuration Database;
+   string DFile = _config->FindFile("Dir::State::cdroms");
+   if (FileExists(DFile) == true)
+   {
+      if (ReadConfigFile(Database,DFile) == false)
+	 return _error->Error("Unable to read the cdrom database %s",
+			      DFile.c_str());
+   }
+   if(log) {
+      msg.str("");
+      ioprintf(msg, _("Stored Label: %s \n"),
+	       Database.Find("CD::"+ident).c_str());
+      log->Update(msg.str());
+   }
+   return true;
+}
+
+
+bool pkgCdrom::Add(pkgCdromStatus *log)
+{
+   stringstream msg;
+
+   // Startup
+   string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
+   if (CDROM[0] == '.')
+      CDROM= SafeGetCWD() + '/' + CDROM;
+   
+   if(log) {
+      log->SetTotal(STEP_LAST);
+      msg.str("");
+      ioprintf(msg, _("Using CD-ROM mount point %s\n"), CDROM.c_str());
+      log->Update(msg.str(), STEP_PREPARE);
+   }
+
+   // Read the database
+   Configuration Database;
+   string DFile = _config->FindFile("Dir::State::cdroms");
+   if (FileExists(DFile) == true)
+   {
+      if (ReadConfigFile(Database,DFile) == false)
+	 return _error->Error("Unable to read the cdrom database %s",
+			      DFile.c_str());
+   }
+   
+   // Unmount the CD and get the user to put in the one they want
+   if (_config->FindB("APT::CDROM::NoMount",false) == false)
+   {
+      if(log)
+	 log->Update(_("Unmounting CD-ROM\n"), STEP_UNMOUNT);
+      UnmountCdrom(CDROM);
+
+      if(log) {
+	 log->Update(_("Waiting for disc...\n"), STEP_WAIT);
+	 if(!log->ChangeCdrom()) {
+	    // user aborted
+	    return false; 
+	 }
+      }
+
+      // Mount the new CDROM
+      log->Update(_("Mounting CD-ROM...\n"), STEP_MOUNT);
+      if (MountCdrom(CDROM) == false)
+	 return _error->Error("Failed to mount the cdrom.");
+   }
+   
+   // Hash the CD to get an ID
+   if(log)
+      log->Update(_("Identifying.. "), STEP_IDENT);
+   string ID;
+   if (IdentCdrom(CDROM,ID) == false)
+   {
+      log->Update("\n");
+      return false;
+   }
+   if(log) 
+      log->Update("["+ID+"]\n");
+
+   if(log) 
+      log->Update(_("Scanning Disc for index files..\n"),STEP_SCAN);
+   
+   // Get the CD structure
+   vector<string> List;
+   vector<string> SourceList;
+   vector<string> SigList;
+   string StartDir = SafeGetCWD();
+   string InfoDir;
+   if (FindPackages(CDROM,List,SourceList, SigList,InfoDir,log) == false)
+   {
+      log->Update("\n");
+      return false;
+   }
+
+   chdir(StartDir.c_str());
+
+   if (_config->FindB("Debug::aptcdrom",false) == true)
+   {
+      cout << "I found (binary):" << endl;
+      for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+	 cout << *I << endl;
+      cout << "I found (source):" << endl;
+      for (vector<string>::iterator I = SourceList.begin(); I != SourceList.end(); I++)
+	 cout << *I << endl;
+      cout << "I found (Signatures):" << endl;
+      for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); I++)
+	 cout << *I << endl;
+   }   
+
+   //log->Update(_("Cleaning package lists..."), STEP_CLEAN);
+
+   // Fix up the list
+   DropBinaryArch(List);
+   DropRepeats(List,"Packages");
+   DropRepeats(SourceList,"Sources");
+   DropRepeats(SigList,"Release.gpg");
+   if(log) {
+      msg.str("");
+      ioprintf(msg, _("Found %i package indexes, %i source indexes and "
+		      "%i signatures\n"), 
+	       List.size(), SourceList.size(), SigList.size());
+      log->Update(msg.str(), STEP_SCAN);
+   }
+
+   if (List.size() == 0 && SourceList.size() == 0)
+      return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc");
+
+   // Check if the CD is in the database
+   string Name;
+   if (Database.Exists("CD::" + ID) == false ||
+       _config->FindB("APT::CDROM::Rename",false) == true)
+   {
+      // Try to use the CDs label if at all possible
+      if (InfoDir.empty() == false &&
+	  FileExists(InfoDir + "/info") == true)
+      {
+	 ifstream F(string(InfoDir + "/info").c_str());
+	 if (!F == 0)
+	    getline(F,Name);
+
+	 if (Name.empty() == false)
+	 {
+	    // Escape special characters
+	    string::iterator J = Name.begin();
+	    for (; J != Name.end(); J++)
+	       if (*J == '"' || *J == ']' || *J == '[')
+		  *J = '_';
+	    
+	    if(log) {
+	       msg.str("");
+	       ioprintf(msg, "Found label '%s'\n", Name.c_str());
+	       log->Update(msg.str());
+	    }
+	    Database.Set("CD::" + ID + "::Label",Name);
+	 }	 
+      }
+      
+      if (_config->FindB("APT::CDROM::Rename",false) == true ||
+	  Name.empty() == true)
+      {
+	 if(!log) 
+	    return _error->Error("No disc name found and no way to ask for it");
+
+	 while(true) {
+	    if(!log->AskCdromName(Name)) {
+	       // user canceld
+	       return false; 
+	    }
+	    cout << "Name: '" << Name << "'" << endl;
+
+	    if (Name.empty() == false &&
+		Name.find('"') == string::npos &&
+		Name.find('[') == string::npos &&
+		Name.find(']') == string::npos)
+	       break;
+	    log->Update(_("That is not a valid name, try again.\n"));
+	 }
+      }      
+   }
+   else
+      Name = Database.Find("CD::" + ID);
+
+   // Escape special characters
+   string::iterator J = Name.begin();
+   for (; J != Name.end(); J++)
+      if (*J == '"' || *J == ']' || *J == '[')
+	 *J = '_';
+   
+   Database.Set("CD::" + ID,Name);
+   if(log) {
+      msg.str("");
+      ioprintf(msg, _("This Disc is called: \n'%s'\n"), Name.c_str());
+      log->Update(msg.str());
+   }
+
+   log->Update(_("Copying package lists..."), STEP_COPY);
+   // take care of the signatures and copy them if they are ok
+   // (we do this before PackageCopy as it modifies "List" and "SourceList")
+   SigVerify SignVerify;
+   SignVerify.CopyAndVerify(CDROM, Name, SigList, List, SourceList);
+   
+   // Copy the package files to the state directory
+   PackageCopy Copy;
+   SourceCopy SrcCopy;
+   if (Copy.CopyPackages(CDROM,Name,List, log) == false ||
+       SrcCopy.CopyPackages(CDROM,Name,SourceList, log) == false)
+      return false;
+
+   // reduce the List so that it takes less space in sources.list
+   ReduceSourcelist(CDROM,List);
+   ReduceSourcelist(CDROM,SourceList);
+
+   // Write the database and sourcelist
+   if (_config->FindB("APT::cdrom::NoAct",false) == false)
+   {
+      if (WriteDatabase(Database) == false)
+	 return false;
+      
+      if(log) {
+	 log->Update(_("Writing new source list\n"), STEP_WRITE);
+      }
+      if (WriteSourceList(Name,List,false) == false ||
+	  WriteSourceList(Name,SourceList,true) == false)
+	 return false;
+   }
+
+   // Print the sourcelist entries
+   if(log) 
+      log->Update(_("Source List entries for this Disc are:\n"));
+
+   for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
+   {
+      string::size_type Space = (*I).find(' ');
+      if (Space == string::npos)
+	 return _error->Error("Internal error");
+
+      if(log) {
+	 msg.str("");
+	 msg << "deb cdrom:[" << Name << "]/" << string(*I,0,Space) << 
+	    " " << string(*I,Space+1) << endl;
+	 log->Update(msg.str());
+      }
+   }
+
+   for (vector<string>::iterator I = SourceList.begin(); I != SourceList.end(); I++)
+   {
+      string::size_type Space = (*I).find(' ');
+      if (Space == string::npos)
+	 return _error->Error("Internal error");
+
+      if(log) {
+	 msg.str("");
+	 msg << "deb-src cdrom:[" << Name << "]/" << string(*I,0,Space) << 
+	    " " << string(*I,Space+1) << endl;
+	 log->Update(msg.str());
+      }
+   }
+
+   
+
+   // Unmount and finish
+   if (_config->FindB("APT::CDROM::NoMount",false) == false) {
+      log->Update(_("Unmounting CD-ROM..."), STEP_LAST);
+      UnmountCdrom(CDROM);
+   }
+
+   return true;
+}

+ 71 - 0
apt-pkg/cdrom.h

@@ -0,0 +1,71 @@
+#ifndef PKGLIB_CDROM_H
+#define PKGLIB_CDROM_H
+
+#include<apt-pkg/init.h>
+#include<string>
+#include<vector>
+
+#ifdef __GNUG__
+#pragma interface "apt-pkg/cdrom.h"
+#endif
+
+using namespace std;
+
+class pkgCdromStatus
+{
+ protected:
+   int totalSteps;
+
+ public:
+   pkgCdromStatus() {};
+   virtual ~pkgCdromStatus() {};
+
+   // total steps
+   virtual void SetTotal(int total) { totalSteps = total; };
+   // update steps, will be called regularly as a "pulse"
+   virtual void Update(string text="", int current=0) = 0;
+   
+   // ask for cdrom insert
+   virtual bool ChangeCdrom() = 0;
+   // ask for cdrom name
+   virtual bool AskCdromName(string &Name) = 0;
+   // Progress indicator for the Index rewriter
+   virtual OpProgress* GetOpProgress() {return NULL; };
+};
+
+class pkgCdrom 
+{
+ protected:
+   enum {
+      STEP_PREPARE = 1,
+      STEP_UNMOUNT,
+      STEP_WAIT,
+      STEP_MOUNT,
+      STEP_IDENT,
+      STEP_SCAN,
+      STEP_COPY,
+      STEP_WRITE,
+      STEP_UNMOUNT3,
+      STEP_LAST
+   };
+
+
+   bool FindPackages(string CD,vector<string> &List,
+		     vector<string> &SList, vector<string> &SigList,
+		     string &InfoDir, pkgCdromStatus *log,
+		     unsigned int Depth = 0);
+   bool DropBinaryArch(vector<string> &List);
+   bool DropRepeats(vector<string> &List,const char *Name);
+   void ReduceSourcelist(string CD,vector<string> &List);
+   bool WriteDatabase(Configuration &Cnf);
+   bool WriteSourceList(string Name,vector<string> &List,bool Source);
+   int Score(string Path);
+
+ public:
+   bool Ident(string &ident, pkgCdromStatus *log);
+   bool Add(pkgCdromStatus *log);
+};
+
+
+
+#endif

+ 3 - 2
apt-pkg/contrib/fileutl.cc

@@ -306,7 +306,7 @@ bool WaitFd(int Fd,bool write,unsigned long timeout)
 /* This is used if you want to cleanse the environment for the forked 
 /* This is used if you want to cleanse the environment for the forked 
    child, it fixes up the important signals and nukes all of the fds,
    child, it fixes up the important signals and nukes all of the fds,
    otherwise acts like normal fork. */
    otherwise acts like normal fork. */
-pid_t ExecFork()
+pid_t ExecFork(int dontCloseThisFd)
 {
 {
    // Fork off the process
    // Fork off the process
    pid_t Process = fork();
    pid_t Process = fork();
@@ -329,7 +329,8 @@ pid_t ExecFork()
       
       
       // Close all of our FDs - just in case
       // Close all of our FDs - just in case
       for (int K = 3; K != 40; K++)
       for (int K = 3; K != 40; K++)
-	 fcntl(K,F_SETFD,FD_CLOEXEC);
+	 if(K != dontCloseThisFd)
+	    fcntl(K,F_SETFD,FD_CLOEXEC);
    }
    }
    
    
    return Process;
    return Process;

+ 1 - 1
apt-pkg/contrib/fileutl.h

@@ -87,7 +87,7 @@ string SafeGetCWD();
 void SetCloseExec(int Fd,bool Close);
 void SetCloseExec(int Fd,bool Close);
 void SetNonBlock(int Fd,bool Block);
 void SetNonBlock(int Fd,bool Block);
 bool WaitFd(int Fd,bool write = false,unsigned long timeout = 0);
 bool WaitFd(int Fd,bool write = false,unsigned long timeout = 0);
-pid_t ExecFork();
+pid_t ExecFork(int dontCloseThisFd=-1);
 bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
 bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
 
 
 // File string manipulators
 // File string manipulators

+ 8 - 3
apt-pkg/contrib/sha1.cc

@@ -343,11 +343,16 @@ bool SHA1Summation::AddFD(int Fd,unsigned long Size)
 {
 {
    unsigned char Buf[64 * 64];
    unsigned char Buf[64 * 64];
    int Res = 0;
    int Res = 0;
-   while (Size != 0)
+   int ToEOF = (Size == 0);
+   while (Size != 0 || ToEOF)
    {
    {
-      Res = read(Fd,Buf,MIN(Size,sizeof(Buf)));
-      if (Res < 0 || (unsigned) Res != MIN(Size,sizeof(Buf)))
+      unsigned n = sizeof(Buf);
+      if (!ToEOF) n = MIN(Size,n);
+      Res = read(Fd,Buf,n);
+      if (Res < 0 || (!ToEOF && (unsigned) Res != n)) // error, or short read
 	 return false;
 	 return false;
+      if (ToEOF && Res == 0) // EOF
+         break;
       Size -= Res;
       Size -= Res;
       Add(Buf,Res);
       Add(Buf,Res);
    }
    }

+ 17 - 2
apt-pkg/deb/dpkgpm.cc

@@ -326,7 +326,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
 // DPkgPM::Go - Run the sequence					/*{{{*/
 // DPkgPM::Go - Run the sequence					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This globs the operations and calls dpkg */
 /* This globs the operations and calls dpkg */
-bool pkgDPkgPM::Go()
+bool pkgDPkgPM::Go(int status_fd)
 {
 {
    unsigned int MaxArgs = _config->FindI("Dpkg::MaxArgs",8*1024);   
    unsigned int MaxArgs = _config->FindI("Dpkg::MaxArgs",8*1024);   
    unsigned int MaxArgBytes = _config->FindI("Dpkg::MaxArgBytes",32*1024);
    unsigned int MaxArgBytes = _config->FindI("Dpkg::MaxArgBytes",32*1024);
@@ -367,6 +367,17 @@ bool pkgDPkgPM::Go()
 	 }	 
 	 }	 
       }
       }
       
       
+      // if we got a status_fd argument, we pass it to apt
+      char status_fd_buf[20];
+      if(status_fd > 0) 
+      {
+	 Args[n++] = "--status-fd";
+	 Size += strlen(Args[n-1]);
+	 snprintf(status_fd_buf,20,"%i",status_fd);
+	 Args[n++] = status_fd_buf;
+	 Size += strlen(Args[n-1]);
+      } 
+
       switch (I->Op)
       switch (I->Op)
       {
       {
 	 case Item::Remove:
 	 case Item::Remove:
@@ -440,7 +451,11 @@ bool pkgDPkgPM::Go()
       sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN);
       sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN);
 		     
 		     
       // Fork dpkg
       // Fork dpkg
-      pid_t Child = ExecFork();
+      pid_t Child;
+      if(status_fd > 0)
+	 Child = ExecFork(status_fd);
+      else
+	 Child = ExecFork();
             
             
       // This is the child
       // This is the child
       if (Child == 0)
       if (Child == 0)

+ 1 - 1
apt-pkg/deb/dpkgpm.h

@@ -45,7 +45,7 @@ class pkgDPkgPM : public pkgPackageManager
    virtual bool Install(PkgIterator Pkg,string File);
    virtual bool Install(PkgIterator Pkg,string File);
    virtual bool Configure(PkgIterator Pkg);
    virtual bool Configure(PkgIterator Pkg);
    virtual bool Remove(PkgIterator Pkg,bool Purge = false);
    virtual bool Remove(PkgIterator Pkg,bool Purge = false);
-   virtual bool Go();
+   virtual bool Go(int status_fd=-1);
    virtual void Reset();
    virtual void Reset();
    
    
    public:
    public:

+ 164 - 44
cmdline/indexcopy.cc

@@ -18,8 +18,13 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
+#include <apt-pkg/indexrecords.h>
+#include <apt-pkg/md5.h>
+#include <apt-pkg/cdrom.h>
+#include <apti18n.h>
 
 
 #include <iostream>
 #include <iostream>
+#include <sstream>
 #include <unistd.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <stdio.h>
 #include <stdio.h>
@@ -30,12 +35,15 @@ using namespace std;
 // IndexCopy::CopyPackages - Copy the package files from the CD		/*{{{*/
 // IndexCopy::CopyPackages - Copy the package files from the CD		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List)
+bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List,
+			     pkgCdromStatus *log)
 {
 {
+   OpProgress *Progress = NULL;
    if (List.size() == 0)
    if (List.size() == 0)
       return true;
       return true;
    
    
-   OpTextProgress Progress;
+   if(log) 
+      Progress = log->GetOpProgress();
    
    
    bool NoStat = _config->FindB("APT::CDROM::Fast",false);
    bool NoStat = _config->FindB("APT::CDROM::Fast",false);
    bool Debug = _config->FindB("Debug::aptcdrom",false);
    bool Debug = _config->FindB("Debug::aptcdrom",false);
@@ -130,11 +138,13 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List)
 	 return _error->Errno("fdopen","Failed to reopen fd");
 	 return _error->Errno("fdopen","Failed to reopen fd");
       
       
       // Setup the progress meter
       // Setup the progress meter
-      Progress.OverallProgress(CurrentSize,TotalSize,FileSize,
-			       string("Reading ") + Type() + " Indexes");
+      if(Progress)
+	 Progress->OverallProgress(CurrentSize,TotalSize,FileSize,
+				   string("Reading ") + Type() + " Indexes");
 
 
       // Parse
       // Parse
-      Progress.SubProgress(Pkg.Size());
+      if(Progress)
+	 Progress->SubProgress(Pkg.Size());
       pkgTagSection Section;
       pkgTagSection Section;
       this->Section = &Section;
       this->Section = &Section;
       string Prefix;
       string Prefix;
@@ -142,7 +152,8 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List)
       unsigned long Chop = 0;
       unsigned long Chop = 0;
       while (Parser.Step(Section) == true)
       while (Parser.Step(Section) == true)
       {
       {
-	 Progress.Progress(Parser.Offset());
+	 if(Progress)
+	    Progress->Progress(Parser.Offset());
 	 string File;
 	 string File;
 	 unsigned long Size;
 	 unsigned long Size;
 	 if (GetFile(File,Size) == false)
 	 if (GetFile(File,Size) == false)
@@ -230,35 +241,8 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List)
 	 FinalF += URItoFileName(S);
 	 FinalF += URItoFileName(S);
 	 if (rename(TargetF.c_str(),FinalF.c_str()) != 0)
 	 if (rename(TargetF.c_str(),FinalF.c_str()) != 0)
 	    return _error->Errno("rename","Failed to rename");
 	    return _error->Errno("rename","Failed to rename");
-
-	 // Copy the release file
-	 snprintf(S,sizeof(S),"cdrom:[%s]/%sRelease",Name.c_str(),
-		  (*I).c_str() + CDROM.length());
-	 string TargetF = _config->FindDir("Dir::State::lists") + "partial/";
-	 TargetF += URItoFileName(S);
-	 if (FileExists(*I + "Release") == true)
-	 {
-	    FileFd Target(TargetF,FileFd::WriteEmpty);
-	    FileFd Rel(*I + "Release",FileFd::ReadOnly);
-	    if (_error->PendingError() == true)
-	       return false;
-	    
-	    if (CopyFile(Rel,Target) == false)
-	       return false;
-	 }
-	 else
-	 {
-	    // Empty release file
-	    FileFd Target(TargetF,FileFd::WriteEmpty);	    
-	 }	 
-
-	 // Rename the release file
-	 FinalF = _config->FindDir("Dir::State::lists");
-	 FinalF += URItoFileName(S);
-	 if (rename(TargetF.c_str(),FinalF.c_str()) != 0)
-	    return _error->Errno("rename","Failed to rename");
       }
       }
-      
+	 
       /* Mangle the source to be in the proper notation with
       /* Mangle the source to be in the proper notation with
        	 prefix dist [component] */ 
        	 prefix dist [component] */ 
       *I = string(*I,Prefix.length());
       *I = string(*I,Prefix.length());
@@ -267,23 +251,30 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List)
       
       
       CurrentSize += FileSize;
       CurrentSize += FileSize;
    }   
    }   
-   Progress.Done();
+   if(Progress)
+      Progress->Done();
    
    
    // Some stats
    // Some stats
-   cout << "Wrote " << Packages << " records" ;
-   if (NotFound != 0)
-      cout << " with " << NotFound << " missing files";
-   if (NotFound != 0 && WrongSize != 0)
-      cout << " and"; 
-   if (WrongSize != 0)
-      cout << " with " << WrongSize << " mismatched files";
-   cout << '.' << endl;
+   if(log) {
+      stringstream msg;
+      if(NotFound == 0 && WrongSize == 0)
+	 ioprintf(msg, _("Wrote %i records.\n"), Packages);
+      else if (NotFound != 0 && WrongSize == 0)
+	 ioprintf(msg, _("Wrote %i records with %i missing files.\n"), 
+		  Packages, NotFound);
+      else if (NotFound == 0 && WrongSize != 0)
+	 ioprintf(msg, _("Wrote %i records with %i mismachted files\n"), 
+		  Packages, WrongSize);
+      if (NotFound != 0 && WrongSize != 0)
+	 ioprintf(msg, _("Wrote %i records with %i missing files and %i mismachted files\n"), Packages, NotFound, WrongSize);
+   }
    
    
    if (Packages == 0)
    if (Packages == 0)
       _error->Warning("No valid records were found.");
       _error->Warning("No valid records were found.");
 
 
    if (NotFound + WrongSize > 10)
    if (NotFound + WrongSize > 10)
-      cout << "Alot of entries were discarded, something may be wrong." << endl;
+      _error->Warning("Alot of entries were discarded, something may be wrong.\n");
+   
 
 
    return true;
    return true;
 }
 }
@@ -521,4 +512,133 @@ bool SourceCopy::RewriteEntry(FILE *Target,string File)
    fputc('\n',Target);
    fputc('\n',Target);
    return true;
    return true;
 }
 }
+
+
 									/*}}}*/
 									/*}}}*/
+
+bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
+{
+   const indexRecords::checkSum *Record = MetaIndex->Lookup(file);
+
+   if (!Record) 
+   {
+      _error->Warning("Can't find authentication record for: %s",file.c_str());
+      return false;
+   }
+
+   MD5Summation sum;
+   FileFd Fd(prefix+file, FileFd::ReadOnly);
+   sum.AddFD(Fd.Fd(), Fd.Size());
+   Fd.Close();
+   string MD5 = (string)sum.Result();
+   
+   if (Record->MD5Hash != MD5)
+   {
+      _error->Warning("MD5 mismatch for: %s",file.c_str());
+      return false;
+   }
+
+   if(_config->FindB("Debug::aptcdrom",false)) 
+   {
+      cout << "File: " << prefix+file << endl;
+      cout << "Expected MD5sum: " << Record->MD5Hash << endl;
+      cout << "got: " << MD5 << endl << endl;
+   }
+
+   return true;
+}
+
+bool SigVerify::CopyMetaIndex(string CDROM, string CDName, 
+			      string prefix, string file)
+{
+      char S[400];
+      snprintf(S,sizeof(S),"cdrom:[%s]/%s%s",CDName.c_str(),
+	       (prefix).c_str() + CDROM.length(),file.c_str());
+      string TargetF = _config->FindDir("Dir::State::lists");
+      TargetF += URItoFileName(S);
+
+      FileFd Target;
+      FileFd Rel;
+      Target.Open(TargetF,FileFd::WriteEmpty);
+      Rel.Open(prefix + file,FileFd::ReadOnly);
+      if (_error->PendingError() == true)
+	 return false;
+      if (CopyFile(Rel,Target) == false)
+	 return false;
+   
+      return true;
+}
+
+bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
+			      vector<string> PkgList,vector<string> SrcList)
+{
+   if (SigList.size() == 0)
+      return true;
+
+   bool Debug = _config->FindB("Debug::aptcdrom",false);
+
+   // Read all Release files
+   for (vector<string>::iterator I = SigList.begin(); I != SigList.end(); I++)
+   { 
+      if(Debug)
+	 cout << "Signature verify for: " << *I << endl;
+
+      indexRecords *MetaIndex = new indexRecords;
+      string prefix = *I; 
+
+      // a Release.gpg without a Release should never happen
+      if(!FileExists(*I+"Release"))
+	 continue;
+
+
+      // verify the gpg signature of "Release"
+      // gpg --verify "*I+Release.gpg", "*I+Release"
+      string gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv");
+      string pubringpath = _config->Find("Apt::GPGV::TrustedKeyring", "/etc/apt/trusted.gpg");
+      pid_t pid = ExecFork();
+      if(pid < 0) {
+	 _error->Error("Fork failed");
+	 return false;
+      }
+      if(pid == 0) {
+	 execlp(gpgvpath.c_str(), gpgvpath.c_str(), "--keyring", 
+		pubringpath.c_str(), string(*I+"Release.gpg").c_str(), 
+		string(*I+"Release").c_str(), NULL);
+      }
+      if(!ExecWait(pid, "gpgv")) {
+	 _error->Warning("Signature verification failed for: %s",
+			 string(*I+"Release.gpg").c_str());
+	 // something went wrong, don't copy the Release.gpg
+	 // FIXME: delete any existing gpg file?
+	 continue;
+      }
+
+      // Open the Release file and add it to the MetaIndex
+      if(!MetaIndex->Load(*I+"Release"))
+      {
+	 _error->Error(MetaIndex->ErrorText.c_str());
+	 return false;
+      }
+      
+      // go over the Indexfiles and see if they verify
+      // if so, remove them from our copy of the lists
+      vector<string> keys = MetaIndex->MetaKeys();
+      for (vector<string>::iterator I = keys.begin(); I != keys.end(); I++)
+      { 
+	 if(!Verify(prefix,*I, MetaIndex)) {
+	    // something went wrong, don't copy the Release.gpg
+	    // FIXME: delete any existing gpg file?
+	    continue;	 
+	 }
+      }
+
+      // we need a fresh one for the Release.gpg
+      delete MetaIndex;
+   
+      // everything was fine, copy the Release and Release.gpg file
+      CopyMetaIndex(CDROM, Name, prefix, "Release");
+      CopyMetaIndex(CDROM, Name, prefix, "Release.gpg");
+   }   
+
+   return true;
+}

+ 15 - 1
cmdline/indexcopy.h

@@ -19,6 +19,8 @@ using std::vector;
 
 
 class pkgTagSection;
 class pkgTagSection;
 class FileFd;
 class FileFd;
+class indexRecords;
+class pkgCdromStatus;
 
 
 class IndexCopy
 class IndexCopy
 {
 {
@@ -39,7 +41,8 @@ class IndexCopy
    
    
    public:
    public:
 
 
-   bool CopyPackages(string CDROM,string Name,vector<string> &List);
+   bool CopyPackages(string CDROM,string Name,vector<string> &List,
+		     pkgCdromStatus *log);
 };
 };
 
 
 class PackageCopy : public IndexCopy
 class PackageCopy : public IndexCopy
@@ -66,4 +69,15 @@ class SourceCopy : public IndexCopy
    public:
    public:
 };
 };
 
 
+class SigVerify 
+{
+   bool Verify(string prefix,string file, indexRecords *records);
+   bool CopyMetaIndex(string CDROM, string CDName, 
+		      string prefix, string file);
+
+ public:
+   bool CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
+		      vector<string> PkgList,vector<string> SrcList);
+};
+
 #endif
 #endif

+ 11 - 0
apt-pkg/indexrecords.cc

@@ -83,6 +83,17 @@ bool indexRecords::Load(const string Filename)
    return true;
    return true;
 }
 }
 
 
+vector<string> indexRecords::MetaKeys()
+{
+   std::vector<std::string> keys;
+   std::map<string,checkSum *>::iterator I = Entries.begin();
+   while(I != Entries.end()) {
+      keys.push_back((*I).first);
+      ++I;
+   }
+   return keys;
+}
+
 bool indexRecords::parseSumData(const char *&Start, const char *End,
 bool indexRecords::parseSumData(const char *&Start, const char *End,
 				   string &Name, string &Hash, size_t &Size)
 				   string &Name, string &Hash, size_t &Size)
 {
 {

+ 3 - 1
apt-pkg/indexrecords.h

@@ -12,6 +12,7 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 
 
 #include <map>
 #include <map>
+#include <vector>
 
 
 class indexRecords
 class indexRecords
 {
 {
@@ -34,7 +35,8 @@ class indexRecords
 
 
    // Lookup function
    // Lookup function
    virtual const checkSum *Lookup(const string MetaKey);
    virtual const checkSum *Lookup(const string MetaKey);
-   
+   std::vector<std::string> MetaKeys();
+
    virtual bool Load(string Filename);
    virtual bool Load(string Filename);
    string GetDist() const;
    string GetDist() const;
    virtual bool CheckDist(const string MaybeDist) const;
    virtual bool CheckDist(const string MaybeDist) const;

+ 3 - 3
apt-pkg/makefile

@@ -13,7 +13,7 @@ include ../buildlib/defaults.mak
 # methods/makefile - FIXME
 # methods/makefile - FIXME
 LIBRARY=apt-pkg
 LIBRARY=apt-pkg
 LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
 LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
-MAJOR=3.7
+MAJOR=3.9
 MINOR=0
 MINOR=0
 SLIBS=$(PTHREADLIB) $(INTLLIBS)
 SLIBS=$(PTHREADLIB) $(INTLLIBS)
 APT_DOMAIN:=libapt-pkg$(MAJOR)
 APT_DOMAIN:=libapt-pkg$(MAJOR)
@@ -34,14 +34,14 @@ SOURCE+= pkgcache.cc version.cc depcache.cc \
 	 acquire-worker.cc acquire-method.cc init.cc clean.cc \
 	 acquire-worker.cc acquire-method.cc init.cc clean.cc \
 	 srcrecords.cc cachefile.cc versionmatch.cc policy.cc \
 	 srcrecords.cc cachefile.cc versionmatch.cc policy.cc \
 	 pkgsystem.cc indexfile.cc pkgcachegen.cc acquire-item.cc \
 	 pkgsystem.cc indexfile.cc pkgcachegen.cc acquire-item.cc \
-	 indexrecords.cc vendor.cc vendorlist.cc
+	 indexrecords.cc vendor.cc vendorlist.cc cdrom.cc indexcopy.cc
 HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \
 HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \
 	  orderlist.h sourcelist.h packagemanager.h tagfile.h \
 	  orderlist.h sourcelist.h packagemanager.h tagfile.h \
 	  init.h pkgcache.h version.h progress.h pkgrecords.h \
 	  init.h pkgcache.h version.h progress.h pkgrecords.h \
 	  acquire.h acquire-worker.h acquire-item.h acquire-method.h \
 	  acquire.h acquire-worker.h acquire-item.h acquire-method.h \
 	  clean.h srcrecords.h cachefile.h versionmatch.h policy.h \
 	  clean.h srcrecords.h cachefile.h versionmatch.h policy.h \
 	  pkgsystem.h indexfile.h metaindex.h indexrecords.h vendor.h \
 	  pkgsystem.h indexfile.h metaindex.h indexrecords.h vendor.h \
-          vendorlist.h
+          vendorlist.h cdrom.h indexcopy.h
 
 
 # Source code for the debian specific components
 # Source code for the debian specific components
 # In theory the deb headers do not need to be exported..
 # In theory the deb headers do not need to be exported..

+ 1 - 1
apt-pkg/packagemanager.h

@@ -68,7 +68,7 @@ class pkgPackageManager : protected pkgCache::Namespace
    virtual bool Install(PkgIterator /*Pkg*/,string /*File*/) {return false;};
    virtual bool Install(PkgIterator /*Pkg*/,string /*File*/) {return false;};
    virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
    virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
    virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
    virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
-   virtual bool Go() {return true;};
+   virtual bool Go(int statusFd=-1) {return true;};
    virtual void Reset() {};
    virtual void Reset() {};
    
    
    public:
    public:

+ 56 - 649
cmdline/apt-cdrom.cc

@@ -18,10 +18,13 @@
 #include <apt-pkg/progress.h>
 #include <apt-pkg/progress.h>
 #include <apt-pkg/cdromutl.h>
 #include <apt-pkg/cdromutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/cdrom.h>
 #include <config.h>
 #include <config.h>
 #include <apti18n.h>
 #include <apti18n.h>
     
     
-#include "indexcopy.h"
+//#include "indexcopy.h"
 
 
 #include <locale.h>
 #include <locale.h>
 #include <iostream>
 #include <iostream>
@@ -37,460 +40,65 @@
 
 
 using namespace std;
 using namespace std;
 
 
-// FindPackages - Find the package files on the CDROM			/*{{{*/
-// ---------------------------------------------------------------------
-/* We look over the cdrom for package files. This is a recursive
-   search that short circuits when it his a package file in the dir.
-   This speeds it up greatly as the majority of the size is in the
-   binary-* sub dirs. */
-bool FindPackages(string CD,vector<string> &List,vector<string> &SList,
-		  string &InfoDir,unsigned int Depth = 0)
+                                                                        /*{{{*/
+class pkgCdromTextStatus : public pkgCdromStatus
 {
 {
-   static ino_t Inodes[9];
-   if (Depth >= 7)
-      return true;
-
-   if (CD[CD.length()-1] != '/')
-      CD += '/';   
-
-   if (chdir(CD.c_str()) != 0)
-      return _error->Errno("chdir","Unable to change to %s",CD.c_str());
-
-   // Look for a .disk subdirectory
-   struct stat Buf;
-   if (stat(".disk",&Buf) == 0)
-   {
-      if (InfoDir.empty() == true)
-	 InfoDir = CD + ".disk/";
-   }
-
-   // Don't look into directories that have been marked to ingore.
-   if (stat(".aptignr",&Buf) == 0)
-      return true;
-   
-   /* Aha! We found some package files. We assume that everything under 
-      this dir is controlled by those package files so we don't look down
-      anymore */
-   if (stat("Packages",&Buf) == 0 || stat("Packages.gz",&Buf) == 0)
-   {
-      List.push_back(CD);
-      
-      // Continue down if thorough is given
-      if (_config->FindB("APT::CDROM::Thorough",false) == false)
-	 return true;
-   }
-   if (stat("Sources.gz",&Buf) == 0 || stat("Sources",&Buf) == 0)
-   {
-      SList.push_back(CD);
-      
-      // Continue down if thorough is given
-      if (_config->FindB("APT::CDROM::Thorough",false) == false)
-	 return true;
-   }
-   
-   DIR *D = opendir(".");
-   if (D == 0)
-      return _error->Errno("opendir","Unable to read %s",CD.c_str());
-   
-   // Run over the directory
-   for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D))
-   {
-      // Skip some files..
-      if (strcmp(Dir->d_name,".") == 0 ||
-	  strcmp(Dir->d_name,"..") == 0 ||
-	  //strcmp(Dir->d_name,"source") == 0 ||
-	  strcmp(Dir->d_name,".disk") == 0 ||
-	  strcmp(Dir->d_name,"experimental") == 0 ||
-	  strcmp(Dir->d_name,"binary-all") == 0 ||
-          strcmp(Dir->d_name,"debian-installer") == 0)
-	 continue;
-
-      // See if the name is a sub directory
-      struct stat Buf;
-      if (stat(Dir->d_name,&Buf) != 0)
-	 continue;      
-      
-      if (S_ISDIR(Buf.st_mode) == 0)
-	 continue;
-      
-      unsigned int I;
-      for (I = 0; I != Depth; I++)
-	 if (Inodes[I] == Buf.st_ino)
-	    break;
-      if (I != Depth)
-	 continue;
-      
-      // Store the inodes weve seen
-      Inodes[Depth] = Buf.st_ino;
-
-      // Descend
-      if (FindPackages(CD + Dir->d_name,List,SList,InfoDir,Depth+1) == false)
-	 break;
-
-      if (chdir(CD.c_str()) != 0)
-	 return _error->Errno("chdir","Unable to change to %s",CD.c_str());
-   };
-
-   closedir(D);
-   
-   return !_error->PendingError();
-}
-									/*}}}*/
-// DropBinaryArch - Dump dirs with a string like /binary-<foo>/		/*{{{*/
-// ---------------------------------------------------------------------
-/* Here we drop everything that is not this machines arch */
-bool DropBinaryArch(vector<string> &List)
+protected:
+   OpTextProgress Progress;
+   void Prompt(const char *Text); 
+   string PromptLine(const char *Text);
+   bool AskCdromName(string &name);
+
+public:
+   virtual void Update(string text, int current);
+   virtual bool ChangeCdrom();
+   virtual OpProgress* GetOpProgress();
+};
+
+void pkgCdromTextStatus::Prompt(const char *Text) 
 {
 {
-   char S[300];
-   snprintf(S,sizeof(S),"/binary-%s/",
-	    _config->Find("Apt::Architecture").c_str());
-   
-   for (unsigned int I = 0; I < List.size(); I++)
-   {
-      const char *Str = List[I].c_str();
-      
-      const char *Res;
-      if ((Res = strstr(Str,"/binary-")) == 0)
-	 continue;
-
-      // Weird, remove it.
-      if (strlen(Res) < strlen(S))
-      {
-	 List.erase(List.begin() + I);
-	 I--;
-	 continue;
-      }
-	  
-      // See if it is our arch
-      if (stringcmp(Res,Res + strlen(S),S) == 0)
-	 continue;
-      
-      // Erase it
-      List.erase(List.begin() + I);
-      I--;
-   }
-   
-   return true;
+   char C;
+   cout << Text << ' ' << flush;
+   read(STDIN_FILENO,&C,1);
+   if (C != '\n')
+      cout << endl;
 }
 }
-									/*}}}*/
-// Score - We compute a 'score' for a path				/*{{{*/
-// ---------------------------------------------------------------------
-/* Paths are scored based on how close they come to what I consider
-   normal. That is ones that have 'dist' 'stable' 'testing' will score
-   higher than ones without. */
-int Score(string Path)
+
+string pkgCdromTextStatus::PromptLine(const char *Text)
 {
 {
-   int Res = 0;
-   if (Path.find("stable/") != string::npos)
-      Res += 29;
-   if (Path.find("/binary-") != string::npos)
-      Res += 20;
-   if (Path.find("testing/") != string::npos)
-      Res += 28;
-   if (Path.find("unstable/") != string::npos)
-      Res += 27;
-   if (Path.find("/dists/") != string::npos)
-      Res += 40;
-   if (Path.find("/main/") != string::npos)
-      Res += 20;
-   if (Path.find("/contrib/") != string::npos)
-      Res += 20;
-   if (Path.find("/non-free/") != string::npos)
-      Res += 20;
-   if (Path.find("/non-US/") != string::npos)
-      Res += 20;
-   if (Path.find("/source/") != string::npos)
-      Res += 10;
-   if (Path.find("/debian/") != string::npos)
-      Res -= 10;
+   cout << Text << ':' << endl;
+   
+   string Res;
+   getline(cin,Res);
    return Res;
    return Res;
 }
 }
-									/*}}}*/
-// DropRepeats - Drop repeated files resulting from symlinks		/*{{{*/
-// ---------------------------------------------------------------------
-/* Here we go and stat every file that we found and strip dup inodes. */
-bool DropRepeats(vector<string> &List,const char *Name)
+
+bool pkgCdromTextStatus::AskCdromName(string &name) 
 {
 {
-   // Get a list of all the inodes
-   ino_t *Inodes = new ino_t[List.size()];
-   for (unsigned int I = 0; I != List.size(); I++)
-   {
-      struct stat Buf;
-      if (stat((List[I] + Name).c_str(),&Buf) != 0 &&
-	  stat((List[I] + Name + ".gz").c_str(),&Buf) != 0)
-	 _error->Errno("stat","Failed to stat %s%s",List[I].c_str(),
-		       Name);
-      Inodes[I] = Buf.st_ino;
-   }
-   
-   if (_error->PendingError() == true)
-      return false;
-   
-   // Look for dups
-   for (unsigned int I = 0; I != List.size(); I++)
-   {
-      for (unsigned int J = I+1; J < List.size(); J++)
-      {
-	 // No match
-	 if (Inodes[J] != Inodes[I])
-	    continue;
-	 
-	 // We score the two paths.. and erase one
-	 int ScoreA = Score(List[I]);
-	 int ScoreB = Score(List[J]);
-	 if (ScoreA < ScoreB)
-	 {
-	    List[I] = string();
-	    break;
-	 }
+   cout << "Please provide a name for this Disc, such as 'Debian 2.1r1 Disk 1'" << flush;
+   name = PromptLine("");
 	 
 	 
-	 List[J] = string();
-      }
-   }  
- 
-   // Wipe erased entries
-   for (unsigned int I = 0; I < List.size();)
-   {
-      if (List[I].empty() == false)
-	 I++;
-      else
-	 List.erase(List.begin()+I);
-   }
-   
    return true;
    return true;
 }
 }
-									/*}}}*/
-
-// ReduceSourceList - Takes the path list and reduces it		/*{{{*/
-// ---------------------------------------------------------------------
-/* This takes the list of source list expressed entires and collects
-   similar ones to form a single entry for each dist */
-void ReduceSourcelist(string CD,vector<string> &List)
-{
-   sort(List.begin(),List.end());
    
    
-   // Collect similar entries
-   for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
-   {
-      // Find a space..
-      string::size_type Space = (*I).find(' ');
-      if (Space == string::npos)
-	 continue;
-      string::size_type SSpace = (*I).find(' ',Space + 1);
-      if (SSpace == string::npos)
-	 continue;
 
 
-      string Word1 = string(*I,Space,SSpace-Space);
-      string Prefix = string(*I,0,Space);
-      for (vector<string>::iterator J = List.begin(); J != I; J++)
-      {
-	 // Find a space..
-	 string::size_type Space2 = (*J).find(' ');
-	 if (Space2 == string::npos)
-	    continue;
-	 string::size_type SSpace2 = (*J).find(' ',Space2 + 1);
-	 if (SSpace2 == string::npos)
-	    continue;
-	 
-	 if (string(*J,0,Space2) != Prefix)
-	    continue;
-	 if (string(*J,Space2,SSpace2-Space2) != Word1)
-	    continue;
-	 
-	 *J += string(*I,SSpace);
-	 *I = string();
-      }
-   }   
-
-   // Wipe erased entries
-   for (unsigned int I = 0; I < List.size();)
-   {
-      if (List[I].empty() == false)
-	 I++;
-      else
-	 List.erase(List.begin()+I);
-   }
-}
-									/*}}}*/
-// WriteDatabase - Write the CDROM Database file			/*{{{*/
-// ---------------------------------------------------------------------
-/* We rewrite the configuration class associated with the cdrom database. */
-bool WriteDatabase(Configuration &Cnf)
+void pkgCdromTextStatus::Update(string text, int current) 
 {
 {
-   string DFile = _config->FindFile("Dir::State::cdroms");
-   string NewFile = DFile + ".new";
-   
-   unlink(NewFile.c_str());
-   ofstream Out(NewFile.c_str());
-   if (!Out)
-      return _error->Errno("ofstream::ofstream",
-			   "Failed to open %s.new",DFile.c_str());
-   
-   /* Write out all of the configuration directives by walking the
-      configuration tree */
-   const Configuration::Item *Top = Cnf.Tree(0);
-   for (; Top != 0;)
-   {
-      // Print the config entry
-      if (Top->Value.empty() == false)
-	 Out <<  Top->FullTag() + " \"" << Top->Value << "\";" << endl;
-      
-      if (Top->Child != 0)
-      {
-	 Top = Top->Child;
-	 continue;
-      }
-      
-      while (Top != 0 && Top->Next == 0)
-	 Top = Top->Parent;
-      if (Top != 0)
-	 Top = Top->Next;
-   }   
-
-   Out.close();
-   
-   rename(DFile.c_str(),string(DFile + '~').c_str());
-   if (rename(NewFile.c_str(),DFile.c_str()) != 0)
-      return _error->Errno("rename","Failed to rename %s.new to %s",
-			   DFile.c_str(),DFile.c_str());
-
-   return true;
+   if(text.size() > 0)
+      cout << text << flush;
 }
 }
-									/*}}}*/
-// WriteSourceList - Write an updated sourcelist			/*{{{*/
-// ---------------------------------------------------------------------
-/* This reads the old source list and copies it into the new one. It 
-   appends the new CDROM entires just after the first block of comments.
-   This places them first in the file. It also removes any old entries
-   that were the same. */
-bool WriteSourceList(string Name,vector<string> &List,bool Source)
-{
-   if (List.size() == 0)
-      return true;
-
-   string File = _config->FindFile("Dir::Etc::sourcelist");
-
-   // Open the stream for reading
-   ifstream F((FileExists(File)?File.c_str():"/dev/null"),
-	      ios::in );
-   if (!F != 0)
-      return _error->Errno("ifstream::ifstream","Opening %s",File.c_str());
-
-   string NewFile = File + ".new";
-   unlink(NewFile.c_str());
-   ofstream Out(NewFile.c_str());
-   if (!Out)
-      return _error->Errno("ofstream::ofstream",
-			   "Failed to open %s.new",File.c_str());
 
 
-   // Create a short uri without the path
-   string ShortURI = "cdrom:[" + Name + "]/";   
-   string ShortURI2 = "cdrom:" + Name + "/";     // For Compatibility
-
-   const char *Type;
-   if (Source == true)
-      Type = "deb-src";
-   else
-      Type = "deb";
-   
-   char Buffer[300];
-   int CurLine = 0;
-   bool First = true;
-   while (F.eof() == false)
-   {      
-      F.getline(Buffer,sizeof(Buffer));
-      CurLine++;
-      _strtabexpand(Buffer,sizeof(Buffer));
-      _strstrip(Buffer);
-            
-      // Comment or blank
-      if (Buffer[0] == '#' || Buffer[0] == 0)
-      {
-	 Out << Buffer << endl;
-	 continue;
-      }
-
-      if (First == true)
-      {
-	 for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
-	 {
-	    string::size_type Space = (*I).find(' ');
-	    if (Space == string::npos)
-	       return _error->Error("Internal error");
-	    Out << Type << " cdrom:[" << Name << "]/" << string(*I,0,Space) <<
-	       " " << string(*I,Space+1) << endl;
-	 }
-      }
-      First = false;
-      
-      // Grok it
-      string cType;
-      string URI;
-      const char *C = Buffer;
-      if (ParseQuoteWord(C,cType) == false ||
-	  ParseQuoteWord(C,URI) == false)
-      {
-	 Out << Buffer << endl;
-	 continue;
-      }
-
-      // Emit lines like this one
-      if (cType != Type || (string(URI,0,ShortURI.length()) != ShortURI &&
-	  string(URI,0,ShortURI.length()) != ShortURI2))
-      {
-	 Out << Buffer << endl;
-	 continue;
-      }      
-   }
-   
-   // Just in case the file was empty
-   if (First == true)
-   {
-      for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
-      {
-	 string::size_type Space = (*I).find(' ');
-	 if (Space == string::npos)
-	    return _error->Error("Internal error");
-	 
-	 Out << "deb cdrom:[" << Name << "]/" << string(*I,0,Space) << 
-	    " " << string(*I,Space+1) << endl;
-      }
-   }
-   
-   Out.close();
-
-   rename(File.c_str(),string(File + '~').c_str());
-   if (rename(NewFile.c_str(),File.c_str()) != 0)
-      return _error->Errno("rename","Failed to rename %s.new to %s",
-			   File.c_str(),File.c_str());
-   
+bool pkgCdromTextStatus::ChangeCdrom() 
+{
+   Prompt("Please insert a Disc in the drive and press enter");
    return true;
    return true;
 }
 }
-									/*}}}*/
 
 
-// Prompt - Simple prompt						/*{{{*/
-// ---------------------------------------------------------------------
-/* */
-void Prompt(const char *Text)
-{
-   char C;
-   cout << Text << ' ' << flush;
-   read(STDIN_FILENO,&C,1);
-   if (C != '\n')
-      cout << endl;
-}
-									/*}}}*/
-// PromptLine - Prompt for an input line				/*{{{*/
-// ---------------------------------------------------------------------
-/* */
-string PromptLine(const char *Text)
-{
-   cout << Text << ':' << endl;
-   
-   string Res;
-   getline(cin,Res);
-   return Res;
-}
+OpProgress* pkgCdromTextStatus::GetOpProgress() 
+{ 
+   return &Progress; 
+};
+
 									/*}}}*/
 									/*}}}*/
 
 
 // DoAdd - Add a new CDROM						/*{{{*/
 // DoAdd - Add a new CDROM						/*{{{*/
@@ -501,186 +109,13 @@ string PromptLine(const char *Text)
    verify them. Then rewrite the database files */
    verify them. Then rewrite the database files */
 bool DoAdd(CommandLine &)
 bool DoAdd(CommandLine &)
 {
 {
-   // Startup
-   string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
-   if (CDROM[0] == '.')
-      CDROM= SafeGetCWD() + '/' + CDROM;
-   
-   cout << "Using CD-ROM mount point " << CDROM << endl;
-      
-   // Read the database
-   Configuration Database;
-   string DFile = _config->FindFile("Dir::State::cdroms");
-   if (FileExists(DFile) == true)
-   {
-      if (ReadConfigFile(Database,DFile) == false)
-	 return _error->Error("Unable to read the cdrom database %s",
-			      DFile.c_str());
-   }
-   
-   // Unmount the CD and get the user to put in the one they want
-   if (_config->FindB("APT::CDROM::NoMount",false) == false)
-   {
-      cout << "Unmounting CD-ROM" << endl;
-      UnmountCdrom(CDROM);
-
-      // Mount the new CDROM
-      Prompt("Please insert a Disc in the drive and press enter");
-      cout << "Mounting CD-ROM" << endl;
-      if (MountCdrom(CDROM) == false)
-	 return _error->Error("Failed to mount the cdrom.");
-   }
-   
-   // Hash the CD to get an ID
-   cout << "Identifying.. " << flush;
-   string ID;
-   if (IdentCdrom(CDROM,ID) == false)
-   {
-      cout << endl;
-      return false;
-   }
-   
-   cout << '[' << ID << ']' << endl;
-
-   cout << "Scanning Disc for index files..  " << flush;
-   // Get the CD structure
-   vector<string> List;
-   vector<string> sList;
-   string StartDir = SafeGetCWD();
-   string InfoDir;
-   if (FindPackages(CDROM,List,sList,InfoDir) == false)
-   {
-      cout << endl;
-      return false;
-   }
-   
-   chdir(StartDir.c_str());
-
-   if (_config->FindB("Debug::aptcdrom",false) == true)
-   {
-      cout << "I found (binary):" << endl;
-      for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
-	 cout << *I << endl;
-      cout << "I found (source):" << endl;
-      for (vector<string>::iterator I = sList.begin(); I != sList.end(); I++)
-	 cout << *I << endl;
-   }   
-   
-   // Fix up the list
-   DropBinaryArch(List);
-   DropRepeats(List,"Packages");
-   DropRepeats(sList,"Sources");
-   cout << "Found " << List.size() << " package indexes and " << sList.size() << 
-      " source indexes." << endl;
-
-   if (List.size() == 0 && sList.size() == 0)
-      return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc");
-   
-   // Check if the CD is in the database
-   string Name;
-   if (Database.Exists("CD::" + ID) == false ||
-       _config->FindB("APT::CDROM::Rename",false) == true)
-   {
-      // Try to use the CDs label if at all possible
-      if (InfoDir.empty() == false &&
-	  FileExists(InfoDir + "/info") == true)
-      {
-	 ifstream F(string(InfoDir + "/info").c_str());
-	 if (!F == 0)
-	    getline(F,Name);
-
-	 if (Name.empty() == false)
-	 {
-	    // Escape special characters
-	    string::iterator J = Name.begin();
-	    for (; J != Name.end(); J++)
-	       if (*J == '"' || *J == ']' || *J == '[')
-		  *J = '_';
-	    
-	    cout << "Found label '" << Name << "'" << endl;
-	    Database.Set("CD::" + ID + "::Label",Name);
-	 }	 
-      }
-      
-      if (_config->FindB("APT::CDROM::Rename",false) == true ||
-	  Name.empty() == true)
-      {
-	 cout << "Please provide a name for this Disc, such as 'Debian 2.1r1 Disk 1'";
-	 while (1)
-	 {
-	    Name = PromptLine("");
-	    if (Name.empty() == false &&
-		Name.find('"') == string::npos &&
-		Name.find('[') == string::npos &&
-		Name.find(']') == string::npos)
-	       break;
-	    cout << "That is not a valid name, try again " << endl;
-	 }	 
-      }      
-   }
-   else
-      Name = Database.Find("CD::" + ID);
-
-   // Escape special characters
-   string::iterator J = Name.begin();
-   for (; J != Name.end(); J++)
-      if (*J == '"' || *J == ']' || *J == '[')
-	 *J = '_';
-   
-   Database.Set("CD::" + ID,Name);
-   cout << "This Disc is called:" << endl << " '" << Name << "'" << endl;
-   
-   // Copy the package files to the state directory
-   PackageCopy Copy;
-   SourceCopy SrcCopy;
-   if (Copy.CopyPackages(CDROM,Name,List) == false ||
-       SrcCopy.CopyPackages(CDROM,Name,sList) == false)
-      return false;
-   
-   ReduceSourcelist(CDROM,List);
-   ReduceSourcelist(CDROM,sList);
-
-   // Write the database and sourcelist
-   if (_config->FindB("APT::cdrom::NoAct",false) == false)
-   {
-      if (WriteDatabase(Database) == false)
-	 return false;
-      
-      cout << "Writing new source list" << endl;
-      if (WriteSourceList(Name,List,false) == false ||
-	  WriteSourceList(Name,sList,true) == false)
-	 return false;
-   }
-
-   // Print the sourcelist entries
-   cout << "Source List entries for this Disc are:" << endl;
-   for (vector<string>::iterator I = List.begin(); I != List.end(); I++)
-   {
-      string::size_type Space = (*I).find(' ');
-      if (Space == string::npos)
-	 return _error->Error("Internal error");
-
-      cout << "deb cdrom:[" << Name << "]/" << string(*I,0,Space) << 
-	 " " << string(*I,Space+1) << endl;
-   }
-
-   for (vector<string>::iterator I = sList.begin(); I != sList.end(); I++)
-   {
-      string::size_type Space = (*I).find(' ');
-      if (Space == string::npos)
-	 return _error->Error("Internal error");
-
-      cout << "deb-src cdrom:[" << Name << "]/" << string(*I,0,Space) << 
-	 " " << string(*I,Space+1) << endl;
-   }
-
-   cout << "Repeat this process for the rest of the CDs in your set." << endl;
-
-   // Unmount and finish
-   if (_config->FindB("APT::CDROM::NoMount",false) == false)
-      UnmountCdrom(CDROM);
-   
-   return true;
+   bool res = false;
+   pkgCdromTextStatus log;
+   pkgCdrom cdrom;
+   res = cdrom.Add(&log);
+   if(res)
+      cout << "Repeat this process for the rest of the CDs in your set." << endl;
+   return res;
 }
 }
 									/*}}}*/
 									/*}}}*/
 // DoIdent - Ident a CDROM						/*{{{*/
 // DoIdent - Ident a CDROM						/*{{{*/
@@ -688,38 +123,10 @@ bool DoAdd(CommandLine &)
 /* */
 /* */
 bool DoIdent(CommandLine &)
 bool DoIdent(CommandLine &)
 {
 {
-   // Startup
-   string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/");
-   if (CDROM[0] == '.')
-      CDROM= SafeGetCWD() + '/' + CDROM;
-   
-   cout << "Using CD-ROM mount point " << CDROM << endl;
-   cout << "Mounting CD-ROM" << endl;
-   if (MountCdrom(CDROM) == false)
-      return _error->Error("Failed to mount the cdrom.");
-   
-   // Hash the CD to get an ID
-   cout << "Identifying.. " << flush;
-   string ID;
-   if (IdentCdrom(CDROM,ID) == false)
-   {
-      cout << endl;
-      return false;
-   }
-   
-   cout << '[' << ID << ']' << endl;
-
-   // Read the database
-   Configuration Database;
-   string DFile = _config->FindFile("Dir::State::cdroms");
-   if (FileExists(DFile) == true)
-   {
-      if (ReadConfigFile(Database,DFile) == false)
-	 return _error->Error("Unable to read the cdrom database %s",
-			      DFile.c_str());
-   }
-   cout << "Stored Label: '" << Database.Find("CD::" + ID) << "'" << endl;
-   return true;
+   string ident;
+   pkgCdromTextStatus log;
+   pkgCdrom cdrom;
+   return cdrom.Ident(ident, &log);
 }
 }
 									/*}}}*/
 									/*}}}*/
 
 

+ 1 - 1
cmdline/makefile

@@ -30,7 +30,7 @@ include $(PROGRAM_H)
 PROGRAM=apt-cdrom
 PROGRAM=apt-cdrom
 SLIBS = -lapt-pkg
 SLIBS = -lapt-pkg
 LIB_MAKES = apt-pkg/makefile
 LIB_MAKES = apt-pkg/makefile
-SOURCE = apt-cdrom.cc indexcopy.cc
+SOURCE = apt-cdrom.cc 
 include $(PROGRAM_H)
 include $(PROGRAM_H)
 
 
 # The apt-sortpkgs program
 # The apt-sortpkgs program

+ 1 - 1
configure.in

@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 
 dnl -- SET THIS TO THE RELEASE VERSION --
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.29")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.31")
 PACKAGE="apt"
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
 AC_SUBST(PACKAGE)

+ 0 - 1
debian/apt.cron.daily

@@ -20,7 +20,6 @@ check_stamp()
     stamp=$(date --date=$(date -r $stamp --iso-8601) +%s)
     stamp=$(date --date=$(date -r $stamp --iso-8601) +%s)
     now=$(date --date=$(date --iso-8601) +%s)
     now=$(date --date=$(date --iso-8601) +%s)
     delta=$(($now-$stamp))
     delta=$(($now-$stamp))
-    echo "stamp=$stamp, now=$now, delta=$delta"
 
 
     if [ $delta -ge $interval ]; then
     if [ $delta -ge $interval ]; then
         return 0
         return 0

+ 20 - 2
debian/changelog

@@ -1,8 +1,26 @@
+apt (0.6.31) hoary; urgency=low
+
+  * Matt Zimmerman
+    - Remove debugging output from apt.cron.daily (no one noticed?)
+    - Apply patch from Anthony Towns to allow SHA1Summation to process a file
+      descriptor until EOF, rather than requiring that the length of input be
+      specified (Closes: #291338)
+    - Fix build/install of Polish offline documentation, based on patch from
+      Christian Perrier (Closes: #270404)
+  * Michael Vogt
+    - apt-cdrom.cc seperated into frontend (cmdline/apt-cdrom.cc and library
+      apt-pkg/cdrom.{cc,h}) (Ubuntu #5668)
+
+ -- Matt Zimmerman <mdz@ubuntu.com>  Fri,  4 Feb 2005 10:23:01 -0800
+
 apt (0.6.30) unstable; urgency=low
 apt (0.6.30) unstable; urgency=low
 
 
   * Add ppc64 to buildlib/archtable
   * Add ppc64 to buildlib/archtable
-
- --
+  * Merge michael.vogt@canonical.com--2004/apt--status-fd--0
+    - Support preserving dpkg status file descriptor, to support
+      better integration with synaptic
+  
+ -- Matt Zimmerman <mdz@ubuntu.com>  Wed, 19 Jan 2005 00:26:01 -0800
 
 
 apt (0.6.29) hoary; urgency=low
 apt (0.6.29) hoary; urgency=low
 
 

+ 1 - 1
debian/rules

@@ -171,7 +171,7 @@ apt-doc: build-doc
 #
 #
 	# Copy the guides
 	# Copy the guides
 	dh_installdocs -p$@ $(BLD)/docs/guide*.text $(BLD)/docs/guide*.html \
 	dh_installdocs -p$@ $(BLD)/docs/guide*.text $(BLD)/docs/guide*.html \
-	               $(BLD)/docs/offline.text $(BLD)/docs/offline.html
+	               $(BLD)/docs/offline*.text $(BLD)/docs/offline*.html
 	dh_installchangelogs -p$@
 	dh_installchangelogs -p$@
 	dh_compress -p$@
 	dh_compress -p$@
 	dh_fixperms -p$@
 	dh_fixperms -p$@

+ 90 - 90
doc/pl/offline.pl.sgml

@@ -1,80 +1,80 @@
 <!doctype debiandoc system>
 <!doctype debiandoc system>
 <!-- -*- mode: sgml; mode: fold -*- -->
 <!-- -*- mode: sgml; mode: fold -*- -->
 <book>
 <book>
-<title>Używanie APT w trybie offline</title>
+<title>U�ywanie APT w trybie offline</title>
 
 
 <author>Jason Gunthorpe <email>jgg@debian.org</email></author>
 <author>Jason Gunthorpe <email>jgg@debian.org</email></author>
-<author>Polskie tłumaczenie Krzysztof Fiertek <email>akfedux@megapolis.pl</email></author>
+<author>Polskie t�umaczenie Krzysztof Fiertek <email>akfedux@megapolis.pl</email></author>
 <version>$Id: offline.pl.sgml,v 1.1 2004/07/29 16:43:13 mdz Exp $</version>
 <version>$Id: offline.pl.sgml,v 1.1 2004/07/29 16:43:13 mdz Exp $</version>
 
 
 <abstract>
 <abstract>
-Dokument ten opisuje jak używać programu APT w środowiskach niesieciowych,
-a w szczególności metodę pozwalającą na robienie aktualizacji systemu.
+Dokument ten opisuje jak u�ywa� programu APT w �rodowiskach niesieciowych,
+a w szczeg�lno�ci metod� pozwalaj�c� na robienie aktualizacji systemu.
 </abstract>
 </abstract>
 
 
 <copyright>
 <copyright>
 Copyright &copy; Jason Gunthorpe, 1999.
 Copyright &copy; Jason Gunthorpe, 1999.
 <p>
 <p>
-Copyright &copy; polskiego tłumaczenia Krzysztof Fiertek, 2004.
+Copyright &copy; polskiego t�umaczenia Krzysztof Fiertek, 2004.
 <p>
 <p>
-"APT" i ten dokument są oprogramowaniem wolnodostępnym; możesz
-rozpowszechniać je i/lub zmieniać w zgodzie z postanowieniami
-"Ogólnej Licencji Publicznej GNU" (GNU General Public License)
-takiej, jak została opublikowana przez "Fundacje Wolnego
-Oprogramowania (Free Software Foundation); albo w wersji 2 tejże
-licencji, albo (twój wybór) w dowolnej późniejszej.
+"APT" i ten dokument s� oprogramowaniem wolnodost�pnym; mo�esz
+rozpowszechniaďż˝ je i/lub zmieniaďż˝ w zgodzie z postanowieniami
+"Og�lnej Licencji Publicznej GNU" (GNU General Public License)
+takiej, jak zosta�a opublikowana przez "Fundacje Wolnego
+Oprogramowania (Free Software Foundation); albo w wersji 2 tej�e
+licencji, albo (tw�j wyb�r) w dowolnej p��niejszej.
 
 
 <p>
 <p>
-Więcej szczegółów możesz uzyskać przeglądając plik zawierający pełny tekst
+Wi�cej szczeg���w mo�esz uzyska� przegl�daj�c plik zawieraj�cy pe�ny tekst
 licencji (w systemach Debian jest to plik /usr/doc/copyright/GPL).
 licencji (w systemach Debian jest to plik /usr/doc/copyright/GPL).
 </copyright
 </copyright
 
 
 <toc sect>
 <toc sect>
 
 
-<chapt>Wstęp
+<chapt>Wst�p
 <!-- Overview                                                         {{{ -->
 <!-- Overview                                                         {{{ -->
 <!-- ===================================================================== -->
 <!-- ===================================================================== -->
 <sect>Wprowadzenie
 <sect>Wprowadzenie
 
 
 <p>
 <p>
-Normalnie APT wymaga bezpośredniego dostępu do archiwów Debiana poprzez
-sieć lokalną albo przez sieć internetową. Kolejną niedogodnością może być
-fakt, że nasz komputer, który pracuje na wolnym łączu takim jak modem,
-jest znacznie oddalony od innnego komputera z szybkim łączem.
+Normalnie APT wymaga bezpo�redniego dost�pu do archiw�w Debiana poprzez
+sie� lokaln� albo przez sie� internetow�. Kolejn� niedogodno�ci� mo�e by�
+fakt, �e nasz komputer, kt�ry pracuje na wolnym ��czu takim jak modem,
+jest znacznie oddalony od innnego komputera z szybkim ��czem.
 
 
 <p>
 <p>
-Rozwiązaniem tego problemu jest użycie pojemnych przenośnych nośników
-takich jak dyskietka Zip lub dysk SuperDisk. Nośniki te nie są
-wystarczająco pojemne, by zgromadzić kompletne archiwum Debiana, ale można
-śmiało dopasować podzbiór dużego archiwum wystarczający dla większości
-użytkowników. Pomysł polega na tym, by użyć programu APT do wygenerowania
-listy pakietów, które są wymagane, następnie pobraniu ich na dysk używając
-innego komputera z właściwą zwartością. Jest nawet możliwe, by użyć innego
-komputera z Debianem z zainstalowanym programem APT lub zupełnie innym
-systemem operacyjnym i programem narzędziowym do pobierania plików takim
+Rozwi�zaniem tego problemu jest u�ycie pojemnych przeno�nych no�nik�w
+takich jak dyskietka Zip lub dysk SuperDisk. No�niki te nie s�
+wystarczaj�co pojemne, by zgromadzi� kompletne archiwum Debiana, ale mo�na
+�mia�o dopasowa� podzbi�r du�ego archiwum wystarczaj�cy dla wi�kszo�ci
+u�ytkownik�w. Pomys� polega na tym, by u�y� programu APT do wygenerowania
+listy pakiet�w, kt�re s� wymagane, nast�pnie pobraniu ich na dysk u�ywaj�c
+innego komputera z w�a�ciw� zwarto�ci�. Jest nawet mo�liwe, by u�y� innego
+komputera z Debianem z zainstalowanym programem APT lub zupe�nie innym
+systemem operacyjnym i programem narz�dziowym do pobierania plik�w takim
 jak wget.
 jak wget.
 
 
 <p>
 <p>
-Osiągnięte jest to przez twórcze manipulowanie plikiem konfiguracyjnym
-programu APT. Rzeczą niezbędną jest poinformowanie programu APT, aby wskazywał
-na dysk z plikami archiwum. Należy zauważyć, że dysk powinien być
-sformatowany do obsługi systemu plików takiego jak ext2, fat32 albo vfat
-pozwalających posługiwać się długimi nazwami pliku.
+Osi�gni�te jest to przez tw�rcze manipulowanie plikiem konfiguracyjnym
+programu APT. Rzecz� niezb�dn� jest poinformowanie programu APT, aby wskazywa�
+na dysk z plikami archiwum. Nale�y zauwa�y�, �e dysk powinien by�
+sformatowany do obs�ugi systemu plik�w takiego jak ext2, fat32 albo vfat
+pozwalaj�cych pos�ugiwa� si� d�ugimi nazwami pliku.
 
 
 </sect>
 </sect>
                                                                   <!-- }}} -->
                                                                   <!-- }}} -->
 
 
-<chapt>Używanie programu APT na obu komputerach
+<chapt>U�ywanie programu APT na obu komputerach
 <!-- Overview                                                         {{{ -->
 <!-- Overview                                                         {{{ -->
 <!-- ===================================================================== -->
 <!-- ===================================================================== -->
 <sect>Wprowadzenie
 <sect>Wprowadzenie
 
 
 <p>
 <p>
-APT będący do dyspozycji na obu komputerach daje najprostszą kombinację.
-Zasadniczym pomysłem tej metody jest umieścić kopie pliku status na dysku
-i użyć odległego komputera, aby uzyskać najnowsze pliki pakietów
-i zdecydować, które pakiety chcemy pobrać. Struktura katalogów na dysku
-powinna wyglądać następująco:
+APT b�d�cy do dyspozycji na obu komputerach daje najprostsz� kombinacj�.
+Zasadniczym pomys�em tej metody jest umie�ci� kopie pliku status na dysku
+i u�y� odleg�ego komputera, aby uzyska� najnowsze pliki pakiet�w
+i zdecydowa�, kt�re pakiety chcemy pobra�. Struktura katalog�w na dysku
+powinna wygl�da� nast�puj�co:
 
 
 <example>
 <example>
   /disc/
   /disc/
@@ -94,21 +94,21 @@ powinna wygl
 <sect>Plik konfiguracyjny
 <sect>Plik konfiguracyjny
 
 
 <p>
 <p>
-Plik konfiguracyjny powinien informować program APT, aby przechowywać jego
-pliki na dysku, a także używać plików konfiguracyjnych z dysku. Plik
-sources.list powinien zawierać prawidłowe odnośniki, których oczekujesz
-użyć od zdalnego komputera, a plik status powinien być kopią 
-<em>/var/lib/dpkg/status</em>. Zauważ, że jeśli używasz lokalnego archiwum 
-musisz użyć tych samych odnośników o identycznej składni.
+Plik konfiguracyjny powinien informowaďż˝ program APT, aby przechowywaďż˝ jego
+pliki na dysku, a tak�e u�ywa� plik�w konfiguracyjnych z dysku. Plik
+sources.list powinien zawiera� prawid�owe odno�niki, kt�rych oczekujesz
+u�y� od zdalnego komputera, a plik status powinien by� kopi� 
+<em>/var/lib/dpkg/status</em>. Zauwa�, �e je�li u�ywasz lokalnego archiwum 
+musisz u�y� tych samych odno�nik�w o identycznej sk�adni.
 
 
 <p>
 <p>
-<em>apt.conf</em> musi zawierać niezbędne wpisy, by APT korzystał z dysku:
+<em>apt.conf</em> musi zawiera� niezb�dne wpisy, by APT korzysta� z dysku:
 
 
 <example>
 <example>
  APT
  APT
  {
  {
-   /* Ten wpis nie jest wymagany jeśli oba komputery są tej samej
-      architektury, mówi on APTowi na komputerze pobierającym pakiety
+   /* Ten wpis nie jest wymagany je�li oba komputery s� tej samej
+      architektury, m�wi on APTowi na komputerze pobieraj�cym pakiety
       jakiej architektury jest nasz komputer */
       jakiej architektury jest nasz komputer */
    Architecture "i386";
    Architecture "i386";
    
    
@@ -117,12 +117,12 @@ musisz u
  
  
  Dir
  Dir
  {
  {
-   /* Użyj katalogu disc na informacje stanu i skieruj plik status
+   /* U�yj katalogu disc na informacje stanu i skieruj plik status
       z /var/lib/dpkg default */
       z /var/lib/dpkg default */
    State "/disc/";
    State "/disc/";
    State::status "status";
    State::status "status";
 
 
-   // Katalog lokalnie przechowywanych pakietów binarnych
+   // Katalog lokalnie przechowywanych pakiet�w binarnych
    Cache::archives "/disc/archives/";
    Cache::archives "/disc/archives/";
    Cache "/tmp/";
    Cache "/tmp/";
 
 
@@ -131,15 +131,15 @@ musisz u
  }; 
  }; 
 </example>
 </example>
 
 
-Więcej szczegółów można zobaczyć w manualu apt.conf i w przykładowym pliku
+Wi�cej szczeg���w mo�na zobaczy� w manualu apt.conf i w przyk�adowym pliku
 konfiguracyjnym <em>/usr/doc/apt/examples/apt.conf</em>.
 konfiguracyjnym <em>/usr/doc/apt/examples/apt.conf</em>.
 
 
 <p>
 <p>
-Pierwszą rzeczą jaka należy zrobić na oddalonym komputerze z Debianem to
-zamontować dysk i przekopiować na niego plik <em>/var/lib/dpkg/status</em>.
-Potrzeba także utworzyć stukturę katalogów przedstawioną we Wprowadzeniu,
-<em>archives/partial/</em> i <em>lists/partial/</em>. Następnie niesiemy
-dysk do oddalonego komputera z szybkim łączem i konfigurujemy plik
+Pierwsz� rzecz� jaka nale�y zrobi� na oddalonym komputerze z Debianem to
+zamontowaďż˝ dysk i przekopiowaďż˝ na niego plik <em>/var/lib/dpkg/status</em>.
+Potrzeba tak�e utworzy� stuktur� katalog�w przedstawion� we Wprowadzeniu,
+<em>archives/partial/</em> i <em>lists/partial/</em>. Nast�pnie niesiemy
+dysk do oddalonego komputera z szybkim ��czem i konfigurujemy plik
 sources.list. Na oddalonym komputerze wykonujemy kolejno:
 sources.list. Na oddalonym komputerze wykonujemy kolejno:
 
 
 <example>
 <example>
@@ -151,54 +151,54 @@ sources.list. Na oddalonym komputerze wykonujemy kolejno:
 
 
 </example>
 </example>
 
 
-Polecenie dist-upgrade można zastąpić każdym innym podstawowym poleceniem
-APT, w szczególności dselect-upgrade. Możesz nawet użyć APT jako metodę
-dostępu dla <em>dselect</em>. Jednak stworzy to problem w przeniesieniu
-twoich operacji wyborów z powrotem na lokalny komputer.
+Polecenie dist-upgrade mo�na zast�pi� ka�dym innym podstawowym poleceniem
+APT, w szczeg�lno�ci dselect-upgrade. Mo�esz nawet u�y� APT jako metod�
+dost�pu dla <em>dselect</em>. Jednak stworzy to problem w przeniesieniu
+twoich operacji wybor�w z powrotem na lokalny komputer.
 
 
 <p>
 <p>
 W tej chwili katalog disc zawiera wszystkie pliki indeksowe oraz archiwa
 W tej chwili katalog disc zawiera wszystkie pliki indeksowe oraz archiwa
-niezbędne do aktualizacji maszyny z Debianem. Bierzemy dysk z powrotem do
+niezb�dne do aktualizacji maszyny z Debianem. Bierzemy dysk z powrotem do
 siebie i wpisujemy:
 siebie i wpisujemy:
 
 
 <example>
 <example>
   # export APT_CONFIG="/disc/apt.conf"
   # export APT_CONFIG="/disc/apt.conf"
   # apt-get check
   # apt-get check
-  [ APT tworzy lokalną kopię plików cache ]
+  [ APT tworzy lokaln� kopi� plik�w cache ]
   # apt-get --no-d -o dir::etc::status=/var/lib/dpkg/status dist-upgrade
   # apt-get --no-d -o dir::etc::status=/var/lib/dpkg/status dist-upgrade
-  [ Może też być inne polecenie programu APT ]
+  [ Mo�e te� by� inne polecenie programu APT ]
 </example>
 </example>
 
 
 <p> 
 <p> 
-Koniecznym jest do prawidłowego działania podmienić plik status na lokalnej
-maszynie. To jest bardzo ważne!
+Koniecznym jest do prawid�owego dzia�ania podmieni� plik status na lokalnej
+maszynie. To jest bardzo wa�ne!
 
 
 <p>
 <p>
-Jeśli używasz dselect możesz wykonać bardzo ryzykowną operację skopiowania
-disc/status do /var/lib/dpkg/status tak, że  wszystkie zmiany które
-dokonałeś na odległym komputerze są uaktualnione. Mocno zalecam aby
-dokonywać doboru pakietów tylko na lokalnym komputerze, ale nie zawsze
-jest to możliwe. NIE podmieniaj pliku status jeśli dpkg lub APT były
-uruchamiane w międzyczasie!!
+Je�li u�ywasz dselect mo�esz wykona� bardzo ryzykown� operacj� skopiowania
+disc/status do /var/lib/dpkg/status tak, �e  wszystkie zmiany kt�re
+dokona�e� na odleg�ym komputerze s� uaktualnione. Mocno zalecam aby
+dokonywa� doboru pakiet�w tylko na lokalnym komputerze, ale nie zawsze
+jest to mo�liwe. NIE podmieniaj pliku status je�li dpkg lub APT by�y
+uruchamiane w mi�dzyczasie!!
 
 
 </sect>
 </sect>
                                                                   <!-- }}} -->
                                                                   <!-- }}} -->
 
 
-<chapt>Używanie programów APT i wget
+<chapt>U�ywanie program�w APT i wget
 <!-- Overview                                                         {{{ -->
 <!-- Overview                                                         {{{ -->
 <!-- ===================================================================== -->
 <!-- ===================================================================== -->
 <sect>Wprowadzenie
 <sect>Wprowadzenie
 
 
 <p>
 <p>
-<em>wget</em> jest popularnym i przenośnym programem narzędziowym
-pobierania plików, który działa na prawie każdym komputerze.
-W przeciwieństwie do metody opisanej powyżej ta wymaga komputera z Debianem,
-który już posiada listę dostępnych pakietów.
+<em>wget</em> jest popularnym i przeno�nym programem narz�dziowym
+pobierania plik�w, kt�ry dzia�a na prawie ka�dym komputerze.
+W przeciwie�stwie do metody opisanej powy�ej ta wymaga komputera z Debianem,
+kt�ry ju� posiada list� dost�pnych pakiet�w.
 
 
 <p>
 <p>
-Należy stworzyć katalog disc tylko na pakiety do pobrania z innego
-komputera. Użyta zostanie do tego opcja --print-uris programu apt-get,
-a następnie przygotujemy skrypt dla programu wget, który pobierze właściwe
+Nale�y stworzy� katalog disc tylko na pakiety do pobrania z innego
+komputera. U�yta zostanie do tego opcja --print-uris programu apt-get,
+a nast�pnie przygotujemy skrypt dla programu wget, kt�ry pobierze w�a�ciwe
 pakiety.
 pakiety.
 
 
 </sect>
 </sect>
@@ -208,28 +208,28 @@ pakiety.
 <sect>Kolejne kroki
 <sect>Kolejne kroki
 
 
 <p>
 <p>
-W odróżnieniu od poprzedniej metody działania ta nie wymaga specjalnych
-plików konfiguracyjnych. Używamy jedynie podstawowych poleceń APT, by
-wygenerować listę plików.
+W odr��nieniu od poprzedniej metody dzia�ania ta nie wymaga specjalnych
+plik�w konfiguracyjnych. U�ywamy jedynie podstawowych polece� APT, by
+wygenerowa� list� plik�w.
 
 
 <example>
 <example>
  # apt-get dist-upgrade 
  # apt-get dist-upgrade 
- [ Wybierz no po znaku zachęty, upewnij się czy to właściwy wybór ]
+ [ Wybierz no po znaku zach�ty, upewnij si� czy to w�a?ciwy wyb�r ]
  # apt-get -qq --print-uris dist-upgrade > uris
  # apt-get -qq --print-uris dist-upgrade > uris
  # awk '{print "wget -O " $2 " " $1}' < uris > /disc/wget-script
  # awk '{print "wget -O " $2 " " $1}' < uris > /disc/wget-script
 </example>
 </example>
 
 
-Także inne opcje niż dist-upgrade mogą tu być użyte, włączając
+Tak�e inne opcje ni� dist-upgrade mog� tu by� u�yte, w��czaj�c
 dselect-upgrade.
 dselect-upgrade.
 
 
 <p>
 <p>
-Plik skryptu /disc/wget-script będzie teraz zawierać listę poleceń dla
-programu wget, który uruchomi w porządku pobieranie potrzebnych archiwów.
-Skrypt ten należy uruchomić w bieżącym katalogu o punkcie montowania disc
-tak aby tu zapisywał dane na dysku.
+Plik skryptu /disc/wget-script b�dzie teraz zawiera� list� polece� dla
+programu wget, kt�ry uruchomi w porz�dku pobieranie potrzebnych archiw�w.
+Skrypt ten nale�y uruchomi� w bie��cym katalogu o punkcie montowania disc
+tak aby tu zapisywaďż˝ dane na dysku.
 
 
 <p>
 <p>
-Na oddalonym komputerze należy wykonać coś takiego
+Na oddalonym komputerze nale�y wykona� co� takiego
 
 
 <example>
 <example>
   # cd /disc
   # cd /disc
@@ -237,14 +237,14 @@ Na oddalonym komputerze nale
   [ czekaj.. ]
   [ czekaj.. ]
 </example>
 </example>
 
 
-Gdy archiwa zostały pobrane i dysk wrócił do komputera z Debianem,
-instalowanie można prowadzić dalej poleceniem,
+Gdy archiwa zosta�y pobrane i dysk wr�ci� do komputera z Debianem,
+instalowanie mo�na prowadzi� dalej poleceniem,
 
 
 <example>
 <example>
   # apt-get -o dir::cache::archives="/disc/" dist-upgrade
   # apt-get -o dir::cache::archives="/disc/" dist-upgrade
 </example>
 </example>
 
 
-Które użyje pobrane uprzednio archiwa z dysku.
+Kt�re u�yje pobrane uprzednio archiwa z dysku.
 </sect>
 </sect>
                                                                   <!-- }}} -->
                                                                   <!-- }}} -->
 </book>
 </book>

+ 103 - 13
po/apt-all.pot

@@ -146,7 +146,7 @@ msgstr ""
 msgid "       %4i %s\n"
 msgid "       %4i %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:731 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:353 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
@@ -1495,7 +1495,7 @@ msgstr ""
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:452
+#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:453
 msgid "Read error"
 msgid "Read error"
 msgstr ""
 msgstr ""
 
 
@@ -1895,54 +1895,54 @@ msgstr ""
 msgid "Could not get lock %s"
 msgid "Could not get lock %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:358
+#: apt-pkg/contrib/fileutl.cc:359
 #, c-format
 #, c-format
 msgid "Waited, for %s but it wasn't there"
 msgid "Waited, for %s but it wasn't there"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:368
+#: apt-pkg/contrib/fileutl.cc:369
 #, c-format
 #, c-format
 msgid "Sub-process %s received a segmentation fault."
 msgid "Sub-process %s received a segmentation fault."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:371
+#: apt-pkg/contrib/fileutl.cc:372
 #, c-format
 #, c-format
 msgid "Sub-process %s returned an error code (%u)"
 msgid "Sub-process %s returned an error code (%u)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:373
+#: apt-pkg/contrib/fileutl.cc:374
 #, c-format
 #, c-format
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:417
+#: apt-pkg/contrib/fileutl.cc:418
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:473
+#: apt-pkg/contrib/fileutl.cc:474
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:491
+#: apt-pkg/contrib/fileutl.cc:492
 msgid "Write error"
 msgid "Write error"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:503
+#: apt-pkg/contrib/fileutl.cc:504
 #, c-format
 #, c-format
 msgid "write, still have %lu to write but couldn't"
 msgid "write, still have %lu to write but couldn't"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:578
+#: apt-pkg/contrib/fileutl.cc:579
 msgid "Problem closing the file"
 msgid "Problem closing the file"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:584
+#: apt-pkg/contrib/fileutl.cc:585
 msgid "Problem unlinking the file"
 msgid "Problem unlinking the file"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:595
+#: apt-pkg/contrib/fileutl.cc:596
 msgid "Problem syncing the file"
 msgid "Problem syncing the file"
 msgstr ""
 msgstr ""
 
 
@@ -2291,3 +2291,93 @@ msgstr ""
 #, c-format
 #, c-format
 msgid "Vendor block %s contains no fingerprint"
 msgid "Vendor block %s contains no fingerprint"
 msgstr ""
 msgstr ""
+
+#: apt-pkg/cdrom.cc:487
+#, c-format
+msgid ""
+"Using CD-ROM mount point %s\n"
+"Mounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:496 apt-pkg/cdrom.cc:578
+msgid "Identifying.. "
+msgstr ""
+
+#: apt-pkg/cdrom.cc:521
+#, c-format
+msgid "Stored Label: %s \n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:541
+#, c-format
+msgid "Using CD-ROM mount point %s\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:559
+msgid "Unmounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:563
+msgid "Waiting for disc...\n"
+msgstr ""
+
+#. Mount the new CDROM
+#: apt-pkg/cdrom.cc:571
+msgid "Mounting CD-ROM...\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:589
+msgid "Scanning Disc for index files..\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:627
+#, c-format
+msgid "Found %i package indexes, %i source indexes and %i signatures\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:684
+msgid "That is not a valid name, try again.\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:700
+#, c-format
+msgid ""
+"This Disc is called: \n"
+"'%s'\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:704
+msgid "Copying package lists..."
+msgstr ""
+
+#: apt-pkg/cdrom.cc:728
+msgid "Writing new source list\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:737
+msgid "Source List entries for this Disc are:\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:771
+msgid "Unmounting CD-ROM..."
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:261
+#, c-format
+msgid "Wrote %i records.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:263
+#, c-format
+msgid "Wrote %i records with %i missing files.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:266
+#, c-format
+msgid "Wrote %i records with %i mismachted files\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:269
+#, c-format
+msgid "Wrote %i records with %i missing files and %i mismachted files\n"
+msgstr ""

Разница между файлами не показана из-за своего большого размера
+ 267 - 162
po/bs.po


Разница между файлами не показана из-за своего большого размера
+ 279 - 169
po/ca.po


Разница между файлами не показана из-за своего большого размера
+ 276 - 167
po/cs.po


Разница между файлами не показана из-за своего большого размера
+ 304 - 209
po/da.po


Разница между файлами не показана из-за своего большого размера
+ 282 - 197
po/de.UTF-8.po


Разница между файлами не показана из-за своего большого размера
+ 282 - 197
po/de.po


Разница между файлами не показана из-за своего большого размера
+ 311 - 185
po/el.po


Разница между файлами не показана из-за своего большого размера
+ 269 - 164
po/en_GB.po


Разница между файлами не показана из-за своего большого размера
+ 284 - 199
po/es.po


Разница между файлами не показана из-за своего большого размера
+ 296 - 177
po/eu.po


Разница между файлами не показана из-за своего большого размера
+ 277 - 167
po/fi.po


+ 117 - 21
po/fr.po

@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: apt 0.5.5\n"
 "Project-Id-Version: apt 0.5.5\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-12-23 12:36+0100\n"
-"PO-Revision-Date: 2005-01-20 18:33+0100\n"
+"POT-Creation-Date: 2005-01-20 19:31+0100\n"
+"PO-Revision-Date: 2005-02-05 07:42+0100\n"
 "Last-Translator: Christian Perrier <bubulle@debian.org>\n"
 "Last-Translator: Christian Perrier <bubulle@debian.org>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
 "MIME-Version: 1.0\n"
 "MIME-Version: 1.0\n"
@@ -149,7 +149,7 @@ msgstr " Table de version
 msgid "       %4i %s\n"
 msgid "       %4i %s\n"
 msgstr "       %4i %s\n"
 msgstr "       %4i %s\n"
 
 
-#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:731 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:353 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
@@ -1589,7 +1589,9 @@ msgstr "Ce n'est pas une archive DEB valide,  partie 
 #: apt-inst/deb/debfile.cc:52
 #: apt-inst/deb/debfile.cc:52
 #, c-format
 #, c-format
 msgid "This is not a valid DEB archive, it has no '%s' or '%s' member"
 msgid "This is not a valid DEB archive, it has no '%s' or '%s' member"
-msgstr "Ce n'est pas une archive DEB valide, elle ne comporte pas de partie « %s »  ou « %s »."
+msgstr ""
+"Ce n'est pas une archive DEB valide, elle ne comporte pas de partie « %s »  "
+"ou « %s »."
 
 
 #: apt-inst/deb/debfile.cc:112
 #: apt-inst/deb/debfile.cc:112
 #, c-format
 #, c-format
@@ -1704,7 +1706,7 @@ msgstr "D
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr "Le serveur a fermé la connexion"
 msgstr "Le serveur a fermé la connexion"
 
 
-#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:452
+#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:453
 msgid "Read error"
 msgid "Read error"
 msgstr "Erreur de lecture"
 msgstr "Erreur de lecture"
 
 
@@ -2110,54 +2112,54 @@ msgstr "Verrou non utilis
 msgid "Could not get lock %s"
 msgid "Could not get lock %s"
 msgstr "Impossible de verrouiller %s"
 msgstr "Impossible de verrouiller %s"
 
 
-#: apt-pkg/contrib/fileutl.cc:358
+#: apt-pkg/contrib/fileutl.cc:359
 #, c-format
 #, c-format
 msgid "Waited, for %s but it wasn't there"
 msgid "Waited, for %s but it wasn't there"
 msgstr "A attendu %s mais il n'était pas présent"
 msgstr "A attendu %s mais il n'était pas présent"
 
 
-#: apt-pkg/contrib/fileutl.cc:368
+#: apt-pkg/contrib/fileutl.cc:369
 #, c-format
 #, c-format
 msgid "Sub-process %s received a segmentation fault."
 msgid "Sub-process %s received a segmentation fault."
 msgstr "Le sous-processus %s a commis une violation d'accès mémoire"
 msgstr "Le sous-processus %s a commis une violation d'accès mémoire"
 
 
-#: apt-pkg/contrib/fileutl.cc:371
+#: apt-pkg/contrib/fileutl.cc:372
 #, c-format
 #, c-format
 msgid "Sub-process %s returned an error code (%u)"
 msgid "Sub-process %s returned an error code (%u)"
 msgstr "Le sous-processus %s a renvoyé un code d'erreur (%u)"
 msgstr "Le sous-processus %s a renvoyé un code d'erreur (%u)"
 
 
-#: apt-pkg/contrib/fileutl.cc:373
+#: apt-pkg/contrib/fileutl.cc:374
 #, c-format
 #, c-format
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr "Le sous-processus %s s'est arrêté prématurément"
 msgstr "Le sous-processus %s s'est arrêté prématurément"
 
 
-#: apt-pkg/contrib/fileutl.cc:417
+#: apt-pkg/contrib/fileutl.cc:418
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr "Impossible de verrouiller %s"
 msgstr "Impossible de verrouiller %s"
 
 
-#: apt-pkg/contrib/fileutl.cc:473
+#: apt-pkg/contrib/fileutl.cc:474
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
 msgstr "lu(s), %lu restant à lire, mais rien n'est disponible"
 msgstr "lu(s), %lu restant à lire, mais rien n'est disponible"
 
 
-#: apt-pkg/contrib/fileutl.cc:491
+#: apt-pkg/contrib/fileutl.cc:492
 msgid "Write error"
 msgid "Write error"
 msgstr "Erreur d'écriture"
 msgstr "Erreur d'écriture"
 
 
-#: apt-pkg/contrib/fileutl.cc:503
+#: apt-pkg/contrib/fileutl.cc:504
 #, c-format
 #, c-format
 msgid "write, still have %lu to write but couldn't"
 msgid "write, still have %lu to write but couldn't"
 msgstr "écrit(s), %lu restant à écrire, mais l'ecriture est impossible"
 msgstr "écrit(s), %lu restant à écrire, mais l'ecriture est impossible"
 
 
-#: apt-pkg/contrib/fileutl.cc:578
+#: apt-pkg/contrib/fileutl.cc:579
 msgid "Problem closing the file"
 msgid "Problem closing the file"
 msgstr "Problème de fermeture du fichier"
 msgstr "Problème de fermeture du fichier"
 
 
-#: apt-pkg/contrib/fileutl.cc:584
+#: apt-pkg/contrib/fileutl.cc:585
 msgid "Problem unlinking the file"
 msgid "Problem unlinking the file"
 msgstr "Problème d'effacement du fichier"
 msgstr "Problème d'effacement du fichier"
 
 
-#: apt-pkg/contrib/fileutl.cc:595
+#: apt-pkg/contrib/fileutl.cc:596
 msgid "Problem syncing the file"
 msgid "Problem syncing the file"
 msgstr "Problème de synchronisation du fichier"
 msgstr "Problème de synchronisation du fichier"
 
 
@@ -2495,11 +2497,11 @@ msgstr "Erreur d'entr
 msgid "rename failed, %s (%s -> %s)."
 msgid "rename failed, %s (%s -> %s)."
 msgstr "impossible de changer le nom, %s (%s -> %s)."
 msgstr "impossible de changer le nom, %s (%s -> %s)."
 
 
-#: apt-pkg/acquire-item.cc:235 apt-pkg/acquire-item.cc:897
+#: apt-pkg/acquire-item.cc:235 apt-pkg/acquire-item.cc:904
 msgid "MD5Sum mismatch"
 msgid "MD5Sum mismatch"
 msgstr "Somme de contrôle MD5 incohérente"
 msgstr "Somme de contrôle MD5 incohérente"
 
 
-#: apt-pkg/acquire-item.cc:711
+#: apt-pkg/acquire-item.cc:718
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "I wasn't able to locate a file for the %s package. This might mean you need "
 "I wasn't able to locate a file for the %s package. This might mean you need "
@@ -2509,7 +2511,7 @@ msgstr ""
 "sans doute que vous devrez corriger ce paquet manuellement (absence "
 "sans doute que vous devrez corriger ce paquet manuellement (absence "
 "d'architecture)."
 "d'architecture)."
 
 
-#: apt-pkg/acquire-item.cc:764
+#: apt-pkg/acquire-item.cc:771
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "I wasn't able to locate file for the %s package. This might mean you need to "
 "I wasn't able to locate file for the %s package. This might mean you need to "
@@ -2518,14 +2520,14 @@ msgstr ""
 "Je ne suis pas parvenu à localiser un fichier du paquet %s. Ceci signifie "
 "Je ne suis pas parvenu à localiser un fichier du paquet %s. Ceci signifie "
 "que vous devrez corriger manuellement ce paquet."
 "que vous devrez corriger manuellement ce paquet."
 
 
-#: apt-pkg/acquire-item.cc:800
+#: apt-pkg/acquire-item.cc:807
 #, c-format
 #, c-format
 msgid "The package index files are corrupted. No Filename: field for package %s."
 msgid "The package index files are corrupted. No Filename: field for package %s."
 msgstr ""
 msgstr ""
 "Les fichiers d'index des paquets sont corrompus. Aucun champ « Filename: » "
 "Les fichiers d'index des paquets sont corrompus. Aucun champ « Filename: » "
 "pour le paquet %s."
 "pour le paquet %s."
 
 
-#: apt-pkg/acquire-item.cc:887
+#: apt-pkg/acquire-item.cc:894
 msgid "Size mismatch"
 msgid "Size mismatch"
 msgstr "Taille incohérente"
 msgstr "Taille incohérente"
 
 
@@ -2534,6 +2536,100 @@ msgstr "Taille incoh
 msgid "Vendor block %s contains no fingerprint"
 msgid "Vendor block %s contains no fingerprint"
 msgstr "Le bloc de fournisseur %s ne comporte pas d'empreinte"
 msgstr "Le bloc de fournisseur %s ne comporte pas d'empreinte"
 
 
+#: apt-pkg/cdrom.cc:487
+#, c-format
+msgid ""
+"Using CD-ROM mount point %s\n"
+"Mounting CD-ROM\n"
+msgstr ""
+"Utilisation du point de montage %s pour le cédérom\n"
+"Montage du cédérom\n"
+
+#: apt-pkg/cdrom.cc:496 apt-pkg/cdrom.cc:578
+msgid "Identifying.. "
+msgstr "Identification..."
+
+#: apt-pkg/cdrom.cc:521
+#, c-format
+msgid "Stored Label: %s \n"
+msgstr "Étiquette présente : %s\n"
+
+#: apt-pkg/cdrom.cc:541
+#, c-format
+msgid "Using CD-ROM mount point %s\n"
+msgstr "Utilisation du point de montage %s pour le cédérom\n"
+
+#: apt-pkg/cdrom.cc:559
+msgid "Unmounting CD-ROM\n"
+msgstr "Démontage du cédérom\n"
+
+#: apt-pkg/cdrom.cc:563
+msgid "Waiting for disc...\n"
+msgstr "Attente du disque...\n"
+
+#. Mount the new CDROM
+#: apt-pkg/cdrom.cc:571
+msgid "Mounting CD-ROM...\n"
+msgstr "Montage du cédérom...\n"
+
+#: apt-pkg/cdrom.cc:589
+msgid "Scanning Disc for index files..\n"
+msgstr "Examen du disque à la recherche de fichiers d'index...\n"
+
+#: apt-pkg/cdrom.cc:627
+#, c-format
+msgid "Found %i package indexes, %i source indexes and %i signatures\n"
+msgstr "%i index de paquets, %i index de sources et %i signatures trouvés\n"
+
+#: apt-pkg/cdrom.cc:684
+msgid "That is not a valid name, try again.\n"
+msgstr "Ce nom n'est pas valable, veuillez recommencer.\n"
+
+#: apt-pkg/cdrom.cc:700
+#, c-format
+msgid ""
+"This Disc is called: \n"
+"'%s'\n"
+msgstr ""
+"Ce disque porte le nom suivant : \n"
+"« %s »\n"
+
+#: apt-pkg/cdrom.cc:704
+msgid "Copying package lists..."
+msgstr "Copie des listes de paquets"
+
+#: apt-pkg/cdrom.cc:728
+msgid "Writing new source list\n"
+msgstr "Écriture de la nouvelle liste de sources\n"
+
+#: apt-pkg/cdrom.cc:737
+msgid "Source List entries for this Disc are:\n"
+msgstr "Les entrées de liste de sources pour ce disque sont :\n"
+
+#: apt-pkg/cdrom.cc:771
+msgid "Unmounting CD-ROM..."
+msgstr "Démontage du cédérom..."
+
+#: apt-pkg/indexcopy.cc:261
+#, c-format
+msgid "Wrote %i records.\n"
+msgstr "%i enregistrements écrits.\n"
+
+#: apt-pkg/indexcopy.cc:263
+#, c-format
+msgid "Wrote %i records with %i missing files.\n"
+msgstr "%i enregistrements écrits avec %i fichiers manquants.\n"
+
+#: apt-pkg/indexcopy.cc:266
+#, c-format
+msgid "Wrote %i records with %i mismachted files\n"
+msgstr "%i enregistrements écrits avec %i correspondances incorrectes\n"
+
+#: apt-pkg/indexcopy.cc:269
+#, c-format
+msgid "Wrote %i records with %i missing files and %i mismachted files\n"
+msgstr "%i enregistrement écrits avec %i fichiers manquants et %i correspondances incorrectes\n"
+
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgstr ""
 #~ msgstr ""
 #~ "Identifiant « %s » du fournisseur inconnu dans la ligne %u de la liste "
 #~ "Identifiant « %s » du fournisseur inconnu dans la ligne %u de la liste "

Разница между файлами не показана из-за своего большого размера
+ 265 - 162
po/he.po


Разница между файлами не показана из-за своего большого размера
+ 275 - 166
po/hu.po


Разница между файлами не показана из-за своего большого размера
+ 282 - 197
po/it.po


Разница между файлами не показана из-за своего большого размера
+ 276 - 167
po/ja.po


Разница между файлами не показана из-за своего большого размера
+ 276 - 167
po/ko.po


+ 106 - 13
po/nb.po

@@ -160,7 +160,7 @@ msgstr "  Versjonstabell:"
 msgid "       %4i %s\n"
 msgid "       %4i %s\n"
 msgstr "       %4i %s\n"
 msgstr "       %4i %s\n"
 
 
-#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:731 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:353 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
@@ -1700,7 +1700,7 @@ msgstr "Tidsavbrudd p
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr "Tjeneren lukket forbindelsen"
 msgstr "Tjeneren lukket forbindelsen"
 
 
-#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:452
+#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:453
 msgid "Read error"
 msgid "Read error"
 msgstr "Lesefeil"
 msgstr "Lesefeil"
 
 
@@ -2100,54 +2100,54 @@ msgstr "Bruker ikke l
 msgid "Could not get lock %s"
 msgid "Could not get lock %s"
 msgstr "Får ikke låst %s"
 msgstr "Får ikke låst %s"
 
 
-#: apt-pkg/contrib/fileutl.cc:358
+#: apt-pkg/contrib/fileutl.cc:359
 #, c-format
 #, c-format
 msgid "Waited, for %s but it wasn't there"
 msgid "Waited, for %s but it wasn't there"
 msgstr "Ventet på %s, men den ble ikke funnet"
 msgstr "Ventet på %s, men den ble ikke funnet"
 
 
-#: apt-pkg/contrib/fileutl.cc:368
+#: apt-pkg/contrib/fileutl.cc:369
 #, c-format
 #, c-format
 msgid "Sub-process %s received a segmentation fault."
 msgid "Sub-process %s received a segmentation fault."
 msgstr "Underprosessen %s mottok et minnefeilsignal."
 msgstr "Underprosessen %s mottok et minnefeilsignal."
 
 
-#: apt-pkg/contrib/fileutl.cc:371
+#: apt-pkg/contrib/fileutl.cc:372
 #, c-format
 #, c-format
 msgid "Sub-process %s returned an error code (%u)"
 msgid "Sub-process %s returned an error code (%u)"
 msgstr "Underprosessen %s ga en feilkode (%u)"
 msgstr "Underprosessen %s ga en feilkode (%u)"
 
 
-#: apt-pkg/contrib/fileutl.cc:373
+#: apt-pkg/contrib/fileutl.cc:374
 #, c-format
 #, c-format
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr "Underprosessen %s avsluttet uventet"
 msgstr "Underprosessen %s avsluttet uventet"
 
 
-#: apt-pkg/contrib/fileutl.cc:417
+#: apt-pkg/contrib/fileutl.cc:418
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr "Kunne ikke åpne fila %s"
 msgstr "Kunne ikke åpne fila %s"
 
 
-#: apt-pkg/contrib/fileutl.cc:473
+#: apt-pkg/contrib/fileutl.cc:474
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
 msgstr "lese, har fremdeles %lu igjen å lese, men ingen igjen"
 msgstr "lese, har fremdeles %lu igjen å lese, men ingen igjen"
 
 
-#: apt-pkg/contrib/fileutl.cc:491
+#: apt-pkg/contrib/fileutl.cc:492
 msgid "Write error"
 msgid "Write error"
 msgstr "Skrivefeil"
 msgstr "Skrivefeil"
 
 
-#: apt-pkg/contrib/fileutl.cc:503
+#: apt-pkg/contrib/fileutl.cc:504
 #, c-format
 #, c-format
 msgid "write, still have %lu to write but couldn't"
 msgid "write, still have %lu to write but couldn't"
 msgstr "skrive, har fremdeles %lu igjen å skrive, men klarte ikke å"
 msgstr "skrive, har fremdeles %lu igjen å skrive, men klarte ikke å"
 
 
-#: apt-pkg/contrib/fileutl.cc:578
+#: apt-pkg/contrib/fileutl.cc:579
 msgid "Problem closing the file"
 msgid "Problem closing the file"
 msgstr "Problem ved låsing av fila"
 msgstr "Problem ved låsing av fila"
 
 
-#: apt-pkg/contrib/fileutl.cc:584
+#: apt-pkg/contrib/fileutl.cc:585
 msgid "Problem unlinking the file"
 msgid "Problem unlinking the file"
 msgstr "Problem ved oppheving av lenke til fila"
 msgstr "Problem ved oppheving av lenke til fila"
 
 
-#: apt-pkg/contrib/fileutl.cc:595
+#: apt-pkg/contrib/fileutl.cc:596
 msgid "Problem syncing the file"
 msgid "Problem syncing the file"
 msgstr "Problem ved oppdatering av fila"
 msgstr "Problem ved oppdatering av fila"
 
 
@@ -2509,5 +2509,98 @@ msgstr "Feil st
 msgid "Vendor block %s contains no fingerprint"
 msgid "Vendor block %s contains no fingerprint"
 msgstr "Utgivers blokk %s er ugyldig"
 msgstr "Utgivers blokk %s er ugyldig"
 
 
+#: apt-pkg/cdrom.cc:487
+#, c-format
+msgid ""
+"Using CD-ROM mount point %s\n"
+"Mounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:496 apt-pkg/cdrom.cc:578
+msgid "Identifying.. "
+msgstr ""
+
+#: apt-pkg/cdrom.cc:521
+#, c-format
+msgid "Stored Label: %s \n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:541
+#, c-format
+msgid "Using CD-ROM mount point %s\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:559
+msgid "Unmounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:563
+#, fuzzy
+msgid "Waiting for disc...\n"
+msgstr "Venter på hoder"
+
+#. Mount the new CDROM
+#: apt-pkg/cdrom.cc:571
+msgid "Mounting CD-ROM...\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:589
+msgid "Scanning Disc for index files..\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:627
+#, c-format
+msgid "Found %i package indexes, %i source indexes and %i signatures\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:684
+msgid "That is not a valid name, try again.\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:700
+#, c-format
+msgid ""
+"This Disc is called: \n"
+"'%s'\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:704
+#, fuzzy
+msgid "Copying package lists..."
+msgstr "Leser pakkelister"
+
+#: apt-pkg/cdrom.cc:728
+#, fuzzy
+msgid "Writing new source list\n"
+msgstr "Linje %u i kildelista %s er for lang"
+
+#: apt-pkg/cdrom.cc:737
+msgid "Source List entries for this Disc are:\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:771
+msgid "Unmounting CD-ROM..."
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:261
+#, c-format
+msgid "Wrote %i records.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:263
+#, c-format
+msgid "Wrote %i records with %i missing files.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:266
+#, c-format
+msgid "Wrote %i records with %i mismachted files\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:269
+#, c-format
+msgid "Wrote %i records with %i missing files and %i mismachted files\n"
+msgstr ""
+
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgstr "Ukjent selger ID «%s» i linje %u i kildelista %s"
 #~ msgstr "Ukjent selger ID «%s» i linje %u i kildelista %s"

Разница между файлами не показана из-за своего большого размера
+ 276 - 167
po/nl.po


Разница между файлами не показана из-за своего большого размера
+ 276 - 167
po/nn.po


+ 106 - 13
po/pl.po

@@ -147,7 +147,7 @@ msgstr "  Tabela wersji:"
 msgid "       %4i %s\n"
 msgid "       %4i %s\n"
 msgstr "       %4i %s\n"
 msgstr "       %4i %s\n"
 
 
-#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:731 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:353 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
@@ -1694,7 +1694,7 @@ msgstr "Przekroczenie czasu po
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr "Serwer zamkn±³ po³±czenie"
 msgstr "Serwer zamkn±³ po³±czenie"
 
 
-#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:452
+#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:453
 msgid "Read error"
 msgid "Read error"
 msgstr "B³±d odczytu"
 msgstr "B³±d odczytu"
 
 
@@ -2095,54 +2095,54 @@ msgstr "Dla pliku blokady %s montowanego przez NFS nie zostanie u
 msgid "Could not get lock %s"
 msgid "Could not get lock %s"
 msgstr "Nie uda³o siê uzyskaæ blokady %s"
 msgstr "Nie uda³o siê uzyskaæ blokady %s"
 
 
-#: apt-pkg/contrib/fileutl.cc:358
+#: apt-pkg/contrib/fileutl.cc:359
 #, c-format
 #, c-format
 msgid "Waited, for %s but it wasn't there"
 msgid "Waited, for %s but it wasn't there"
 msgstr "Oczekiwano na proces %s, ale nie by³o go"
 msgstr "Oczekiwano na proces %s, ale nie by³o go"
 
 
-#: apt-pkg/contrib/fileutl.cc:368
+#: apt-pkg/contrib/fileutl.cc:369
 #, c-format
 #, c-format
 msgid "Sub-process %s received a segmentation fault."
 msgid "Sub-process %s received a segmentation fault."
 msgstr "Podproces %s spowodowa³ naruszenie segmentacji."
 msgstr "Podproces %s spowodowa³ naruszenie segmentacji."
 
 
-#: apt-pkg/contrib/fileutl.cc:371
+#: apt-pkg/contrib/fileutl.cc:372
 #, c-format
 #, c-format
 msgid "Sub-process %s returned an error code (%u)"
 msgid "Sub-process %s returned an error code (%u)"
 msgstr "Podproces %s zwróci³ kod b³êdu (%u)"
 msgstr "Podproces %s zwróci³ kod b³êdu (%u)"
 
 
-#: apt-pkg/contrib/fileutl.cc:373
+#: apt-pkg/contrib/fileutl.cc:374
 #, c-format
 #, c-format
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr "Podproces %s zakoñczy³ siê niespodziewanie"
 msgstr "Podproces %s zakoñczy³ siê niespodziewanie"
 
 
-#: apt-pkg/contrib/fileutl.cc:417
+#: apt-pkg/contrib/fileutl.cc:418
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr "Nie uda³o siê otworzyæ pliku %s"
 msgstr "Nie uda³o siê otworzyæ pliku %s"
 
 
-#: apt-pkg/contrib/fileutl.cc:473
+#: apt-pkg/contrib/fileutl.cc:474
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
 msgstr "nale¿a³o przeczytaæ jeszcze %lu, ale nic nie zosta³o"
 msgstr "nale¿a³o przeczytaæ jeszcze %lu, ale nic nie zosta³o"
 
 
-#: apt-pkg/contrib/fileutl.cc:491
+#: apt-pkg/contrib/fileutl.cc:492
 msgid "Write error"
 msgid "Write error"
 msgstr "B³±d zapisu"
 msgstr "B³±d zapisu"
 
 
-#: apt-pkg/contrib/fileutl.cc:503
+#: apt-pkg/contrib/fileutl.cc:504
 #, c-format
 #, c-format
 msgid "write, still have %lu to write but couldn't"
 msgid "write, still have %lu to write but couldn't"
 msgstr "nale¿a³o zapisaæ jeszcze %lu, ale nie uda³o siê to"
 msgstr "nale¿a³o zapisaæ jeszcze %lu, ale nie uda³o siê to"
 
 
-#: apt-pkg/contrib/fileutl.cc:578
+#: apt-pkg/contrib/fileutl.cc:579
 msgid "Problem closing the file"
 msgid "Problem closing the file"
 msgstr "Problem przy zamykaniu pliku"
 msgstr "Problem przy zamykaniu pliku"
 
 
-#: apt-pkg/contrib/fileutl.cc:584
+#: apt-pkg/contrib/fileutl.cc:585
 msgid "Problem unlinking the file"
 msgid "Problem unlinking the file"
 msgstr "Problem przy usuwaniu pliku"
 msgstr "Problem przy usuwaniu pliku"
 
 
-#: apt-pkg/contrib/fileutl.cc:595
+#: apt-pkg/contrib/fileutl.cc:596
 msgid "Problem syncing the file"
 msgid "Problem syncing the file"
 msgstr "Problem przy zapisywaniu pliku na dysk"
 msgstr "Problem przy zapisywaniu pliku na dysk"
 
 
@@ -2509,5 +2509,98 @@ msgstr "B
 msgid "Vendor block %s contains no fingerprint"
 msgid "Vendor block %s contains no fingerprint"
 msgstr "Blok producenta %s jest nieprawid³owy"
 msgstr "Blok producenta %s jest nieprawid³owy"
 
 
+#: apt-pkg/cdrom.cc:487
+#, c-format
+msgid ""
+"Using CD-ROM mount point %s\n"
+"Mounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:496 apt-pkg/cdrom.cc:578
+msgid "Identifying.. "
+msgstr ""
+
+#: apt-pkg/cdrom.cc:521
+#, c-format
+msgid "Stored Label: %s \n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:541
+#, c-format
+msgid "Using CD-ROM mount point %s\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:559
+msgid "Unmounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:563
+#, fuzzy
+msgid "Waiting for disc...\n"
+msgstr "Oczekiwanie na nag³ówki"
+
+#. Mount the new CDROM
+#: apt-pkg/cdrom.cc:571
+msgid "Mounting CD-ROM...\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:589
+msgid "Scanning Disc for index files..\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:627
+#, c-format
+msgid "Found %i package indexes, %i source indexes and %i signatures\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:684
+msgid "That is not a valid name, try again.\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:700
+#, c-format
+msgid ""
+"This Disc is called: \n"
+"'%s'\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:704
+#, fuzzy
+msgid "Copying package lists..."
+msgstr "Czytanie list pakietów"
+
+#: apt-pkg/cdrom.cc:728
+#, fuzzy
+msgid "Writing new source list\n"
+msgstr "Linia %u w li¶cie ¼róde³ %s jest zbyt d³uga."
+
+#: apt-pkg/cdrom.cc:737
+msgid "Source List entries for this Disc are:\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:771
+msgid "Unmounting CD-ROM..."
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:261
+#, c-format
+msgid "Wrote %i records.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:263
+#, c-format
+msgid "Wrote %i records with %i missing files.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:266
+#, c-format
+msgid "Wrote %i records with %i mismachted files\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:269
+#, c-format
+msgid "Wrote %i records with %i missing files and %i mismachted files\n"
+msgstr ""
+
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgstr "Nieznany identyfikator producenta '%s' w linii %u listy ¼róde³ %s"
 #~ msgstr "Nieznany identyfikator producenta '%s' w linii %u listy ¼róde³ %s"

Разница между файлами не показана из-за своего большого размера
+ 277 - 171
po/pt.po


Разница между файлами не показана из-за своего большого размера
+ 277 - 171
po/pt_BR.po


Разница между файлами не показана из-за своего большого размера
+ 369 - 217
po/ro.po


Разница между файлами не показана из-за своего большого размера
+ 303 - 181
po/ru.po


Разница между файлами не показана из-за своего большого размера
+ 276 - 167
po/sk.po


+ 106 - 13
po/sl.po

@@ -143,7 +143,7 @@ msgstr " Tabela razli
 msgid "       %4i %s\n"
 msgid "       %4i %s\n"
 msgstr "       %4i %s\n"
 msgstr "       %4i %s\n"
 
 
-#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:731 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:353 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
@@ -1674,7 +1674,7 @@ msgstr "Povezava potekla"
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr "Stre¾nik je zaprl povezavo"
 msgstr "Stre¾nik je zaprl povezavo"
 
 
-#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:452
+#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:453
 msgid "Read error"
 msgid "Read error"
 msgstr "Napaka pri branju"
 msgstr "Napaka pri branju"
 
 
@@ -2075,54 +2075,54 @@ msgstr "Brez uporabe zaklepanja za datoteko %s, priklopljeno z NTFS"
 msgid "Could not get lock %s"
 msgid "Could not get lock %s"
 msgstr "Ni mogoèe dobiti zaklenjene datoteke %s"
 msgstr "Ni mogoèe dobiti zaklenjene datoteke %s"
 
 
-#: apt-pkg/contrib/fileutl.cc:358
+#: apt-pkg/contrib/fileutl.cc:359
 #, c-format
 #, c-format
 msgid "Waited, for %s but it wasn't there"
 msgid "Waited, for %s but it wasn't there"
 msgstr "Èakal, a %s ni bil tam"
 msgstr "Èakal, a %s ni bil tam"
 
 
-#: apt-pkg/contrib/fileutl.cc:368
+#: apt-pkg/contrib/fileutl.cc:369
 #, c-format
 #, c-format
 msgid "Sub-process %s received a segmentation fault."
 msgid "Sub-process %s received a segmentation fault."
 msgstr "Napaka pri razèlenjenosti podprocesa %s."
 msgstr "Napaka pri razèlenjenosti podprocesa %s."
 
 
-#: apt-pkg/contrib/fileutl.cc:371
+#: apt-pkg/contrib/fileutl.cc:372
 #, c-format
 #, c-format
 msgid "Sub-process %s returned an error code (%u)"
 msgid "Sub-process %s returned an error code (%u)"
 msgstr "Podproces %s je vrnil kodo napake (%u)"
 msgstr "Podproces %s je vrnil kodo napake (%u)"
 
 
-#: apt-pkg/contrib/fileutl.cc:373
+#: apt-pkg/contrib/fileutl.cc:374
 #, c-format
 #, c-format
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr "Podproces %s se je neprièakovano zakljuèil"
 msgstr "Podproces %s se je neprièakovano zakljuèil"
 
 
-#: apt-pkg/contrib/fileutl.cc:417
+#: apt-pkg/contrib/fileutl.cc:418
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr "Ne morem odpreti datoteke %s"
 msgstr "Ne morem odpreti datoteke %s"
 
 
-#: apt-pkg/contrib/fileutl.cc:473
+#: apt-pkg/contrib/fileutl.cc:474
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
 msgstr "berem, ¹e vedno %lu za branje, a nobeden ostal"
 msgstr "berem, ¹e vedno %lu za branje, a nobeden ostal"
 
 
-#: apt-pkg/contrib/fileutl.cc:491
+#: apt-pkg/contrib/fileutl.cc:492
 msgid "Write error"
 msgid "Write error"
 msgstr "Napaka pri pisanju"
 msgstr "Napaka pri pisanju"
 
 
-#: apt-pkg/contrib/fileutl.cc:503
+#: apt-pkg/contrib/fileutl.cc:504
 #, c-format
 #, c-format
 msgid "write, still have %lu to write but couldn't"
 msgid "write, still have %lu to write but couldn't"
 msgstr "pi¹em, ¹e vedno %lu za pisanje, a ni mogoèe"
 msgstr "pi¹em, ¹e vedno %lu za pisanje, a ni mogoèe"
 
 
-#: apt-pkg/contrib/fileutl.cc:578
+#: apt-pkg/contrib/fileutl.cc:579
 msgid "Problem closing the file"
 msgid "Problem closing the file"
 msgstr "Te¾ava pri zapiranju datoteke"
 msgstr "Te¾ava pri zapiranju datoteke"
 
 
-#: apt-pkg/contrib/fileutl.cc:584
+#: apt-pkg/contrib/fileutl.cc:585
 msgid "Problem unlinking the file"
 msgid "Problem unlinking the file"
 msgstr "Te¾ava pri odvezovanju datoteke"
 msgstr "Te¾ava pri odvezovanju datoteke"
 
 
-#: apt-pkg/contrib/fileutl.cc:595
+#: apt-pkg/contrib/fileutl.cc:596
 msgid "Problem syncing the file"
 msgid "Problem syncing the file"
 msgstr "Te¾ava pri usklajevanju datoteke"
 msgstr "Te¾ava pri usklajevanju datoteke"
 
 
@@ -2484,5 +2484,98 @@ msgstr "Neujemanje velikosti"
 msgid "Vendor block %s contains no fingerprint"
 msgid "Vendor block %s contains no fingerprint"
 msgstr "Ponudnikov blok %s je neveljaven"
 msgstr "Ponudnikov blok %s je neveljaven"
 
 
+#: apt-pkg/cdrom.cc:487
+#, c-format
+msgid ""
+"Using CD-ROM mount point %s\n"
+"Mounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:496 apt-pkg/cdrom.cc:578
+msgid "Identifying.. "
+msgstr ""
+
+#: apt-pkg/cdrom.cc:521
+#, c-format
+msgid "Stored Label: %s \n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:541
+#, c-format
+msgid "Using CD-ROM mount point %s\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:559
+msgid "Unmounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:563
+#, fuzzy
+msgid "Waiting for disc...\n"
+msgstr "Èakanje na glave"
+
+#. Mount the new CDROM
+#: apt-pkg/cdrom.cc:571
+msgid "Mounting CD-ROM...\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:589
+msgid "Scanning Disc for index files..\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:627
+#, c-format
+msgid "Found %i package indexes, %i source indexes and %i signatures\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:684
+msgid "That is not a valid name, try again.\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:700
+#, c-format
+msgid ""
+"This Disc is called: \n"
+"'%s'\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:704
+#, fuzzy
+msgid "Copying package lists..."
+msgstr "Branje seznama paketov"
+
+#: apt-pkg/cdrom.cc:728
+#, fuzzy
+msgid "Writing new source list\n"
+msgstr "Vrstica %u v seznamu virov %s je predolga."
+
+#: apt-pkg/cdrom.cc:737
+msgid "Source List entries for this Disc are:\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:771
+msgid "Unmounting CD-ROM..."
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:261
+#, c-format
+msgid "Wrote %i records.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:263
+#, c-format
+msgid "Wrote %i records with %i missing files.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:266
+#, c-format
+msgid "Wrote %i records with %i mismachted files\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:269
+#, c-format
+msgid "Wrote %i records with %i missing files and %i mismachted files\n"
+msgstr ""
+
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgstr "Neznan ID ponudnika '%s' v vrstici %u v seznamu virov %s"
 #~ msgstr "Neznan ID ponudnika '%s' v vrstici %u v seznamu virov %s"

Разница между файлами не показана из-за своего большого размера
+ 276 - 167
po/sv.po


Разница между файлами не показана из-за своего большого размера
+ 275 - 166
po/tl.po


Разница между файлами не показана из-за своего большого размера
+ 278 - 169
po/zh_CN.po


+ 106 - 16
po/zh_TW.po

@@ -147,7 +147,7 @@ msgstr "  版本表格:"
 msgid "       %4i %s\n"
 msgid "       %4i %s\n"
 msgstr "       %4i %s\n"
 msgstr "       %4i %s\n"
 
 
-#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:731 cmdline/apt-config.cc:70
+#: cmdline/apt-cache.cc:1651 cmdline/apt-cdrom.cc:353 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:545
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #: cmdline/apt-get.cc:2313 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
@@ -1667,7 +1667,7 @@ msgstr "連線逾時"
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr "伺服器關閉聯線。"
 msgstr "伺服器關閉聯線。"
 
 
-#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:452
+#: methods/ftp.cc:338 methods/rsh.cc:190 apt-pkg/contrib/fileutl.cc:453
 msgid "Read error"
 msgid "Read error"
 msgstr "讀取失敗。"
 msgstr "讀取失敗。"
 
 
@@ -2067,54 +2067,54 @@ msgstr "不使用檔案鎖定於 nfs 掛載點上得檔案 %s"
 msgid "Could not get lock %s"
 msgid "Could not get lock %s"
 msgstr "無法取得『%s』鎖。"
 msgstr "無法取得『%s』鎖。"
 
 
-#: apt-pkg/contrib/fileutl.cc:358
+#: apt-pkg/contrib/fileutl.cc:359
 #, c-format
 #, c-format
 msgid "Waited, for %s but it wasn't there"
 msgid "Waited, for %s but it wasn't there"
 msgstr "等待 %s 但是它不存在"
 msgstr "等待 %s 但是它不存在"
 
 
-#: apt-pkg/contrib/fileutl.cc:368
+#: apt-pkg/contrib/fileutl.cc:369
 #, c-format
 #, c-format
 msgid "Sub-process %s received a segmentation fault."
 msgid "Sub-process %s received a segmentation fault."
 msgstr "子程序 %s 收到一個記憶體錯誤"
 msgstr "子程序 %s 收到一個記憶體錯誤"
 
 
-#: apt-pkg/contrib/fileutl.cc:371
+#: apt-pkg/contrib/fileutl.cc:372
 #, c-format
 #, c-format
 msgid "Sub-process %s returned an error code (%u)"
 msgid "Sub-process %s returned an error code (%u)"
 msgstr "子程序 %s 回傳錯誤碼(%u)"
 msgstr "子程序 %s 回傳錯誤碼(%u)"
 
 
-#: apt-pkg/contrib/fileutl.cc:373
+#: apt-pkg/contrib/fileutl.cc:374
 #, c-format
 #, c-format
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr "子程序 %s 不預期的結束"
 msgstr "子程序 %s 不預期的結束"
 
 
-#: apt-pkg/contrib/fileutl.cc:417
+#: apt-pkg/contrib/fileutl.cc:418
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr "無法開啟『%s』檔案。"
 msgstr "無法開啟『%s』檔案。"
 
 
-#: apt-pkg/contrib/fileutl.cc:473
+#: apt-pkg/contrib/fileutl.cc:474
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
 msgstr "讀取,仍有 %lu 未讀"
 msgstr "讀取,仍有 %lu 未讀"
 
 
-#: apt-pkg/contrib/fileutl.cc:491
+#: apt-pkg/contrib/fileutl.cc:492
 msgid "Write error"
 msgid "Write error"
 msgstr "寫入失敗。"
 msgstr "寫入失敗。"
 
 
-#: apt-pkg/contrib/fileutl.cc:503
+#: apt-pkg/contrib/fileutl.cc:504
 #, c-format
 #, c-format
 msgid "write, still have %lu to write but couldn't"
 msgid "write, still have %lu to write but couldn't"
 msgstr "寫入,仍有 %lu 待寫入但無法寫入"
 msgstr "寫入,仍有 %lu 待寫入但無法寫入"
 
 
-#: apt-pkg/contrib/fileutl.cc:578
+#: apt-pkg/contrib/fileutl.cc:579
 msgid "Problem closing the file"
 msgid "Problem closing the file"
 msgstr "程式關閉檔案"
 msgstr "程式關閉檔案"
 
 
-#: apt-pkg/contrib/fileutl.cc:584
+#: apt-pkg/contrib/fileutl.cc:585
 msgid "Problem unlinking the file"
 msgid "Problem unlinking the file"
 msgstr "程式刪除檔案"
 msgstr "程式刪除檔案"
 
 
-#: apt-pkg/contrib/fileutl.cc:595
+#: apt-pkg/contrib/fileutl.cc:596
 msgid "Problem syncing the file"
 msgid "Problem syncing the file"
 msgstr "程式同步檔案"
 msgstr "程式同步檔案"
 
 
@@ -2466,6 +2466,99 @@ msgstr "檔案大小不符合。"
 msgid "Vendor block %s contains no fingerprint"
 msgid "Vendor block %s contains no fingerprint"
 msgstr "『%s』商家區段有錯誤。"
 msgstr "『%s』商家區段有錯誤。"
 
 
+#: apt-pkg/cdrom.cc:487
+#, c-format
+msgid ""
+"Using CD-ROM mount point %s\n"
+"Mounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:496 apt-pkg/cdrom.cc:578
+msgid "Identifying.. "
+msgstr ""
+
+#: apt-pkg/cdrom.cc:521
+#, c-format
+msgid "Stored Label: %s \n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:541
+#, c-format
+msgid "Using CD-ROM mount point %s\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:559
+msgid "Unmounting CD-ROM\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:563
+#, fuzzy
+msgid "Waiting for disc...\n"
+msgstr "等待標頭"
+
+#. Mount the new CDROM
+#: apt-pkg/cdrom.cc:571
+msgid "Mounting CD-ROM...\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:589
+msgid "Scanning Disc for index files..\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:627
+#, c-format
+msgid "Found %i package indexes, %i source indexes and %i signatures\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:684
+msgid "That is not a valid name, try again.\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:700
+#, fuzzy, c-format
+msgid ""
+"This Disc is called: \n"
+"'%s'\n"
+msgstr "這個碟片名為:"
+
+#: apt-pkg/cdrom.cc:704
+#, fuzzy
+msgid "Copying package lists..."
+msgstr "讀取套件清單中"
+
+#: apt-pkg/cdrom.cc:728
+#, fuzzy
+msgid "Writing new source list\n"
+msgstr "來源檔『%2$s』第 %1$u 行太長。"
+
+#: apt-pkg/cdrom.cc:737
+msgid "Source List entries for this Disc are:\n"
+msgstr ""
+
+#: apt-pkg/cdrom.cc:771
+msgid "Unmounting CD-ROM..."
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:261
+#, c-format
+msgid "Wrote %i records.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:263
+#, c-format
+msgid "Wrote %i records with %i missing files.\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:266
+#, c-format
+msgid "Wrote %i records with %i mismachted files\n"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:269
+#, c-format
+msgid "Wrote %i records with %i missing files and %i mismachted files\n"
+msgstr ""
+
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgid "Unknown vendor ID '%s' in line %u of source list %s"
 #~ msgstr "來源檔『%3$s』第 %2$u 行的『%1$s』商家名稱有錯誤。"
 #~ msgstr "來源檔『%3$s』第 %2$u 行的『%1$s』商家名稱有錯誤。"
 
 
@@ -2480,9 +2573,6 @@ msgstr "『%s』商家區段有錯誤。"
 #~ msgid "Please insert a Disc in the drive and press enter"
 #~ msgid "Please insert a Disc in the drive and press enter"
 #~ msgstr "請把碟片插入碟機,然後按 [Enter] 鍵。"
 #~ msgstr "請把碟片插入碟機,然後按 [Enter] 鍵。"
 
 
-#~ msgid "This Disc is called:"
-#~ msgstr "這個碟片名為:"
-
 #~ msgid "Done. "
 #~ msgid "Done. "
 #~ msgstr "完成。"
 #~ msgstr "完成。"