Bug 980866

Summary: update-scripts leave ton of leftovers
Product: [openSUSE] openSUSE Tumbleweed Reporter: Tomáš Chvátal <tchvatal>
Component: libzyppAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1022138    

Description Tomáš Chvátal 2016-05-20 10:13:56 UTC
While we now have leftover mechanism to run scripts on posttrans of packages just once instead of for all invocations we keep the scripts that were not executed in /var/adm/update-scripts/

Most visible it is on update scripts for font scriptlets. One of the leftovers:

dreamcrawler:/var/adm/update-scripts # cat ghostscript-fonts-9.06-7.4-reconfigure-fonts
if [ -e /var/run/fontpackages/reconfigure-fonts ]; then
  if [ -x /usr/sbin/fonts-config ]; then
    /usr/sbin/fonts-config --quiet
  fi
  rm /var/run/fontpackages/reconfigure-fonts
fi
rm /var/adm/update-scripts/ghostscript-fonts-9.06-7.4-reconfigure-fonts

I suppose proper solution would be to run just one of the scripts, but then delete them all and not keep any?
Comment 1 Michael Andres 2016-05-20 10:23:47 UTC
> $ rpm -qf /var/adm/update-scripts/*
> fetchmsttfonts-11.4-17.3.1.noarch
> file /var/adm/update-scripts/ghostscript-fonts-9.06-6.1.5-reconfigure-fonts is not owned by any package

Packages are supposed to own their scripts, so they vanish together with the package.

-> bugowner of Printing/ghostscript-fonts :  jsmeix
Comment 2 Johannes Meixner 2020-05-15 13:30:04 UTC
No idea what to do different in ghostscript-fonts.spec
------------------------------------------------------------------
# osc cat Printing ghostscript-fonts ghostscript-fonts.spec \
 | grep '%reconfigure_fonts'

%reconfigure_fonts_post
%reconfigure_fonts_postun
%reconfigure_fonts_posttrans
%reconfigure_fonts_post
%reconfigure_fonts_postun
%reconfigure_fonts_posttrans
------------------------------------------------------------------