1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00
pacman/scripts
Dan McGee a63aeed562 Give pacman-optimize a refresher
This patch addresses quite a few lingering issues in the pacman-optimize
script. FS#11767 provoked this look-over and the following issues were
noticed and fixed:

* If an alternate dbroot was specified, then the lockfile location was never
  updated to reflect it. The lockfile location is now set after all dbpath
  initialization.
* The inclusion of a trailing slash on dbroot was problematic and led to the
  following command being executed:
    bsdtar -xpf /tmp/pacman-optimize.p12Q4vAUWY/pacman-db.tar.gz \
	  -C /var/lib/pacman/.new/
  It is doubtful we meant to create a hidden directory like this below our
  database root, only to go and delete it a second later and then
  re-extract. Fix the whole thing by ensuring our dbpath has its trailing
  slash stripped and then appending it when necessary.
* The DB extraction was performed twice for no real apparent reason. This
  opens the door for extraction problems the second time around, leaving you
  with no original database to fall back to. Change the behavior so we only
  extract once, and then perform a directory shuffle once we verify the
  checksums are correct.
* Perform an explicit sync after we drop the new database on the disk. It
  should work better this way.
* Tighten up our check for a pacman lockfile and the time we create one.
  There is still a possible race condition but the window is shorter.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-10-28 22:18:22 -05:00
..
.gitignore Remove gensync and updatesync from normal distribution 2008-02-02 14:12:34 -06:00
Makefile.am Factor shell script size command into configure script 2008-08-19 23:29:56 -05:00
makepkg.sh.in makepkg: fix updating PKGBUILD when building SCM packages 2008-10-28 21:46:40 -05:00
pacman-optimize.sh.in Give pacman-optimize a refresher 2008-10-28 22:18:22 -05:00
rankmirrors.py.in Remove hardcoded DBEXT value from script 2008-01-06 09:44:28 -06:00
repo-add.sh.in repo-add: Use openssl instead of md5sum 2008-10-18 23:59:37 -05:00