Commit d3778a69 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-repack: implement initial stoplist support for deb packages we don't want convert

parent c2cfe779
...@@ -127,6 +127,19 @@ __fix_spec() ...@@ -127,6 +127,19 @@ __fix_spec()
#" hack for highlight #" hack for highlight
} }
# TODO: move this list from external file
__check_stoplist()
{
cat <<EOF | grep -q "^$1$"
kesl
kesl-astra
klnagent
klnagent64
klnagent64-astra
EOF
}
__apply_fix_code() __apply_fix_code()
{ {
local repackcode="$CONFIGDIR/repack.d/$1.sh" local repackcode="$CONFIGDIR/repack.d/$1.sh"
...@@ -180,6 +193,10 @@ __epm_repack_rpm() ...@@ -180,6 +193,10 @@ __epm_repack_rpm()
# alien failed with spaced names # alien failed with spaced names
# alpkg=$abspkg # alpkg=$abspkg
alpkg=$(basename $pkg) alpkg=$(basename $pkg)
# TODO: use func for get name from deb pkg
# TODO: epm print name from deb package
# TODO: use stoplist only for deb?
[ -z "$force" ] && __check_stoplist $(echo $alpkg | sed -e "s|_.*||") && fatal "Please use official rpm package instead of $alpkg (It is not recommended to use --force to skip this checking."
# don't use abs package path: copy package to temp dir and use there # don't use abs package path: copy package to temp dir and use there
cp -v $pkg $tmpbuilddir/../$alpkg cp -v $pkg $tmpbuilddir/../$alpkg
cd $tmpbuilddir || fatal cd $tmpbuilddir || fatal
......
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