[sabayon] Commit: Boring fixes..



(per Mark's request, I'll be posting my patches to this list after
committing until I hear a voice from one of the project maintainers
saying otherwise) :)

Summary:
xnest not found = warning, not error, set XSESSION variable in
config.py appropriately for redhat and debian/ubuntu, tweak exception
description to actually give the name of the file that's not found

Have fun,
-- 
William Lachance
wrlach gmail com
? .gconf.xml.defaults
? .gnome2
? .recently-used
? metadata
? sabayon-tweaks.patch
? sabayon-with-distro.diff
? sabayon-xnest.patch
? doc/Makefile
? doc/Makefile.in
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/sabayon/ChangeLog,v
retrieving revision 1.134
diff -u -p -u -r1.134 ChangeLog
--- ChangeLog	15 Mar 2005 00:51:20 -0000	1.134
+++ ChangeLog	15 Mar 2005 06:19:49 -0000
@@ -1,3 +1,16 @@
+2005-03-14  William Lachance <wrlach gmail com>
+
+	* configure.ac: Not finding xnest should be a warning, not an error. 
+	Check for distro, and set path to Xsession accordingly (bug #168123).
+
+	* lib/config.py.in: Don't hard code Xsession, make it a build-time
+	option.
+
+	* lib/Makefile.am: Substitute the Xsession variable appropriately.
+
+	* lib/storage.py: Actually give the filename that's not found upon
+	a ProfileStorageException.
+
 2005-03-14  John Dennis  <jdennis redhat com>
 
 	* rework mozillasource so code and class structure better supports
Index: configure.ac
===================================================================
RCS file: /cvs/gnome/sabayon/configure.ac,v
retrieving revision 1.20
diff -u -p -u -r1.20 configure.ac
--- configure.ac	10 Mar 2005 15:16:44 -0000	1.20
+++ configure.ac	15 Mar 2005 06:19:49 -0000
@@ -17,6 +17,34 @@ ALL_LINGUAS="bg cs de el en_CA en_GB nb 
 AM_GLIB_GNU_GETTEXT
 
 
+AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat or debian]))
+if test "z$with_distro" = "z"; then
+	AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
+	AC_CHECK_FILE(/etc/fedora-release,with_distro="redhat")
+	AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
+fi
+with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
+
+if test "z$with_distro" = "z"; then
+	echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO"
+	exit 1
+else
+	case $with_distro in
+		redhat) 
+			XSESSION="/etc/X11/xdm/Xsession"
+			;;
+		debian) 
+			XSESSION="/etc/gdm/Xsession"
+			;;
+		*)
+			echo "Your distribution (${with_distro}) is not yet supported!  (patches welcome)"
+			exit 1
+			;;
+	esac
+fi
+AC_SUBST(XSESSION)
+
+
 AC_ARG_ENABLE(console-helper,
   [  --enable-console-helper=[auto/no/yes]  Enable PAM console helper [default=auto]],,
   enable_console_helper=auto)
@@ -85,7 +113,7 @@ fi
 
 AC_CHECK_PROG(XNEST,Xnest,yes,no)
 if test "x$XNEST" = "xno" ; then
-  AC_MSG_ERROR(xnest binary not found)
+  AC_MSG_WARN(xnest binary not found)
 fi
 
 EXPANDED_SABAYON_DIR=`eval echo $SABAYON_DIR_TMP`
Index: lib/Makefile.am
===================================================================
RCS file: /cvs/gnome/sabayon/lib/Makefile.am,v
retrieving revision 1.12
diff -u -p -u -r1.12 Makefile.am
--- lib/Makefile.am	28 Feb 2005 13:53:52 -0000	1.12
+++ lib/Makefile.am	15 Mar 2005 06:19:49 -0000
@@ -39,4 +39,5 @@ config.py: config.py.in Makefile
                 -e s!\ SYSCONFDIR\@!$(sysconfdir)!		\
                 -e s!\ PACKAGE_NAME\@!$(PACKAGE_NAME)!		\
                 -e s!\ PACKAGE_VERSION\@!$(PACKAGE_VERSION)!	\
+		-e s!\ XSESSION\@!$(XSESSION)!			\
                 < $< > $@
Index: lib/config.py.in
===================================================================
RCS file: /cvs/gnome/sabayon/lib/config.py.in,v
retrieving revision 1.26
diff -u -p -u -r1.26 config.py.in
--- lib/config.py.in	28 Feb 2005 17:05:32 -0000	1.26
+++ lib/config.py.in	15 Mar 2005 06:19:49 -0000
@@ -54,7 +54,7 @@ NOLOGIN_SHELL = "/sbin/nologin"
 SKEL_HOMEDIR  = "/etc/skel"
 
 XNEST_ARGV   = [ "/usr/X11R6/bin/Xnest", "-terminate", "-audit", "0", "-nolisten", "tcp" ]
-SESSION_ARGV = [ "/etc/X11/xdm/Xsession", "gnome" ]
+SESSION_ARGV = [ "@XSESSION@", "gnome" ]
 USERMOD_ARGV = [ "/usr/sbin/usermod" ]
 
 PANEL_KEY_BASE = "/apps/panel"
Index: lib/storage.py
===================================================================
RCS file: /cvs/gnome/sabayon/lib/storage.py,v
retrieving revision 1.21
diff -u -p -u -r1.21 storage.py
--- lib/storage.py	8 Mar 2005 18:32:06 -0000	1.21
+++ lib/storage.py	15 Mar 2005 06:19:49 -0000
@@ -513,7 +513,7 @@ class ProfileStorage:
         dst_path = os.path.join (self.temp_path, path)
 
         if not os.path.exists (src_path):
-            raise ProfileStorageException (_("Cannot add non-existent file '%s'"))
+            raise ProfileStorageException (_("Cannot add non-existent file '%s'" % (src_path)))
         
         if not self.unsaved_revision:
             self.unsaved_revision = self.__create_new_profile_revision ()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]