https://bugzilla.redhat.com/show_bug.cgi?id=1893327
--- Comment #10 from code@luigifab.fr code@luigifab.fr --- Hi, I work on the next release and I need to do a strange thing during installation.
One of the installed file must be modified depending on Pango package version. For pango >= 1.44, I need to replace bottom="3" by bottom="4".
I did that:
%post currentver=`rpm -q --queryformat="%{RPMTAG_VERSION}" pango` requiredver=1.44 if [ "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ]; then sed -i 's/<border name="title_border" left="2" right="2" top="4" bottom="3"/<border name="title_border" left="2" right="2" top="4" bottom="4"/g' %{_datadir}/themes/human-theme/metacity-1/metacity-theme-1.xml else sed -i 's/<border name="title_border" left="2" right="2" top="4" bottom="4"/<border name="title_border" left="2" right="2" top="4" bottom="3"/g' %{_datadir}/themes/human-theme/metacity-1/metacity-theme-1.xml fi
rpmlint says:
human-theme-gtk.noarch: W: percent-in-%post human-theme-gtk.noarch: W: dangerous-command-in-%post rpm
It is good? Thanks