diff --git a/xbps-src/libexec/doinst-helper.sh.in b/xbps-src/libexec/doinst-helper.sh.in index 4edcd3e957..4069b2ea11 100644 --- a/xbps-src/libexec/doinst-helper.sh.in +++ b/xbps-src/libexec/doinst-helper.sh.in @@ -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 diff --git a/xbps-src/shutils/metadata.sh b/xbps-src/shutils/metadata.sh index 2f02766885..6bf4ec1d4c 100644 --- a/xbps-src/shutils/metadata.sh +++ b/xbps-src/shutils/metadata.sh @@ -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 \ diff --git a/xbps-src/shutils/tmpl_funcs.sh.in b/xbps-src/shutils/tmpl_funcs.sh.in index 597710b8ae..72291949b5 100644 --- a/xbps-src/shutils/tmpl_funcs.sh.in +++ b/xbps-src/shutils/tmpl_funcs.sh.in @@ -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 \