Accepting request 102657 from openSUSE:Tools

- handle failing prepare_spec when $OUTDIR=$PWD correct

OBS-URL: https://build.opensuse.org/request/show/102657
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-format_spec_file?expand=0&rev=20
This commit is contained in:
Stephan Kulow 2012-02-04 10:22:28 +00:00 committed by Git OBS Bridge
commit 3cfe2195e9
3 changed files with 19 additions and 5 deletions

View 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

View File

@ -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
SUSE-NonFree NonFree licenses

View File

@ -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