Re: %posttrans scriptlet

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

 



Rex Dieter wrote:

I formally withdraw the iconcache proposal as-is, pending investigation of the previously unaddressed "needlessly updating cache multiple times" issue.

OK, %posttrans doesn't seem to work as I expect it to (on fc6).

(specfile attached)

%posttrans runs on installs (good), but not on uninstall (bad). Any ideas? Am I misunderstanding it, or is this possibly an rpm bug?

$ rpm -q rpm
rpm-4.4.2-32

$ rpm -U posttrans-test-1.0-1.noarch.rpm
%pretrans:
%pre:
%post: touch
%posttrans: gtk-update-icon-cacheCache file created successfully.

$ rpm -e posttrans-test
%preun:
%postun: touch

-- Rex
# $Id: kde.spec,v 1.36 2006/04/09 20:12:40 rexdieter Exp $

Summary: posttrans-test 
Name:    posttrans-test 
Version: 1.0 
Release: 1

License: GPL	
Group:   User Interface/Desktops
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
#speed build options
%define debug_package   %{nil}
%define __spec_install_post  %{nil}
AutoReq: no

%description
For testing rpm's scriptlet abilities


%prep
#setup -c -T -n %{name}-%{version}

%build


%install
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)


%clean
rm -rf $RPM_BUILD_ROOT


%pre
echo -n "%%pre: " ||:
echo ||:

%preun
echo -n "%%preun: " ||:
echo ||:

%post
echo -n "%%post: " ||:
echo -n "touch" ||:
touch --no-create %{_datadir}/icons/hicolor ||:
echo ||:

%postun
echo -n "%%postun: "
if [ $1 -eq 0 ]; then
echo -n "touch"
touch --no-create %{_datadir}/icons/hicolor ||:
fi
echo ||:

%pretrans
echo -n "%%pretrans: " ||:
echo ||:

%posttrans 
echo -n "%%posttrans: " ||:
echo -n "gtk-update-icon-cache" ||:
gtk-update-icon-cache %{_datadir}/icons/hicolor ||:
echo ||:


%changelog
* Wed Dec 20 2006 Rex Dieter 1.0-1
- foo
--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux