Re: Howto - tell pacman -S (-U) to overwrite existing file in filesystem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20.02.2011 22:32, David C. Rankin wrote:
>
> Guys,
>
> This is a curiosity really. I updated kdebase to create a
trinity.desktop file
> in /etc/X11/sessions in the PKGBUILD package() function:
>
> # install desktop and update kdmrc and Xsession
> [[ -f trinity.desktop ]] && {
> mkdir -p ${pkgdir}/etc/X11/sessions
> cp trinity.desktop ${pkgdir}/etc/X11/sessions
> }
> <snip>
>
> Since I had already created trinity.desktop on my box (before it was
part of
> the package), I get (correctly):
>
> Targets (1): trinity-kdebase-1221588-1
>
> Total Download Size: 0.00 MB
> Total Installed Size: 86.71 MB
>
> Proceed with installation? [Y/n]
> checking package integrity...
> checking for file conflicts...
> trinity-kdebase: /etc/X11/sessions/trinity.desktop exists in filesystem
>
> IIRC this is exactly the way pacman is supposed to work because it has no
> knowledge of a prior trinity.desktop in the filesystem and won't
overwrite it.
> The short answer is "dummy -- remove the file or use --force."
>
> I get that. The question is "Can I do something in the PKGBUILD to tell
pacman
> - if the file is already there -> overwrite it?" The purpose for the
question is
> make sure nobody else gets a conflict if they have followed a prior manual
> Trinity kdm install proceedure.
>
pacman -S (-U) -f

from man pacman:
       -f, --force
           Bypass file conflict checks and overwrite conflicting
files. If the package that is about to be installed
           contains files that are already installed, this option will
cause all those files to be overwritten. This
           option should be used with care, ideally not at all.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1hiUsACgkQcFyEi9ZCdkA8GQCdGKg5WUbP+0kiP4a4IgvGXj2A
tvgAmgJHNi1JMfk77ohI3yi/y3U6Uqu7
=uCVp
-----END PGP SIGNATURE-----



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux