Bug 1067213 - ghostscript-fonts: /var/adm/update-scripts scriplets not named correctly
ghostscript-fonts: /var/adm/update-scripts scriplets not named correctly
Status: RESOLVED DUPLICATE of bug 1074964
: 1076986 (view as bug list)
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
Other Other
: P2 - High : Normal (vote)
: ---
Assigned To: Johannes Meixner
E-mail List
Depends on:
  Show dependency treegraph
Reported: 2017-11-08 15:40 UTC by Richard Brown
Modified: 2019-11-28 14:30 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Richard Brown 2017-11-08 15:40:00 UTC
+++ This bug was initially created as a clone of Bug #1066187 +++

On Tumbleweed & SLES15 Beta1 default installations, the following scriplets in /var/adm/update-scripts are not run


According to the scripts they should delete themself if they did run, but since they do still exist, it looks like they were never executed.
Comment 1 Richard Brown 2017-11-08 16:12:56 UTC
Resolved by https://build.opensuse.org/request/show/539912 (otw to Factory, I assume it will be picked up by SLE-15 also)
Comment 2 Richard Brown 2017-11-09 17:19:02 UTC
Turns out our initial evaluation of the problem was wrong

The situation is as follows

the fontpackages macros generate scriptlets matching the name /var/adm/update-scripts/$PACKAGENAME

Where $PACKAGENAME is the "name:" defined in the packages .spec file

libzypp only runs scriptlets that match the name /var/adm/update-scripts/$ACTUALPACKAGENAME

Wheree $ACTUALPACKAGENAME is the actual name used by the user to install the package

This bug was caused therefore by the recent rename & split of google-noto-fonts to noto-sans-fonts & noto-emoji-fonts, etc etc and the similar rename/split of ghostscript-fonts to ghostscript-fonts-std and -other

The noto- package maintainers have already fixed their subpackages by calling

> %reconfigure_fonts_scriptlets -n noto-sans-fonts

and such for each of the split packages in their spec file. They just need to send the fixes to Factory.

However, ghostscript is still broken because it is running the %reconfigure_fonts* macros with the package name 'ghostscript-fonts' and not running the macros once each for the split font package names

Johannes, please fix ghostscript accordingly so the %reconfigure_fonts* macros are run for the new -std and -other names and not the (broken) ghostscript-fonts name

Takashi and I are reverting the fontpackages change that disabled the generation of the /var/adm/update-scripts scriptlets
Comment 3 Johannes Meixner 2017-11-27 15:07:30 UTC
Richard Brown,
in ghostscript-fonts.spec the %reconfigure_fonts* macros are run
only for its -std and -other subpackage names:

$ osc cat Printing ghostscript-fonts ghostscript-fonts.spec | grep -E '%post|%reconfigure_fonts'

%post std

%postun std

%posttrans std

%post other

%postun other

%posttrans other

Or do you want that to be changed that each %reconfigure_fonts_* macro
is called with an explicitly added '-n <subpackage_name>' option like:

%post std
%reconfigure_fonts_post -n std

%postun std
%reconfigure_fonts_postun -n std

%posttrans std
%reconfigure_fonts_posttrans -n std

%post other
%reconfigure_fonts_post -n other

%postun other
%reconfigure_fonts_postun -n other

%posttrans other
%reconfigure_fonts_posttrans -n other

If yes, since what openSUSE version is the '-n <subpackage_name>'
option supported for the %reconfigure_fonts_* macros?

If the %reconfigure_fonts_* macros support '-n <subpackage_name>'
since openSUSE > 12.2 everything is o.k.
If not I would need additional '%if 0%{?suse_version}' cases.
Comment 4 Richard Brown 2017-11-27 15:50:40 UTC
-n should be supported in all supported openSUSE versions (openSUSE 12.2 is not a supported version)
Comment 5 Swamp Workflow Management 2017-12-18 14:00:06 UTC
This is an autogenerated message for OBS integration:
This bug (1067213) was mentioned in
https://build.opensuse.org/request/show/558096 Factory / ghostscript-fonts
Comment 6 Johannes Meixner 2017-12-19 10:49:20 UTC
Hopefully fixed via
Comment 7 Bernhard Wiedemann 2018-01-01 19:57:00 UTC
during dup on Tumbleweed I got

Output of ghostscript-fonts-std-9.06-9.1.noarch.rpm %posttrans script:
    /var/adm/update-scripts/posttransFVzq9s/ghostscript-fonts-std-9.06-9.1.noarch.rpmrZu6PR: line 23: -n: command not found
Output of ghostscript-fonts-other-9.06-9.1.noarch.rpm %posttrans script:
    /var/adm/update-scripts/posttransFVzq9s/ghostscript-fonts-other-9.06-9.1.noarch.rpmzWnfGG: line 23: -n: command not found

and indeed the %reconfigure_fonts_posttrans macro seems to not support any args

rpm -q --scripts ghostscript-fonts-other
shows that it expanded to
    rm /run/fontpackages/reconfigure-fonts-cjk 
   -n ghostscript-fonts-other
exit 0
Comment 8 Dominique Leuenberger 2018-01-09 11:15:14 UTC
(In reply to Richard Brown from comment #4)
> -n should be supported in all supported openSUSE versions (openSUSE 12.2 is
> not a supported version)

This was the mis-information on this bug - -n is ONLY known to %reconfigure_fonts_scriptlets, but not to the other %reconfigure_fonts_* macros
Comment 9 Michael Andres 2018-03-07 10:01:12 UTC
*** Bug 1076986 has been marked as a duplicate of this bug. ***