* supress output when /var/cache/apt/archives is empty; break when min-age is reached
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 6 Apr 2005 17:49:40 +0000 (17:49 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 6 Apr 2005 17:49:40 +0000 (17:49 +0000)
debian/apt.cron.daily

index 5145a5d..2d93a5b 100644 (file)
@@ -110,7 +110,7 @@ check_size_constraints()
        MinAge=$(($MinAge*24*60*60))
 
        # reverse-sort by mtime
-       for file in $(ls -rt $Cache/*.deb); do 
+       for file in $(ls -rt $Cache/*.deb 2>/dev/null); do 
            du=$(du -s $Cache)
            size=${du%%/*}
            # check if the cache is small enough
@@ -125,7 +125,7 @@ check_size_constraints()
                #echo "$file ($delta), $MinAge"
                if [ $delta -le $MinAge ]; then
                    #echo "Skiping $file (delta=$delta)"
-                   continue
+                   break
                fi
            fi