diff lisp/package-get.el @ 382:064ab7fed2e0 r21-2-6

Import from CVS: tag r21-2-6
author cvs
date Mon, 13 Aug 2007 11:07:39 +0200
parents 8626e4521993
children bbff43aa5eb7
line wrap: on
line diff
--- a/lisp/package-get.el	Mon Aug 13 11:07:11 2007 +0200
+++ b/lisp/package-get.el	Mon Aug 13 11:07:39 2007 +0200
@@ -260,7 +260,10 @@
   (mapcar (lambda (site)
             (vector (car site)
                     `(push (quote ,(cdr site))
-                           package-get-remote)))
+                           package-get-remote)
+                    :style 'toggle
+                    :selected `(member (quote ,(cdr site))
+                                       package-get-remote)))
           package-get-download-sites))
 
 ;;;###autoload
@@ -702,8 +705,10 @@
 	 (package-status t)
 	 filenames full-package-filename)
     (if (null this-package)
-	(error "Couldn't find package %s with version %s"
-	       package version))
+	(if package-get-remote
+	    (error "Couldn't find package %s with version %s"
+		   package version)
+	  (error "No download sites or local package locations specified.")))
     (if (null base-filename)
 	(error "No filename associated with package %s, version %s"
 	       package version))
@@ -804,7 +809,10 @@
 
       (if (or (not full-package-filename)
 	      (not (file-exists-p full-package-filename)))
-	  (error "Unable to find file %s" base-filename))
+	  (if package-get-remote
+	      (error "Unable to find file %s" base-filename)
+	    (error
+	     "No download sites or local package locations specified.")))
       ;; Validate the md5 checksum
       ;; Doing it with XEmacs removes the need for an external md5 program
       (message "Validating checksum for `%s'..." package) (sit-for 0)
@@ -937,7 +945,9 @@
   (if (efs-ftp-path filename)
       filename
     (let ((dir (cadr search)))
-      (concat "/"
+      (concat (if (string-match "@" (car search))
+		  "/"
+		"/anonymous@")
 	      (car search) ":"
 	      (if (string-match "/$" dir)
 		  dir