xbps-src: deprecate keep_empty_dirs, warn when an empty dir is removed.
This commit is contained in:
parent
94dceeaae8
commit
f5dd7aa666
3 changed files with 8 additions and 9 deletions
|
@ -99,12 +99,9 @@ install_src_phase()
|
||||||
find ${DESTDIR} -type f -name .packlist -delete
|
find ${DESTDIR} -type f -name .packlist -delete
|
||||||
fi
|
fi
|
||||||
# Remove empty directories by default.
|
# Remove empty directories by default.
|
||||||
if [ -z "$keep_empty_dirs" ]; then
|
for f in $(find ${DESTDIR} -depth -type d); do
|
||||||
msg_normal "$pkgver: removing empty dirs...\n"
|
rmdir $f 2>/dev/null && msg_warn "removed empty dir: ${f##${DESTDIR}}\n"
|
||||||
find ${DESTDIR} -depth -type d -exec rmdir 2>/dev/null {} \;
|
done
|
||||||
fi
|
|
||||||
touch -f $XBPS_INSTALL_DONE
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build subpackages if found.
|
# Build subpackages if found.
|
||||||
#
|
#
|
||||||
|
@ -127,12 +124,14 @@ install_src_phase()
|
||||||
set_tmpl_common_vars
|
set_tmpl_common_vars
|
||||||
if [ ! -f ${wrksrc}/.xbps_do_install_${pkgname}_done ]; then
|
if [ ! -f ${wrksrc}/.xbps_do_install_${pkgname}_done ]; then
|
||||||
run_func do_install
|
run_func do_install
|
||||||
[ $? -eq 0 ] && \
|
if [ $? -eq 0 ]; then
|
||||||
touch -f ${wrksrc}/.xbps_do_install_${pkgname}_done
|
touch -f ${wrksrc}/.xbps_do_install_${pkgname}_done
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
msg_warn "$pkgver: skipping '$pkgname' subpkg, already installed into destdir.\n"
|
msg_warn "$pkgver: skipping '$pkgname' subpkg, already installed into destdir.\n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
touch -f $XBPS_INSTALL_DONE
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -z "$PKG_TMPLNAME" ] && exit 2
|
[ -z "$PKG_TMPLNAME" ] && exit 2
|
||||||
|
|
|
@ -44,7 +44,7 @@ xbps_write_metadata_pkg()
|
||||||
setup_tmpl ${sourcepkg}
|
setup_tmpl ${sourcepkg}
|
||||||
unset run_depends conf_files noarch triggers replaces \
|
unset run_depends conf_files noarch triggers replaces \
|
||||||
revision system_accounts system_groups \
|
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 \
|
xml_catalogs sgml_catalogs gconf_entries gconf_schemas \
|
||||||
gtk_iconcache_dirs font_dirs dkms_modules provides \
|
gtk_iconcache_dirs font_dirs dkms_modules provides \
|
||||||
kernel_hooks_version conflicts pycompile_dirs \
|
kernel_hooks_version conflicts pycompile_dirs \
|
||||||
|
|
|
@ -90,7 +90,7 @@ reset_tmpl_vars()
|
||||||
local TMPL_VARS="pkgname distfiles configure_args strip_cmd \
|
local TMPL_VARS="pkgname distfiles configure_args strip_cmd \
|
||||||
make_build_args make_install_args build_style \
|
make_build_args make_install_args build_style \
|
||||||
short_desc maintainer long_desc checksum wrksrc \
|
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 \
|
make_build_target configure_script noextract nofetch \
|
||||||
build_depends nostrip nonfree \
|
build_depends nostrip nonfree \
|
||||||
make_install_target version revision patch_args \
|
make_install_target version revision patch_args \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue