[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#97364: [PATCH] Fix to ignore trees with .aptignr and handle Sources.gz listing ony non-existing files



Hello,

[ Anne I just discovered that you're saying not so nice things
behind my back. You shouldn't be very proud of that.

Actually I don't think I made so many mistakes with
debian-cd ... this discussion was rather heated, someone had
to take a decision I took it because jason proposed this as
a possible way to get into agreement. ]

Here's a proposed patch. I've not yet tested it but i'll do
as soon as i can.

Cheers,
-- 
Raphaël Hertzog -+- http://strasbourg.linuxfr.org/~raphael/
Le bouche à oreille du Net : http://www.beetell.com
Naviguer sans se fatiguer à chercher : http://www.deenoo.com
Formation Linux et logiciel libre : http://www.logidee.com
diff -ur apt-0.5.3.orig/cmdline/apt-cdrom.cc apt-0.5.3/cmdline/apt-cdrom.cc
--- apt-0.5.3.orig/cmdline/apt-cdrom.cc	Tue Feb 20 08:03:17 2001
+++ apt-0.5.3/cmdline/apt-cdrom.cc	Fri Jul 20 15:57:54 2001
@@ -61,6 +61,13 @@
 	 InfoDir = CD + ".disk/";
    }
 
+   /* Ok, if we have a .aptignr file we skip this part of the tree.
+      It usually that we have corresponding -secured tree near. */
+   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 */
diff -ur apt-0.5.3.orig/cmdline/indexcopy.cc apt-0.5.3/cmdline/indexcopy.cc
--- apt-0.5.3.orig/cmdline/indexcopy.cc	Tue Feb 20 08:03:17 2001
+++ apt-0.5.3/cmdline/indexcopy.cc	Fri Jul 20 16:18:58 2001
@@ -276,7 +276,10 @@
    cout << '.' << endl;
    
    if (Packages == 0)
-      return _error->Warning("No valid records were found.");
+      /* With the new -secured tree, some Packages or Sources files
+         list only non existing files, it's not a problem, just ignore
+         them */
+      return true;
    
    if (NotFound + WrongSize > 10)
       cout << "Alot of entries were discarded, something may be wrong." << endl;

Reply to: