xbps-src: deprecate keep_empty_dirs, warn when an empty dir is removed.

This commit is contained in:
Juan RP 2011-11-09 16:25:11 +01:00
parent 94dceeaae8
commit f5dd7aa666
3 changed files with 8 additions and 9 deletions

View File

@ -99,12 +99,9 @@ install_src_phase()
find ${DESTDIR} -type f -name .packlist -delete
fi
# Remove empty directories by default.
if [ -z "$keep_empty_dirs" ]; then
msg_normal "$pkgver: removing empty dirs...\n"
find ${DESTDIR} -depth -type d -exec rmdir 2>/dev/null {} \;
fi
touch -f $XBPS_INSTALL_DONE
for f in $(find ${DESTDIR} -depth -type d); do
rmdir $f 2>/dev/null && msg_warn "removed empty dir: ${f##${DESTDIR}}\n"
done
#
# Build subpackages if found.
#
@ -127,12 +124,14 @@ install_src_phase()
set_tmpl_common_vars
if [ ! -f ${wrksrc}/.xbps_do_install_${pkgname}_done ]; then
run_func do_install
[ $? -eq 0 ] && \
if [ $? -eq 0 ]; then
touch -f ${wrksrc}/.xbps_do_install_${pkgname}_done
fi
else
msg_warn "$pkgver: skipping '$pkgname' subpkg, already installed into destdir.\n"
fi
done
touch -f $XBPS_INSTALL_DONE
}
[ -z "$PKG_TMPLNAME" ] && exit 2

View File

@ -44,7 +44,7 @@ xbps_write_metadata_pkg()
setup_tmpl ${sourcepkg}
unset run_depends conf_files noarch triggers replaces \
revision system_accounts system_groups \
preserve keep_empty_dirs xml_entries sgml_entries \
preserve xml_entries sgml_entries \
xml_catalogs sgml_catalogs gconf_entries gconf_schemas \
gtk_iconcache_dirs font_dirs dkms_modules provides \
kernel_hooks_version conflicts pycompile_dirs \

View File

@ -90,7 +90,7 @@ reset_tmpl_vars()
local TMPL_VARS="pkgname distfiles configure_args strip_cmd \
make_build_args make_install_args build_style \
short_desc maintainer long_desc checksum wrksrc \
make_cmd bootstrap register_shell keep_empty_dirs \
make_cmd bootstrap register_shell \
make_build_target configure_script noextract nofetch \
build_depends nostrip nonfree \
make_install_target version revision patch_args \