Bug 1284645
Summary: | rpm %transfiletriggerpostun is not called | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 24 | CC: | jorton, j, jzeleny, klember, novyjindrich, packaging-team-maint, pknirsch, pmatilai, rdieter, vondruch |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rpm-4.13.0-3.fc26 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-20 08:29:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1288081, 1343357 |
Description
Zbigniew Jędrzejewski-Szmek
2015-11-23 18:12:28 UTC
There is a different problem. %(trans)filetriggerpostun should be called only for packages that fire a trigger. It shouldn't be called for a package containing that trigger because the trigger is executed after the package is uninstalled so the trigger is also uninstalled and probably commands called in the trigger are uninstalled as well. I need to look deeper into this. My report wasn't very clear: I was talking about installing/uninstalling/upgrading package transfiletriggers-a.rpm while the triggers were in package transfiletriggers.rpm. Whether %(trans)filetriggerpostun will be called after transfiletriggers.rpm itself is uninstalled is an orthogonal issue. I facing the same issues. I wanted to propose following patch for vim: From c8e3818f88c5bdb3bb6055b0cc1f38e74657db66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch> Date: Tue, 1 Dec 2015 15:51:39 +0100 Subject: [PATCH] Add RPM file triggers support. --- vim.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vim.spec b/vim.spec index 98175e9..6c4183b 100644 --- a/vim.spec +++ b/vim.spec @@ -542,6 +542,14 @@ if [ -x /%{_bindir}/gtk-update-icon-cache ]; then fi update-desktop-database &> /dev/null ||: +# Refresh documentation helptags +%transfiletriggerin common -- %{_datadir}/%{name}/vimfiles/doc +vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null + +%transfiletriggerpostun common -- %{_datadir}/%{name}/vimfiles/doc +> %{_datadir}/%{name}/vimfiles/doc/tags +vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null + %clean rm -rf %{buildroot} @@ -756,6 +764,9 @@ rm -rf %{buildroot} %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue Dec 01 2015 Vít Ondruch <vondruch> 7.4.945-1 +- Add RPM file triggers support. + * Tue Dec 01 2015 Karsten Hopp <karsten> 7.4.945-1 - patchlevel 945 -- 2.6.3 Later trying with vim-commentary modified as follows: diff --git a/vim-commentary.spec b/vim-commentary.spec index dff1e65..a420639 100644 --- a/vim-commentary.spec +++ b/vim-commentary.spec @@ -48,12 +48,12 @@ install -m 644 %{SOURCE1} %{buildroot}%{appdata_dir} # Check the AppData add-on to comply with guidelines. appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.metainfo.xml -%post -vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null - -%postun -> %{vimfiles}/doc/tags -vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null +#%post +#vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null +# +#%postun +#> %{vimfiles}/doc/tags +#vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null %files %doc CONTRIBUTING.markdown README.markdown No matter what I do, the "%{vimfiles}/doc/tags" is never updated during uninstallation of vim-commentary. Just for the sake of completeness, this is what RPM says about the triggers:
$ rpm -q -p --filetriggers ./vim-common-7.4.945-1.fc24.x86_64.rpm
transfiletriggerin scriptlet (using /bin/sh) -- /usr/share/vim/vimfiles/doc
vim -c ":helptags /usr/share/vim/vimfiles/doc" -c :q &> /dev/null
transfiletriggerpostun scriptlet (using /bin/sh) -- /usr/share/vim/vimfiles/doc
> /usr/share/vim/vimfiles/doc/tags
vim -c ":helptags /usr/share/vim/vimfiles/doc" -c :q &> /dev/null
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase It's an upstream bug, fixed now: https://github.com/rpm-software-management/rpm/commit/f6521c50f6836374a0f7995f8f393aaf36e178ea I'll push updates for this later, right now we need to get the 4.13.0 update through to people. Fixed in rawhide as of rpm-4.13.0-3.fc26, stable version to be done later. Thx, it works for the case above. Going to implement the triggers for vim (bug 1343357) right away ;) |