summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-07-14 11:23:38 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-07-14 11:23:38 +0200
commit6e7c6c3f58193fd5db3d9d598ac65a1571522a58 (patch)
tree672ac5e81b511fcecce42bd6ba2e747aa4958984
parent1d3235a80eaf020af66d2582214b3ef0594ec951 (diff)
* debian/apt.cron.daily:
- if the timestamp is too far in the future, delete it
-rw-r--r--debian/apt.cron.daily7
-rw-r--r--debian/changelog2
2 files changed, 9 insertions, 0 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 5c5ca88c7..b40bb2c30 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -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
diff --git a/debian/changelog b/debian/changelog
index fe03eb8e0..7f14502e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,8 @@ apt (0.7.22) UNRELEASED; urgency=low
[ Michael Vogt ]
* honor the dpkg hold state in AutoInstOk (closes: #64141)
+ * debian/apt.cron.daily:
+ - if the timestamp is too far in the future, delete it
[ Julian Andres Klode ]
* apt-pkg/contrib/configuration.cc: Fix a small memory leak in