shutils/metadata: fix creation of scripts due to false positive.
--HG-- extra : convert_revision : 6fecbcf1ae9f6addd319cece6bf8731e23efc196
This commit is contained in:
parent
0029a207c0
commit
9b4d6d474e
1 changed files with 4 additions and 4 deletions
|
@ -39,6 +39,7 @@ xbps_write_metadata_scripts_pkg()
|
||||||
local tmpf=$(mktemp -t xbps-install.XXXXXXXXXX) || exit 1
|
local tmpf=$(mktemp -t xbps-install.XXXXXXXXXX) || exit 1
|
||||||
local fpattern="s|${DESTDIR}||g;s|^\./$||g;/^$/d"
|
local fpattern="s|${DESTDIR}||g;s|^\./$||g;/^$/d"
|
||||||
local targets f info_files home shell descr groups
|
local targets f info_files home shell descr groups
|
||||||
|
local found triggers_found
|
||||||
|
|
||||||
case "$action" in
|
case "$action" in
|
||||||
install) ;;
|
install) ;;
|
||||||
|
@ -201,7 +202,7 @@ _EOF
|
||||||
# Write the INSTALL/REMOVE package scripts.
|
# Write the INSTALL/REMOVE package scripts.
|
||||||
#
|
#
|
||||||
if [ -n "$triggers" ]; then
|
if [ -n "$triggers" ]; then
|
||||||
found=1
|
triggers_found=1
|
||||||
echo "case \"\${ACTION}\" in" >> $tmpf
|
echo "case \"\${ACTION}\" in" >> $tmpf
|
||||||
echo "pre)" >> $tmpf
|
echo "pre)" >> $tmpf
|
||||||
for f in ${triggers}; do
|
for f in ${triggers}; do
|
||||||
|
@ -239,7 +240,6 @@ _EOF
|
||||||
|
|
||||||
case "$action" in
|
case "$action" in
|
||||||
install)
|
install)
|
||||||
unset found
|
|
||||||
if [ -n "${sourcepkg}" -a "${sourcepkg}" != "${pkgname}" ]; then
|
if [ -n "${sourcepkg}" -a "${sourcepkg}" != "${pkgname}" ]; then
|
||||||
install_file=$XBPS_SRCPKGDIR/$pkgname/$pkgname.INSTALL
|
install_file=$XBPS_SRCPKGDIR/$pkgname/$pkgname.INSTALL
|
||||||
else
|
else
|
||||||
|
@ -250,7 +250,7 @@ _EOF
|
||||||
cat ${install_file} >> $tmpf
|
cat ${install_file} >> $tmpf
|
||||||
fi
|
fi
|
||||||
echo "exit 0" >> $tmpf
|
echo "exit 0" >> $tmpf
|
||||||
if [ -z "$found" ]; then
|
if [ -z "$triggers_found" -a -z "$found" ]; then
|
||||||
rm -f $tmpf
|
rm -f $tmpf
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -268,7 +268,7 @@ _EOF
|
||||||
cat ${remove_file} >> $tmpf
|
cat ${remove_file} >> $tmpf
|
||||||
fi
|
fi
|
||||||
echo "exit 0" >> $tmpf
|
echo "exit 0" >> $tmpf
|
||||||
if [ -z "$found" ]; then
|
if [ -z "$triggers_found" -a -z "$found" ]; then
|
||||||
rm -f $tmpf
|
rm -f $tmpf
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue