Commit 430a5ab6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-repack: skip system dir packing

parent c0c7b0a6
......@@ -96,13 +96,20 @@ __fix_spec()
# drop forbidded paths
# https://bugzilla.altlinux.org/show_bug.cgi?id=38842
for i in / /etc /etc/init.d /etc/systemd /bin /opt /usr /usr/bin /usr/share /usr/share/doc /var /var/log /var/run; do
for i in / /etc /etc/init.d /etc/systemd /bin /opt /usr /usr/bin /usr/share /usr/share/doc /var /var/log /var/run \
/etc/cron.daily /usr/share/man /usr/share/man/man1 /usr/share/appdata /usr/share/applications /usr/share/menu ; do
sed -i -e "s|^%dir \"$i/*\"$||" \
-e "s|^\"$i/*\"$||" \
-e "s|^$i/*$||" \
$spec
done
# drop %dir for existed system dirs
for i in $(grep '^%dir "' $spec | sed -e 's|^%dir *"\(.*\)".*|\1|' ) ; do #"
echo "$i" | grep -q '^/opt/' && continue
[ -d "$i" ] && echo "drop dir $i from packing, it exists in the system"
done
# replace dir "/path/dir" -> %dir /path/dir
for i in $(grep '^"/' $spec | sed -e 's|^"\(/.*\)"$|\1|') ; do #" hack for highlight
# add dir as %dir in the filelist
......
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