Changeset 3257
- Timestamp:
- 11/23/07 22:39:58 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pksetup
r3236 r3257 197 197 198 198 otherpackages = [ { "name" : "pkpgcounter", 199 "version" : " 2.17",199 "version" : "3.30", 200 200 "url" : "http://www.pykota.com/software/%(name)s/download/tarballs/%(name)s-%(version)s.tar.gz", 201 201 "commands" : [ "tar -zxf %(name)s-%(version)s.tar.gz", … … 212 212 ], 213 213 }, 214 { "name" : "ghostp cl",215 "version" : "1. 41p1",216 "url" : " ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/GhostPCL/%(name)s_%(version)s.tar.bz2",214 { "name" : "ghostpdl", 215 "version" : "1.51", 216 "url" : "http://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/%(name)s/%(name)s-%(version)s.tar.bz2", 217 217 "commands" : [ "bunzip2 <%(name)s_%(version)s.tar.bz2 | tar -xf -", 218 218 "cd %(name)s_%(version)s", 219 "make fonts", 220 "make product", 221 "make install", 219 "make pcl", 220 "make pcl_install", 222 221 ], 223 222 }, … … 282 281 download = 'svn export "%(url)s" %(name)s' % locals() 283 282 else : 284 download = 'wget "%(url)s"' % locals()283 download = 'wget --user-agent=pksetup "%(url)s"' % locals() 285 284 if self.confirmCommand("to download %(name)s" % locals(), download) : 286 285 self.confirmCommand("to install %(name)s" % locals(), commands) … … 321 320 conflines.insert(1, "local\tpykota\tpykotaadmin,pykotauser\t\tmd5") 322 321 conf = "\n".join(conflines) 322 port = 5432 323 if tcpip : 324 answer = self.confirmPipe("to see on which TCP port PostgreSQL accepts connections", "grep ^port %(pgconffile)s" % locals()) 325 if answer is not False : 326 try : 327 port = int([p.strip() for p in answer.strip().split("=")][1]) 328 except (ValueError, IndexError, TypeError) : 329 pass 323 330 self.confirmCommand("to configure PostgreSQL correctly for PyKota", 'echo "%(conf)s" >%(pgconfdir)s/pg_hba.conf' % locals()) 324 331 self.confirmCommand("to make PostgreSQL take the changes into account", self.pgrestart) 325 return tcpip326 return None327 328 def genConfig(self, adminname, adminemail, dnsdomain, smtpserver, home, tcpip ) :332 return (tcpip, port) 333 return (None, None) 334 335 def genConfig(self, adminname, adminemail, dnsdomain, smtpserver, home, tcpip, port) : 329 336 """Generates minimal configuration files for PyKota.""" 330 337 if tcpip : 331 storageserver = "localhost "338 storageserver = "localhost:%i" % port 332 339 else : 333 340 storageserver = "" … … 407 414 self.setupPackages() 408 415 self.downloadOtherPackages() 409 tcpip= self.configurePostgreSQL()410 self.genConfig(adminname, adminemail, dnsdomain, smtpserver, homedirectory, tcpip )416 (tcpip, port) = self.configurePostgreSQL() 417 self.genConfig(adminname, adminemail, dnsdomain, smtpserver, homedirectory, tcpip, port) 411 418 self.setupDatabase() 412 419 self.setupBackend()