diff --git a/format_spec_file b/format_spec_file index 1554799..365065b 100644 --- a/format_spec_file +++ b/format_spec_file @@ -31,9 +31,18 @@ for i in $MYSPECFILES; do echo "WARNING: no spec file found" exit 0 fi - /usr/lib/obs/service/format_spec_file.files/prepare_spec "$i" > "$MYOUTDIR/$i" || RETURN=1 - # remove all file files which are indendical to committed files - cmp -s "$i" "$MYOUTDIR/$i" && rm "$MYOUTDIR/$i" + if /usr/lib/obs/service/format_spec_file.files/prepare_spec "$i" > "$MYOUTDIR/$i.$$"; then + # remove all file files which are indendical to committed files + # be carefull for the case that $MYOUDIR is local dir + if cmp -s "$i" "$MYOUTDIR/$i.$$"; then + rm "$MYOUTDIR/$i.$$" + else + mv "$MYOUTDIR/$i.$$" "$MYOUTDIR/$i" + fi + else + rm "$MYOUTDIR/$i.$$" + RETURN=1 + fi done exit $RETURN diff --git a/licenses_changes.txt b/licenses_changes.txt index 7700dae..aaf8a26 100644 --- a/licenses_changes.txt +++ b/licenses_changes.txt @@ -199,7 +199,7 @@ GPL-2.0-with-font-exception GPL-2.0-with-font-exception GPL-2.0-with-GCC-exception GPL-2.0-with-GCC-exception SUSE-GPL-2.0-with-FLOSS-exception SUSE-GPL-2.0-with-FLOSS-exception SUSE-GPL-2.0+-with-openssl-exception GPLv2+ with openssl linking exception -SUSE-GPL-3.0+-with-openssl-exception GPLv2+ with openssl linking exception +SUSE-GPL-3.0+-with-openssl-exception GPLv3+ with openssl linking exception GPL-2.0+ GPL-2.0+ GPL-2.0+ GPL-2+ GPL-3.0 GPL-3 @@ -371,4 +371,4 @@ ZPL-2.1 ZPL-2.1 SUSE-Firmware Firmware license, redistributable unmodified SUSE-Permissive Must not be copyleft. Must not contain patent clauses of any nature. Most not limit ability to copy, modifiy, distribute (through multiple tiers of distribution) and distribute modified versions. Must not impose obligations such as 'advertising clauses' or anything that could be viewed as an 'additional restriction' under GPL-2.0+ or GPL-3.0+. Must not impose obligations such as modification by patch only, or reciprocal clauses. Artistic-1.0 or GPL-1.0+ Perl License -SUSE-NonFree NonFree licenses \ No newline at end of file +SUSE-NonFree NonFree licenses diff --git a/obs-service-format_spec_file.changes b/obs-service-format_spec_file.changes index a47f3cc..50712d8 100644 --- a/obs-service-format_spec_file.changes +++ b/obs-service-format_spec_file.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Feb 4 09:35:13 UTC 2012 - adrian@suse.de + +- handle failing prepare_spec when $OUTDIR=$PWD correct + ------------------------------------------------------------------- Fri Feb 3 09:23:51 UTC 2012 - coolo@suse.com