added usbreset.lsp
[rrq/newlisp-ftw.git] / autorecommended.lsp
index 43252cbdbb7760281f54d6a3559012d7ff44bbea..ef3a595106d4d526c70aae50d1b266e25f342d20 100755 (executable)
@@ -17,7 +17,7 @@
 (setf PROVFMT "dpkg-query -W -f '${Package} ${Provides}\\n' %s")
 (define PROV:PROV nil)
 (dolist (P INSTALLED) (if (PROV P) (push P (PROV P)) (PROV P (list P))))
-(dolist (PL (explode INSTALLED 1000))
+(dolist (PL (explode INSTALLED 10000))
   (write 2 ".")
   (dolist (PPV (dpkg-exec (format PROVFMT (join PL " "))))
     (let ((P (PPV 0)))
@@ -30,7 +30,7 @@
 (write 2 "Initializing 'recommended-by' ")
 (setf RECFMT "dpkg-query -W -f '${Package} ${Recommends}' %s")
 (define REC:REC nil)
-(dolist (PL (explode INSTALLED 1000))
+(dolist (PL (explode INSTALLED 10000))
   (write 2 ".")
   (dolist (RR  (dpkg-exec (format RECFMT (join PL " "))))
     (let ((P (RR 0)))
@@ -71,7 +71,7 @@
 (write 2 "Initializing actual 'depends' ")
 (setf DEPFMT "dpkg-query -W -f '${Package} ${Pre-Depends} ${Depends}\\n' %s")
 (define DEP:DEP nil)
-(dolist (PL (explode INSTALLED 1000))
+(dolist (PL (explode INSTALLED 10000))
   (write 2 ".")
   (dolist (RR (exec (format DEPFMT (join PL " "))))
     (when (regex "([^ ]+) (.*)" RR)
 
 (let ((Y (difference INSTALLED (closure MANUAL))))
   (write-line 2 (format "=> %d automatic recommended packages" (length Y)))
-  (map println Y))
+  (map (fn (P) (println P " by " (join (or (REC P) '("???")) " "))) Y))
 
 (exit 0)