Commit 45f7bd7a authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-repack: add workaround for empty Summary

parent 558bb21c
...@@ -91,6 +91,7 @@ __fix_spec() ...@@ -91,6 +91,7 @@ __fix_spec()
{ {
local buildroot="$1" local buildroot="$1"
local spec="$2" local spec="$2"
local pkgname="$3"
local i local i
# drop forbidded paths # drop forbidded paths
...@@ -111,8 +112,11 @@ __fix_spec() ...@@ -111,8 +112,11 @@ __fix_spec()
# subst 's|^\("'$i'"\)$|\1|' $spec # subst 's|^\("'$i'"\)$|\1|' $spec
fi fi
done done
# FIXME: where is a source of the bug with empty Summary?
subst "s|Summary: *$|Summary: $pkgname (was empty Summary after alien)|" $spec
subst "s|^Release: |Release: alt1.repacked.with.epm.|" $spec subst "s|^Release: |Release: alt1.repacked.with.epm.|" $spec
subst "s|^\((Converted from a rpm package.*\)|(Repacked from binary rpm with epm $EPMVERSION)\n\1|" $spec subst "s|^\((Converted from a\) \(.*\) \(package.*\)|(Repacked from binary \2 package with epm $EPMVERSION)\n\1 \2 \3|" $spec
#" hack for highlight #" hack for highlight
} }
...@@ -181,8 +185,8 @@ __epm_repack_rpm() ...@@ -181,8 +185,8 @@ __epm_repack_rpm()
[ -s "$spec" ] || fatal "can't find spec" [ -s "$spec" ] || fatal "can't find spec"
mv $spec $tmpbuilddir || fatal mv $spec $tmpbuilddir || fatal
spec="$tmpbuilddir/$(basename "$spec")" spec="$tmpbuilddir/$(basename "$spec")"
__fix_spec $tmpbuilddir/$subdir $spec
local pkgname="$(grep "^Name: " $spec | sed -e "s|Name: ||g" | head -n1)" local pkgname="$(grep "^Name: " $spec | sed -e "s|Name: ||g" | head -n1)"
__fix_spec $tmpbuilddir/$subdir $spec $pkgname
__apply_fix_code $pkgname $tmpbuilddir/$subdir $spec __apply_fix_code $pkgname $tmpbuilddir/$subdir $spec
# TODO: we need these dirs to be created # TODO: we need these dirs to be created
to_remove_pkg_dirs="$to_remove_pkg_dirs $HOME/RPM/BUILD $HOME/RPM" to_remove_pkg_dirs="$to_remove_pkg_dirs $HOME/RPM/BUILD $HOME/RPM"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment