Rex Dieter wrote:
Callum Lerwick wrote:
On Wed, 2006-12-20 at 07:43 -0600, Rex Dieter wrote:
Because, frankly, poo-pooing the current proposal/guidelines in favor of some handy-wavy theoretical lacking-actual-implementation solution, is no solution.
Well, the point is, the current proposal does not address the "multiple packages needlessly updating caches multiple times" problem at all.
Fair enough, I'll investigate hooking into rpm's %posttrans hooks. My findings so far are promising.
I formally withdraw the iconcache proposal as-is, pending investigation of the previously unaddressed "needlessly updating cache multiple times" issue.
-- Rex
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
Rex Dieter (rdieter@math.unl.edu) said:
%posttrans runs on installs (good), but not on uninstall (bad). Any ideas? Am I misunderstanding it, or is this possibly an rpm bug?
Without actually looking, is there %postuntrans or %posttransun?
Bill, shuddering at the concept of %triggerpostuntrans
Bill Nottingham (notting@redhat.com) said:
Rex Dieter (rdieter@math.unl.edu) said:
%posttrans runs on installs (good), but not on uninstall (bad). Any ideas? Am I misunderstanding it, or is this possibly an rpm bug?
Without actually looking, is there %postuntrans or %posttransun?
And the answer is 'no', thank goodness.
Bill
Bill Nottingham wrote:
Rex Dieter (rdieter@math.unl.edu) said:
%posttrans runs on installs (good), but not on uninstall (bad). Any ideas? Am I misunderstanding it, or is this possibly an rpm bug?
Without actually looking, is there %postuntrans or %posttransun?
Yes, it apparently exists (postuntrans, preuntrans), but they (too) don't seem to work for single package erasure.
I think it's (mostly) ok: 1. That'll like be a corner case that doesn't happen too often in practice. 2. I consider it an rpm bug, which we should be able to drive to get fixed, right? (:
-- Rex
On Wed, 2006-12-20 at 11:48 -0600, Rex Dieter wrote:
Bill Nottingham wrote:
Rex Dieter (rdieter@math.unl.edu) said:
%posttrans runs on installs (good), but not on uninstall (bad). Any ideas? Am I misunderstanding it, or is this possibly an rpm bug?
Without actually looking, is there %postuntrans or %posttransun?
Yes, it apparently exists (postuntrans, preuntrans), but they (too) don't seem to work for single package erasure.
I think it's (mostly) ok:
- That'll like be a corner case that doesn't happen too often in practice.
- I consider it an rpm bug, which we should be able to drive to get
fixed, right? (:
There's quite a bit of related discussion at http://thread.gmane.org/gmane.linux.redhat.rpm.devel/547/
Ville Skyttä wrote:
There's quite a bit of related discussion at http://thread.gmane.org/gmane.linux.redhat.rpm.devel/547/
Thanks Ville, that confirms my suspicions: %posttrans can't be relied upon as any sole solution to the iconcache issue.
-- Rex
packaging@lists.fedoraproject.org