APPROVE COMMIT 21.5
Not for 21.4.
This patch reports the package hierarchies (if user-specified, these
are the --with-user-packages, --with-system-packages, and
--with-legacy-packages options). The user package hierarchies are
just reported. (Which user to check? is the main problem. I have a
patch that assumes a single-user system but this wouldn't work if the
user configures XEmacs as root!) The system package roots are checked
for existence and presence of *-packages directories, and if either
check fails a warning that XEmacs features will be missing until
packages are installed is issued. The legacy package roots, if
supplied, are checked, and checked for existence and presence of
*-packages directories. If missing, a warning suggesting that the
option should be omitted is issued.
If the --with-legacy-packages option is not supplied, then the legacy
package root is completed ignored.
# HG changeset patch
# Parent 4e54445e0c7d2e0744b998ce9499beb5fae92a7a
Sanity check package search paths.
diff -r 4e54445e0c7d ChangeLog
--- a/ChangeLog Fri Aug 03 03:45:02 2012 +0900
+++ b/ChangeLog Sat Aug 04 22:53:41 2012 +0900
@@ -1,3 +1,10 @@
+2012-08-04 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * configure.ac (Package Search): New section.
+ Warn about missing system package hierarchies.
+
+ * configure: Regenerate.
+
2012-08-02 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.32 "habanero" is released.
diff -r 4e54445e0c7d configure
--- a/configure Fri Aug 03 03:45:02 2012 +0900
+++ b/configure Sat Aug 04 22:53:41 2012 +0900
@@ -21156,6 +21156,70 @@
- Consider configuring with --with-pdump." ;;
esac
+
+echo "
+Package Search (a 'root' contains '{xemacs,mule,site}-packages'):"
+
+if test -n "$with_early_packages"; then
+ case "$with_early_packages" in *:* ) case "$opsys" in *cygwin* )
+ echo " WARNING: Paths containing spaces will be misinterpreted." ;;
+esac
+with_early_packages="`echo '' $with_early_packages | sed -e 's/^ //'
-e 's/:/ /g'`";; esac
+ echo " User package roots: $with_early_packages"
+else
+ echo " User package roots: ~/.xemacs"
+fi
+
+with_late_packages_expanded=$with_late_packages
+while true; do
+ case "$with_late_packages_expanded" in
+ *\$* ) eval "with_late_packages_expanded=$with_late_packages_expanded" ;;
+ *) break ;;
+ esac
+done
+case "$with_late_packages_expanded" in *:* ) case "$opsys" in
*cygwin* )
+ echo " WARNING: Paths containing spaces will be misinterpreted." ;;
+esac
+with_late_packages_expanded="`echo '' $with_late_packages_expanded | sed -e
's/^ //' -e 's/:/ /g'`";; esac
+echo " System package roots: $with_late_packages_expanded"
+for path in $with_late_packages_expanded; do
+ if test ! -d $path; then
+ echo " WARNING: $path was specified, but doesn't exist."
+ echo " WARNING: XEmacs functionality will be noticably limited until"
+ echo " WARNING: some packages are installed."
+ elif test ! -d "$path/xemacs-packages" \
+ -a ! -d "$path/mule-packages" \
+ -a ! -d "$path/site-packages"; then
+ echo " WARNING: No packages found in $path."
+ echo " WARNING: XEmacs functionality will be noticably limited until"
+ echo " WARNING: some packages are installed."
+ fi
+done
+if test -z "$with_late_packages"; then
+ echo " XEmacs BUG: with_late_packages is unset. Please report this!"
+fi
+
+if test -n "$with_last_packages"; then
+ case "$with_last_packages" in *:* ) case "$opsys" in *cygwin* )
+ echo " WARNING: Paths containing spaces will be misinterpreted." ;;
+esac
+with_last_packages="`echo '' $with_last_packages | sed -e 's/^ //'
-e 's/:/ /g'`";; esac
+ echo " Legacy package roots: $with_last_packages"
+ for path in $with_last_packages; do
+ if test ! -d $path; then
+ echo " WARNING: $path was specified, but doesn't exist."
+ echo " WARNING: If you don't need this setting, it is
recommended"
+ echo " WARNING: that you not use it."
+ elif test ! -d "$path/xemacs-packages" \
+ -a ! -d "$path/mule-packages" \
+ -a ! -d "$path/site-packages"; then
+ echo " WARNING: No packages found in $path."
+ echo " WARNING: If you don't need this setting, it is
recommended"
+ echo " WARNING: that you not use it."
+ fi
+ done
+fi
+
echo "
Window System:"
if test "$with_msw" = "yes"; then
diff -r 4e54445e0c7d configure.ac
--- a/configure.ac Fri Aug 03 03:45:02 2012 +0900
+++ b/configure.ac Sat Aug 04 22:53:41 2012 +0900
@@ -5680,6 +5680,63 @@
- Consider configuring with --with-pdump." ;;
esac
+define(COLON_TO_SPACE_WARN,
+ [case "$[$1]" in *:* [)] dnl
+case "$opsys" in *cygwin* [)]
+ echo " WARNING: Paths containing spaces will be misinterpreted." ;;
+esac
+[$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";;
esac])dnl
+
+echo "
+Package Search (a 'root' contains '{xemacs,mule,site}-packages'):"
+
+if test -n "$with_early_packages"; then
+ COLON_TO_SPACE_WARN(with_early_packages)
+ echo " User package roots: $with_early_packages"
+else
+ echo " User package roots: ~/.xemacs"
+fi
+
+dnl Unlike the others, with_late_packages gets a non-null default.
+XE_EXPAND_VARIABLE(with_late_packages,with_late_packages_expanded)
+COLON_TO_SPACE_WARN(with_late_packages_expanded)
+echo " System package roots: $with_late_packages_expanded"
+for path in $with_late_packages_expanded; do
+ if test ! -d $path; then
+ echo " WARNING: $path was specified, but doesn't exist."
+ echo " WARNING: XEmacs functionality will be noticably limited until"
+ echo " WARNING: some packages are installed."
+ elif test ! -d "$path/xemacs-packages" \
+ -a ! -d "$path/mule-packages" \
+ -a ! -d "$path/site-packages"; then
+ echo " WARNING: No packages found in $path."
+ echo " WARNING: XEmacs functionality will be noticably limited until"
+ echo " WARNING: some packages are installed."
+ fi
+done
+dnl #### Shouldn't need this.
+if test -z "$with_late_packages"; then
+ echo " XEmacs BUG: with_late_packages is unset. Please report this!"
+fi
+
+if test -n "$with_last_packages"; then
+ COLON_TO_SPACE_WARN(with_last_packages)
+ echo " Legacy package roots: $with_last_packages"
+ for path in $with_last_packages; do
+ if test ! -d $path; then
+ echo " WARNING: $path was specified, but doesn't exist."
+ echo " WARNING: If you don't need this setting, it is
recommended"
+ echo " WARNING: that you not use it."
+ elif test ! -d "$path/xemacs-packages" \
+ -a ! -d "$path/mule-packages" \
+ -a ! -d "$path/site-packages"; then
+ echo " WARNING: No packages found in $path."
+ echo " WARNING: If you don't need this setting, it is
recommended"
+ echo " WARNING: that you not use it."
+ fi
+ done
+fi
+
echo "
Window System:"
if test "$with_msw" = "yes"; then
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches