]> git.saurik.com Git - apt.git/commitdiff
* debian/apt.cron.daily:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 14 Jul 2009 09:24:19 +0000 (11:24 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 14 Jul 2009 09:24:19 +0000 (11:24 +0200)
  - if the timestamp is too far in the future, delete it
    (LP: #135262)

debian/apt.cron.daily
debian/changelog

index 7f2978568bb884853c01e6fce9ca6f40a9216871..3c440307c0b822ea864112bd1dfe397531e1595c 100644 (file)
@@ -76,6 +76,13 @@ check_stamp()
     #echo "stampfile: $1"
     #echo "interval=$interval, now=$now, stamp=$stamp, delta=$delta"
 
+    # remove timestamps a day (or more) in the future and force re-check
+    if [ $stamp -gt $(($now+86400)) ]; then
+         echo "WARNING: file $stamp_file has a timestamp in the future: $stamp"
+         rm -f "$stamp_file"
+         return 0
+    fi
+
     if [ $delta -ge $interval ]; then
         return 0
     fi
index d6e6a59971353f15b66a912bcb6ddf1ce7e64dfa..498c6710c7ee9b9ee3222ba1244266a0b471bbaf 100644 (file)
@@ -7,6 +7,10 @@ apt (0.7.21ubuntu2~ppa1) karmic; urgency=low
   * methods/http.cc:
     - ignore SIGPIPE, we deal with EPIPE from write in 
       HttpMethod::ServerDie() (LP: #385144)
+  * debian/apt.cron.daily:
+    - if the timestamp is too far in the future, delete it 
+      (LP: #135262)
+
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 02 Jul 2009 14:11:35 +0200