--- vmware-player-app.py.orig 2010-02-04 19:50:15.000000000 +0100 +++ vmware-player-app.py 2010-02-27 21:05:08.000000000 +0100 @@ -6,7 +6,8 @@ GCONF_DEFAULTS = 'xml:readwrite:/etc/gconf/gconf.xml.defaults' DEST = LIBDIR/'vmware' -CONFIG = DEST/'setup/vmware-config' +import os +CONFIG=path(os.environ['WORKDIR'])/'vmware-config.sh' CUPSLIBDIR = LIBDIR/'cups' SETTINGS = \ { 'libdir': DEST, @@ -25,7 +26,7 @@ # Player and Workstation both depend on some configuration living # in /etc/vmware -ETCDIR = Destination('/etc/vmware') +ETCDIR = SYSCONFDIR/'vmware' class PlayerApp(Installer): def PreTransactionInstall(self, old, new, upgrade): @@ -106,13 +107,14 @@ not themeIndex.exists() and self.AddTarget('File', 'files/index.theme', themeIndex) # Services - self.RegisterService(name='vmware', src='etc/init.d/services.sh', start=19, stop=8) + self.AddTarget('File', 'etc/init.d/services.sh', ETCDIR/'init.d/vmware') + # self.RegisterService(name='vmware', src='etc/init.d/services.sh', start=19, stop=8) # modprobe.d script. Only install this on systems where modprobe.d # exists. if path('/etc/modprobe.d').exists(): self.AddTarget('File', 'etc/modprobe.d/modprobe-vmware-fuse.conf', - '/etc/modprobe.d/vmware-fuse.conf') + SYSCONFDIR/'modprobe.d/vmware-fuse.conf') def _scriptRunnable(self, script): """ Returns True if the script exists and is in a runnable state """ @@ -178,7 +180,7 @@ for module in modules: for ext in ('o', 'ko'): mod = '%s.%s' % (module, ext) - (base/mod).remove(ignore_errors=True) +# (base/mod).remove(ignore_errors=True) # Make sure we kill all processes that should not be running! self._killVMwareProcesses() @@ -228,9 +230,10 @@ for key, val in SETTINGS.items(): self.RunCommand(CONFIG, '-s', key, val) - bootstrap = ETCDIR/'bootstrap' + import os + bootstrap = path(os.environ['WORKDIR'])/'vmware-confdir/bootstrap' # Create the bootstrap file. - bootstrap.unlink(ignore_errors=True) + #bootstrap.unlink(ignore_errors=True) # Fill it. for i in ('PREFIX', 'BINDIR', 'SBINDIR', 'LIBDIR', 'DATADIR', 'SYSCONFDIR', 'DOCDIR', 'MANDIR', 'INCLUDEDIR', 'INITDIR', @@ -343,7 +346,8 @@ def _isGConfUsable(self): """ Return True if GConf settings can be configured, otherwise False """ - return self.RunCommand('gconftool-2', '--help', ignoreErrors=True, noLogging=True).retCode == 0 + return False +# return self.RunCommand('gconftool-2', '--help', ignoreErrors=True, noLogging=True).retCode == 0 def _configureVMStreamingHandlers(self): """ Configures handlers for vm:// and vms:// used for VM streaming """