Hi,

Quoting Luca Falavigna (2015-10-31 08:28:58)
> 2015-10-30 22:00 GMT+01:00 Johannes Schauer <jo...@debian.org>:
> > What would the benefit be to have a --apt-get-update-failed-commands hook?
> > Which hook would one like to run when "apt-get update" failed?
> 
> I have a local repository of built packages linked to my sbuild
> instances. Everytime a build is successful, the repository indexes are
> updated. In case of multiple builds, it could happen newer concurrent
> builds start to update apt cache just in the middle of a
> apt-ftparchive run, resulting in a "hash sum mismatch" error.
> 
> I would like to implement a simple locking mechanism using plain files
> (it's definitely not the best approach, I welcome better ideas ;). I
> acquire the lock in the chroot-setup and I should manage the removal
> of the lock if something goes wrong in whatever stage. With the
> current status, if sbuild fails in apt-get-update the lock is never deleted
> because no commands are triggered.

if you run multiple concurrent sbuild instances, would it not be a better idea
to always run sbuild with --no-apt-update and instead run "sbuild-update
-udcar" whenever it is actually needed? I imagine that lots of time is lost by
"apt-get update" being run on every build even if there is nothing new to
update.

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to