Commit 4e9cfbbb authored by Vitaly Lipatov's avatar Vitaly Lipatov

check_update_repo: check for /var/lib/apt/lists date

parent 8df293ff
......@@ -34,15 +34,15 @@ __is_repo_info_downloaded()
__is_repo_info_uptodate()
{
case $PMTYPE in
apt-rpm)
apt-*)
# apt-deb do not update lock file date
if $SUDO test -r /var/lib/apt/lists ; then
local LOCKFILE=/var/lib/apt/lists/lock
#if $SUDO test -r /var/lib/apt/lists ; then
local LOCKFILE=/var/lib/apt/lists
$SUDO test -r $LOCKFILE || return
# if repo older than 1 day, return false
# find print string if file is obsoleted
test -z "$($SUDO find $LOCKFILE -mtime +1)" || return
fi
test -z "$(find $LOCKFILE -maxdepth 0 -mtime +1)" || return
#fi
;;
*)
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment