Hi!

I have etch installed from DVDs, so /etc/apt/sources.list
contains only 'deb cdrom://...' entries.

With such setup 'apt-get install emdebian-tools' fails with:
Unable to determine apt-cache policy for Debian main! at
/var/lib/dpkg/info/emdebian-tools.postinst line 131.

Should postinst be changed to something like this, maybe?

--- /var/lib/dpkg/info/emdebian-tools.postinst.orig     2007-04-26 
16:29:15.000000000 +0400
+++ /var/lib/dpkg/info/emdebian-tools.postinst  2007-04-26 16:33:20.000000000 
+0400
@@ -115,8 +115,12 @@
        # Improved to detect priority. Ben Hutchings <[EMAIL PROTECTED]>
        open POLICY, "apt-cache policy |" or die "Unable to read apt policy: 
$!";
        for (<POLICY>) {
-           if (/^\s*(\d+)/) {
+           if (/^\s*(\d+)\s(\w+):.*\s+(\w+)\/\w+\/?\w*\sPackages$/) {
                $cur_pri = $1;
+               if ((!defined($max_pri) || $cur_pri > $max_pri) && $2 eq 
"cdrom") { 
+                       $max_pri=$cur_pri;
+                       $max_pri_suite=$3; 
+               }
            } elsif (defined($cur_pri)
                     && (!defined($max_pri) || $cur_pri > $max_pri)
                     && /^\s+release o=Debian,a=(\w+),l=Debian,c=main\s*$/) {



-- 

Attachment: signature.asc
Description: Digital signature

Reply via email to