[Bug 565229] Re: /etc/cron.daily/apt assumes that CacheArchive inside CacheDir

Alexander Pyhalov 565229 at bugs.launchpad.net
Thu Mar 1 09:46:16 UTC 2012


Thanks, this fix works (however, it was not integrated in Ubuntu 10.04,
which I use).

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/565229

Title:
  /etc/cron.daily/apt assumes that CacheArchive inside CacheDir

Status in “apt” package in Ubuntu:
  Incomplete

Bug description:
  Binary package hint: apt

  cron apt script assumes that CacheArchive directory is inside CacheDir. However, apt allows configuration when CacheArchive is outside CacheDir (for example, I use it because of space shortage in /var).
  Some changes to /etc/cron.daily/apt like this would be useful...

  --- /etc/cron.daily/apt	2010-04-17 11:42:26.000000000 +0400
  +++ tmp/apt	2010-04-17 11:45:38.000000000 +0400
  @@ -181,7 +181,11 @@
   	exit
       fi
       
  -    Cache="${Dir%/}/${CacheDir%/}/${CacheArchive%/}/"
  +    if [ "x$CacheArchive" != "x${CacheArchive#/}" ]; then
  +	Cache="${CacheArchive%/}/";
  +    else
  +	Cache="${Dir%/}/${CacheDir%/}/${CacheArchive%/}/";
  +    fi
   
       # check age
       if [ ! $MaxAge -eq 0 ] && [ ! $MinAge -eq 0 ]; then
  @@ -279,7 +283,13 @@
   	return
       fi
   
  -    Cache="${Dir}/${CacheDir}/${CacheArchive}/"
  +    
  +    if [ "x$CacheArchive" != "x${CacheArchive#/}" ]; then
  +	Cache="${CacheArchive%/}/";
  +    else
  +	Cache="${Dir%/}/${CacheDir%/}/${CacheArchive%/}/";
  +    fi
  +
       Back="${Dir}/${CacheDir}/${CacheBackup}/"
       BackX="${Back}${CacheArchive}/"
       for x in $(seq 0 1 $((${BackupLevel}-1))); do

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/565229/+subscriptions




More information about the foundations-bugs mailing list