forked from pool/obs-service-format_spec_file
Accepting request 73982 from openSUSE:Tools
fix invalid licenses (forwarded request 73966 from coolo) OBS-URL: https://build.opensuse.org/request/show/73982 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-format_spec_file?expand=0&rev=3
This commit is contained in:
commit
2d524ecd22
@ -20,7 +20,13 @@ done
|
||||
|
||||
RETURN=0
|
||||
for i in *.spec; do
|
||||
if [ "$i" == '*.spec' ]; then
|
||||
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"
|
||||
done
|
||||
|
||||
exit $RETURN
|
||||
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 17 07:27:18 UTC 2011 - coolo@novell.com
|
||||
|
||||
- do not replace licenses without knowing them (not sure this
|
||||
is necessary at all)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 31 08:03:34 UTC 2011 - adrian@suse.de
|
||||
|
||||
- do not fail on kiwi packages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 25 15:34:28 UTC 2011 - adrian@suse.de
|
||||
|
||||
- do not generate new spec files when no changes happened
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 25 14:00:35 CEST 2011 - ro@suse.de
|
||||
|
||||
|
@ -30,6 +30,7 @@ Requires: osc-source_validator
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
%description
|
||||
This is a source service for openSUSE Build Service.
|
||||
|
||||
@ -43,16 +44,22 @@ spec file instead of creating a new one.
|
||||
|
||||
%setup -q -D -T 0 -n .
|
||||
|
||||
|
||||
%build
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/obs/service/format_spec_file.files
|
||||
install -m 0755 %{SOURCE0} $RPM_BUILD_ROOT/usr/lib/obs/service
|
||||
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/obs/service
|
||||
install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/obs/service/format_spec_file.files
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/lib/obs
|
||||
/usr/lib/obs/service
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
|
@ -592,7 +592,7 @@ while (@oldspec) {
|
||||
if ($line =~ /^%package/ && $line !~ /\\$/) {
|
||||
$line =~ s/^(%\w+)/lc($1)/e;
|
||||
my ($current_package, $current_lang) = set_current_pkg ( $line );
|
||||
unless ($please_replace{"XXXLICENSE $current_package"}) {
|
||||
unless ($please_replace{"XXXLICENSE $current_package"} || !$replace_hash{"XXXLICENSE $current_package"}) {
|
||||
print $replace_hash{"XXXLICENSE $current_package"}."\n";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user