diff --git a/config/functions b/config/functions index e363649d39..6b7e71e1f6 100644 --- a/config/functions +++ b/config/functions @@ -133,17 +133,17 @@ build_msg() { # prints a warning if the file slated for removal doesn't exist # this allows us to continue instead of bailing out with just "rm" safe_remove() { - local path="$1" + local path - [ -z "${path}" ] && return 0 - - if [ -e "${path}" -o -L "${path}" ]; then - rm -r "${path}" - elif [ -n "${PKG_NAME}" ]; then - print_color CLR_WARNING "safe_remove: path does not exist: [${PKG_NAME}]: ${path}\n" - else - print_color CLR_WARNING "safe_remove: path does not exist: ${path}\n" - fi + for path in "$@" ; do + if [ -e "${path}" -o -L "${path}" ]; then + rm -r "${path}" + elif [ -n "${PKG_NAME}" ]; then + print_color CLR_WARNING "safe_remove: path does not exist: [${PKG_NAME}]: ${path}\n" + else + print_color CLR_WARNING "safe_remove: path does not exist: ${path}\n" + fi + done } ### BUILDSYSTEM HELPERS ### diff --git a/packages/lang/Python3/package.mk b/packages/lang/Python3/package.mk index 0d6b0e4d00..2c641f1e19 100644 --- a/packages/lang/Python3/package.mk +++ b/packages/lang/Python3/package.mk @@ -130,6 +130,8 @@ post_makeinstall_target() { rm -rf $INSTALL/usr/bin/python*-config rm -rf $INSTALL/usr/bin/smtpd.py $INSTALL/usr/bin/smtpd.py.* + find $INSTALL -name '*.o' -delete + python_compile $PKG_INSTALL_PATH_LIB # strip diff --git a/scripts/build b/scripts/build index 88dae73782..0c4a26dc84 100755 --- a/scripts/build +++ b/scripts/build @@ -482,7 +482,6 @@ if [ "${TARGET}" = "target" -o "${TARGET}" = "init" ]; then rm -rf ${INSTALL}/{usr/local/,usr/,}var find ${INSTALL} \( -name "*.orig" \ -o -name "*.rej" \ - -o -name "*.o" \ -o -name "*.in" \ -o -name ".git*" \) \ -exec rm -f {} \; 2>/dev/null || :