[arch-dev-public] Best way to force file overwrites in a package?
I'm putting together a kmenu icon set to replace the default icons. Upon installation I want it to backup the existing icons and copy the new ones. I tried doing this with an install file, but I still get a "conflicting files" error when I try to install the package. Ideally, I'd like this to work without forcing the user to pacman -f the package. Is this possible? I've included the install file below... is there a cleaner way of performing this task? Should I even bother with backing up the old stuff? A post_remove message could instruct the user to reinstall the 'kdelibs' package instead. pre_install() { #backup existing kmenu icons mv /opt/kde/share/icons/crystalsvg/16x16/apps/kmenu.png \ /opt/kde/share/icons/crystalsvg/16x16/apps/kmenu.png.backup mv /opt/kde/share/icons/crystalsvg/22x22/apps/kmenu.png \ /opt/kde/share/icons/crystalsvg/22x22/apps/kmenu.png.backup mv /opt/kde/share/icons/crystalsvg/32x32/apps/kmenu.png \ /opt/kde/share/icons/crystalsvg/32x32/apps/kmenu.png.backup mv /opt/kde/share/icons/crystalsvg/48x48/apps/kmenu.png \ /opt/kde/share/icons/crystalsvg/48x48/apps/kmenu.png.backup mv /opt/kde/share/icons/crystalsvg/64x64/apps/kmenu.png \ /opt/kde/share/icons/crystalsvg/64x64/apps/kmenu.png.backup mv /opt/kde/share/icons/crystalsvg/128x128/apps/kmenu.png \ /opt/kde/share/icons/crystalsvg/128x128/apps/kmenu.png.backup mv /opt/kde/share/icons/crystalsvg/scalable/apps/kmenu.svgz \ /opt/kde/share/icons/crystalsvg/scalable/apps/kmenu.svgz.backup } post_install() { echo "==> Archlinux KDE theme files can be enabled via kcontrol" } # restore original kmenu icons mv /opt/kde/share/icons/crystalsvg/16x16/apps/kmenu.png.backup \ /opt/kde/share/icons/crystalsvg/16x16/apps/kmenu.png mv /opt/kde/share/icons/crystalsvg/22x22/apps/kmenu.png.backup \ /opt/kde/share/icons/crystalsvg/22x22/apps/kmenu.png mv /opt/kde/share/icons/crystalsvg/32x32/apps/kmenu.png.backup \ /opt/kde/share/icons/crystalsvg/32x32/apps/kmenu.png mv /opt/kde/share/icons/crystalsvg/48x48/apps/kmenu.png.backup \ /opt/kde/share/icons/crystalsvg/48x48/apps/kmenu.png mv /opt/kde/share/icons/crystalsvg/64x64/apps/kmenu.png.backup \ /opt/kde/share/icons/crystalsvg/64x64/apps/kmenu.png mv /opt/kde/share/icons/crystalsvg/128x128/apps/kmenu.png.backup \ /opt/kde/share/icons/crystalsvg/128x128/apps/kmenu.png mv /opt/kde/share/icons/crystalsvg/scalable/apps/kmenu.svgz.backup \ /opt/kde/share/icons/crystalsvg/scalable/apps/kmenu.svgz }
Am Dienstag 03 Juni 2008 00:43:53 schrieb Thayer Williams:
Is this possible?
I think so. Just build a new icon-set like crystalsvg-arch which symlinks to the original theme excpet for the icons you want to replace. (Or maybe just provide the different icons and KDE will fallback automatically. But I am not sure about this) -- archlinux.de
On Mon, Jun 2, 2008 at 4:03 PM, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Dienstag 03 Juni 2008 00:43:53 schrieb Thayer Williams:
Is this possible?
I think so. Just build a new icon-set like crystalsvg-arch which symlinks to the original theme excpet for the icons you want to replace. (Or maybe just provide the different icons and KDE will fallback automatically. But I am not sure about this)
I considered building a separate iconset, but the user would still have to enable it after installing the package. Since it only replaces the kmenu.png icon I thought a complete theme (or theme name) would be overkill. Dang it. I guess there's no other way...
On Mon, Jun 2, 2008 at 8:48 PM, Thayer Williams <thayer@archlinux.org> wrote:
On Mon, Jun 2, 2008 at 4:03 PM, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Dienstag 03 Juni 2008 00:43:53 schrieb Thayer Williams:
Is this possible?
I think so. Just build a new icon-set like crystalsvg-arch which symlinks to the original theme excpet for the icons you want to replace. (Or maybe just provide the different icons and KDE will fallback automatically. But I am not sure about this)
I considered building a separate iconset, but the user would still have to enable it after installing the package. Since it only replaces the kmenu.png icon I thought a complete theme (or theme name) would be overkill.
Dang it. I guess there's no other way...
Yeah, it's really a bad idea to have one package start modifying the files belonging to another package.
On Tue, Jun 3, 2008 at 4:31 AM, Travis Willard <travis@archlinux.org> wrote:
On Mon, Jun 2, 2008 at 8:48 PM, Thayer Williams <thayer@archlinux.org> wrote:
On Mon, Jun 2, 2008 at 4:03 PM, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Dienstag 03 Juni 2008 00:43:53 schrieb Thayer Williams:
Is this possible?
I think so. Just build a new icon-set like crystalsvg-arch which symlinks to the original theme excpet for the icons you want to replace. (Or maybe just provide the different icons and KDE will fallback automatically. But I am not sure about this)
I considered building a separate iconset, but the user would still have to enable it after installing the package. Since it only replaces the kmenu.png icon I thought a complete theme (or theme name) would be overkill.
Dang it. I guess there's no other way...
Yeah, it's really a bad idea to have one package start modifying the files belonging to another package.
True that. It just seemed overkill to replace for 5 icons. Oh well, I don't use KDE anyway =P
participants (3)
-
Pierre Schmitz
-
Thayer Williams
-
Travis Willard