aptprogress: add finishUpdate hook

it is triggered by apply_udpate in updated

Signed-off-by: Manuel Traut <manut@linutronix.de>
updated: add rw_access class

this class can be used to access files or directories on a normaly
read-only mounted filesystem. The class remounts the filesystem rw
on entry (only if it was mounted ro) and remounts it on exit to
the original status.

usage:
  with rw_access ("/root/myfile.txt") as f:
     f.write ("huhu")

  with rw_access ("/home/mr_x"):
     os.system ("touch /home/mr_x/xyz")

Signed-off-by: Manuel Traut <manut@linutronix.de>
updated: add repocache parameter

don't use hard-coded path to place update repositories

Signed-off-by: Manuel Traut <manut@linutronix.de>
rw_class: remove debugging prints

Signed-off-by: Manuel Traut <manut@linutronix.de>
updated: use rw_access for writeable files

to enable updated runing on r/o filesystems

Signed-off-by: Manuel Traut <manut@linutronix.de>
updated: run apply_update in seperate process

to ensure that all files opened by python-apt are closed before remounting
the filesystem read-only. this is needed because python-apt doesn't
provide any functions to release the bindings and the del object functions
don't close the opened files.

Signed-off-by: Manuel Traut <manut@linutronix.de>