[arch-general] Howto - tell pacman -S (-U) to overwrite existing file in filesystem?
Ng Oon-Ee
ngoonee at gmail.com
Mon Feb 21 17:38:56 EST 2011
On Mon, 2011-02-21 at 21:45 +0100, Sebastian Rust wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 21.02.2011 00:28, David C. Rankin wrote:
> >>> The question is "Can I do something in the PKGBUILD to tell pacman
> >>> - if the file is already there -> overwrite it?"
> Ah ok, now I understand your problem. What you could do, is putting
> the check into the PKGBUILD itself, as an bash command which is
> performed when you call it, like rm /etc/X11/sessions/trinity.desktop
> (in your case good), rm -rf * (bad), rm -rf / (fun :))
> As you can see, this is potentially dangerous and this is why you
> always should check your PKGBUILDs before. But in a nutshell, a
> PKGBUILD is little more than a shellscript and you can do basically
> everything you can perform with a shell.
That wouldn't work with installing binaries though, since the check is
done before the PKGBUILD is ever sourced.
More information about the arch-general
mailing list