[Python-bugs-list] [Bug #117028] Installation fails if prefix directory does not exist.
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 13 Dec 2000 07:59:50 -0800
Bug #117028, was updated on 2000-Oct-16 13:20
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Closed
Resolution: Wont Fix
Bug Group: Not a Bug
Priority: 5
Submitted by: hove
Assigned to : gvanrossum
Summary: Installation fails if prefix directory does not exist.
Details: I just downloaded and installed Python-2.0c1. I configured with :
bash% ./configure --prefix=/local/python/python-2.0c1
The directory /local/python/python-2.0c1 did not exist. The install program did not offer to make this directory, and hence make install failed.
I have made a fix for this (I'd be overjoyed if you would consider using it!).
bash% diff -Naur Makefile.in.new Makefile.in.old :
--- Makefile.in.new Mon Oct 16 22:10:23 2000
+++ Makefile.in.old Mon Oct 16 22:06:53 2000
@@ -102,7 +102,6 @@
INSTALL= @srcdir@/install-sh -c
INSTALL_PROGRAM=${INSTALL} -m $(EXEMODE)
INSTALL_DATA= ${INSTALL} -m $(FILEMODE)
-INSTALL_DIR= @srcdir@/install-sh -d -m $(DIRMODE)
# Use this to make a link between python$(VERSION) and python in $(BINDIR)
LN=@LN@
@@ -218,12 +217,7 @@
PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
# Install everything
-install: prefixdir altinstall bininstall maninstall
-
-# Make the prefixdir if it does not already exist - logic handled by the install-sh script
-prefixdir:
- $(INSTALL_DIR) @prefix@
- $(INSTALL_DIR) @exec_prefix@
+install: altinstall bininstall maninstall
# Install almost everything without disturbing previous versions
altinstall: altbininstall libinstall inclinstall libainstall sharedinstall
bash% diff -Naur install-sh.new install-sh.old:
--- install-sh.new Mon Oct 16 21:44:30 2000
+++ install-sh.old Thu Aug 13 18:08:45 1998
@@ -43,10 +43,6 @@
shift
continue;;
- -d) instcmd="mkdir"
- shift
- continue;;
-
-m) chmodcmd="$chmodprog $2"
shift
shift
@@ -83,31 +79,10 @@
exit 1
fi
-
-if [ "$instcmd" = "mkdir" ]
-then
- dirlist=`echo $src | sed 's/\// /g'`
- cd /;
- currentdir="/"
- for dir in $dirlist
- do
- currentdir="$currentdir$dir"
- if [ ! -d "$dir" ]
- then
- echo "Creating directory "$currentdir
- mkdir $dir
- $chmodcmd $dir
- fi
- cd $dir
- currentdir="$currentdir/"
- done
- exit 0
-fi
-
-
if [ x"$dst" = x ]
then
echo "install: no destination specified"
+ exit 1
fi
@@ -143,4 +118,3 @@
exit 0
-
Follow-Ups:
Date: 2000-Dec-13 07:59
By: gvanrossum
Comment:
I get this a lot. In my opinion it is *not* a good idea to let "make install" create the prefix directory if it doesn't exist. This is a safeguard against typos: if you (as root) try to say "make prefix=/usr/local install" and you make a typo in the pathname, it would create a meaningless directory.
Won't fix, status closed.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=117028&group_id=5470