22 Oct
2011
22 Oct
'11
11:13 a.m.
On 10/22/11, Pierre Schmitz <pierre@archlinux.de> wrote:
Why not just use "mktemp -d"? Should be save enough.
Because that makes the script 10x more complicated or 10x slower. Either you have to store the tempdir path somewhere (/run/checkupdates.tempdir) or you delete the fakedb and redownload all the sync repos each call. The only benefit I can see would be slightly better support on multiuser systems, but you'll be running into issues there from pacman's own lockfile. If multiuser support is an issue, the best way around that would be fakedb="${fakedb:-/tmp/.localsync/}${USER}/" Allowing two people to run checkupdates at the same time. -Kyle http://kmkeen.com