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

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



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.

-- 
David C. Rankin, J.D.,P.E.


[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