Skip to content

Commit

Permalink
Delete old vendor files when installing
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Jan 8, 2017
1 parent f4d52e2 commit b7e73d8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Expand Up @@ -16,7 +16,7 @@ include Mk/macports.autoconf.mk

all:: Mk/macports.autoconf.mk

Mk/macports.autoconf.mk: Mk/macports.autoconf.mk.in src/config.h.in Makefile.in doc/Makefile.in src/Makefile.in src/cflib1.0/Makefile.in src/cregistry/Makefile.in src/darwintracelib1.0/Makefile.in src/machista1.0/Makefile.in src/macports1.0/Makefile.in src/mpcommon1.0/Makefile.in src/package1.0/Makefile.in src/pextlib1.0/Makefile.in src/port/Makefile.in src/port1.0/Makefile.in src/programs/Makefile.in src/programs/daemondo/Makefile.in src/registry2.0/Makefile.in tests/Makefile.in config.status
Mk/macports.autoconf.mk: Mk/macports.autoconf.mk.in src/config.h.in Makefile.in doc/Makefile.in src/Makefile.in src/cflib1.0/Makefile.in src/cregistry/Makefile.in src/darwintracelib1.0/Makefile.in src/machista1.0/Makefile.in src/macports1.0/Makefile.in src/mpcommon1.0/Makefile.in src/package1.0/Makefile.in src/pextlib1.0/Makefile.in src/port/Makefile.in src/port1.0/Makefile.in src/programs/Makefile.in src/programs/daemondo/Makefile.in src/registry2.0/Makefile.in tests/Makefile.in vendor/Makefile.in config.status
./config.status
${MAKE} clean

Expand Down
16 changes: 14 additions & 2 deletions portmgr/dmg/postflight.in
Expand Up @@ -33,8 +33,8 @@

#set -x

# Script identification ('cause more often than not the svn Id is not expanded):
VERSION=2.3.1
# Script identification:
VERSION=2.4

# Abstraction variables:
PREFIX="@prefix@"
Expand All @@ -53,6 +53,8 @@ OUR_STRING="${OUR_BASESTRING} on ${TIMESTAMP}"

OLD_MACPORTS_TCL_DIR=${PREFIX}/share/macports/Tcl
OLD_TCL_PACKAGE_DIR=/Library/Tcl
OLD_TCL_FILES="tcl8/8.4/http-2.7.12.tm tcl8/8.4/platform-1.0.12.tm tcl8/8.4/platform-1.0.13.tm tcl8/8.5/tcltest-2.3.5.tm"
OLD_VENDOR_DIRS="thread2.7.0 thread2.7.2 tcllib1.15 tcllib1.17"

# Create config files from defaults if not present
function setup_configs {
Expand Down Expand Up @@ -137,6 +139,16 @@ function delete_old_tcl_packages {
if [[ -d "${OLD_MACPORTS_TCL_DIR}" ]]; then
rm -vrf "${OLD_MACPORTS_TCL_DIR}"
fi
for f in ${OLD_TCL_FILES}; do
if [[ -f "${TCL_PACKAGE_PATH}/${f}" ]]; then
rm -vf "${TCL_PACKAGE_PATH}/${f}"
fi
done
for d in ${OLD_VENDOR_DIRS}; do
if [[ -d "${TCL_PACKAGE_PATH}/${d}" ]]; then
rm -vrf "${TCL_PACKAGE_PATH}/${d}"
fi
done
}

# create the user to use for privilege dropping
Expand Down
9 changes: 9 additions & 0 deletions vendor/Makefile.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b7e73d8

Please sign in to comment.