Hello community, here is the log from the commit of package fetchmsttfonts for openSUSE:Factory checked in at 2020-12-12 20:32:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fetchmsttfonts (Old) and /work/SRC/openSUSE:Factory/.fetchmsttfonts.new.2328 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fetchmsttfonts" Sat Dec 12 20:32:18 2020 rev:17 rq:855359 version:12.0 Changes: -------- --- /work/SRC/openSUSE:Factory/fetchmsttfonts/fetchmsttfonts.changes 2020-12-05 20:51:21.407564873 +0100 +++ /work/SRC/openSUSE:Factory/.fetchmsttfonts.new.2328/fetchmsttfonts.changes 2020-12-12 20:36:12.458092637 +0100 @@ -1,0 +2,9 @@ +Sat Dec 12 10:53:12 UTC 2020 - Stefan Seyfried <seife+...@b1-systems.com> + +- if the fonts are already present, just skip the download. These + fonts are not going to change, besides we ar checking for a + specific version (shasum) anyway +- bump version by one to indicate this change of behaviour +- get rid of awk dependency + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fetchmsttfonts.spec ++++++ --- /var/tmp/diff_new_pack.78ipn1/_old 2020-12-12 20:36:13.082093287 +0100 +++ /var/tmp/diff_new_pack.78ipn1/_new 2020-12-12 20:36:13.086093292 +0100 @@ -2,6 +2,7 @@ # spec file for package fetchmsttfonts # # Copyright (c) 2020 SUSE LLC +# Copyright (c) 2020 B1 Systems GmbH # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +18,7 @@ Name: fetchmsttfonts -Version: 11.4 +Version: 12.0 Release: 0 Summary: Helper package to download Microsoft Core fonts for the Web License: GPL-2.0-or-later @@ -29,7 +30,6 @@ #these stop the patch from pulling in the package #Provides: pullin-msttf-fonts = 11.1 #Obsoletes: pullin-msttf-fonts <= 11.1 -Requires: awk Requires: cabextract Requires: coreutils Requires: curl ++++++ fetchmsttfonts.sh.in ++++++ --- /var/tmp/diff_new_pack.78ipn1/_old 2020-12-12 20:36:13.158093367 +0100 +++ /var/tmp/diff_new_pack.78ipn1/_new 2020-12-12 20:36:13.158093367 +0100 @@ -18,13 +18,20 @@ https://sourceforge.net/projects/corefonts/files/the%20fonts/final/webdin32.exe \ " +# same order like FONTS... +FILES="andalemo.ttf arial.ttf arialbi.ttf comic.ttf cour.ttf georgia.ttf impact.ttf times.ttf trebuc.ttf verdana.ttf webdings.ttf" + CURL_OPTIONS="-L -s --speed-limit 3500 --speed-time 15" echo "EULA:" -echo -n " Fetching ... " -curl $CURL_OPTIONS -o /usr/share/doc/corefonts/EULA.html $EULA || \ - rm -f /usr/share/doc/corefonts/EULA.html -echo "done" +if [ -e /usr/share/doc/corefonts/EULA.html ]; then + echo "already present" +else + echo -n " Fetching ... " + curl $CURL_OPTIONS -o /usr/share/doc/corefonts/EULA.html $EULA || \ + rm -f /usr/share/doc/corefonts/EULA.html + echo "done" +fi tmpname=$(basename "$0") tmpdir=$(mktemp -d "/tmp/$tmpname.XXXXXX") @@ -36,9 +43,18 @@ cd "$tmpdir" +all_skipped=true for archive in $FONTS; do - file=$(echo "$archive" | awk -F "/" '{print $NF}') + # POSIX sh does not know arrays, so just pop the first element from FILES 'list' + font=${FILES%% *} + FILES=${FILES#* } + file=${archive##*/} echo "$file ($archive):" + if [ -e "/usr/share/fonts/truetype/$font" ]; then + echo "font already installed, skipping..." + continue + fi + all_skipped=false echo -n " Fetching ... " if ! curl $CURL_OPTIONS -o "$file" "$archive"; then @@ -67,6 +83,13 @@ rm -f "$file" done +if $all_skipped; then + echo "*** No update necessary. ***" + # do not annoy with an interactive update message, just exit + # also skip EULA display + exit +fi + if [ "x$success" != "x" ]; then for i in ./*.[Tt][Tt][CFcf]; do lower=$(echo "$i" | tr "[:upper:]" "[:lower:]") _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org