]> git.saurik.com Git - apt.git/blobdiff - debian/apt.cron.daily
* merged with apt--main and apt--fixes
[apt.git] / debian / apt.cron.daily
index 7ee7e46db947ee9f42da4a8b8376b6c456234593..2d93a5ba47fc5363befc6a6a6693fa4d7aba9015 100644 (file)
@@ -74,7 +74,7 @@ check_size_constraints()
 {
     # min-age in days
     MaxAge=0
 {
     # min-age in days
     MaxAge=0
-    MinAge=1
+    MinAge=2
     MaxSize=0
     CacheDir="var/cache/apt"
     CacheArchive="archives/"
     MaxSize=0
     CacheDir="var/cache/apt"
     CacheArchive="archives/"
@@ -110,7 +110,7 @@ check_size_constraints()
        MinAge=$(($MinAge*24*60*60))
 
        # reverse-sort by mtime
        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
            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)"
                #echo "$file ($delta), $MinAge"
                if [ $delta -le $MinAge ]; then
                    #echo "Skiping $file (delta=$delta)"
-                   continue
+                   break
                fi
            fi
 
                fi
            fi