[Trac-tickets] [The Trac Project] #2027: trac-admin initenv doesn't work if user has "helpfully" created directory already

The Trac Project noreply at edgewall.com
Thu Sep 8 01:48:35 CDT 2005


#2027: trac-admin initenv doesn't work if user has "helpfully" created directory
already
--------------------------------+-------------------------------------------
 Reporter:  mdorey at bluearc.com  |       Owner:  daniel
     Type:  enhancement         |      Status:  new   
 Priority:  lowest              |   Milestone:        
Component:  trac-admin          |     Version:  0.8.4 
 Severity:  trivial             |   Keywords:                      |  
--------------------------------+-------------------------------------------
 Here's the log of my first install:

 software at jessies:~$ mkdir trac-root
 software at jessies:~$ mkdir /home/software/trac-root/salma-hayek
 software at jessies:~$ trac-admin /home/software/trac-root/salma-hayek
 initenv
 Creating a new Trac environment at /home/software/trac-root/salma-hayek

 Trac will first ask a few questions about your environment
 in order to initalize and prepare the project database.

  Please enter the name of your project.
  This name will be used in page titles and descriptions.

 Project Name [My Project]> salma-hayek

  Please specify the absolute path to the project Subversion repository.
  Repository must be local, and trac-admin requires read+write
  permission to initialize the Trac database.

 Path to repository [/var/svn/test]> /home/software/svnroot/salma-hayek

  Please enter location of Trac page templates.
  Default is the location of the site-wide templates installed with Trac.

 Templates directory [/usr/share/trac/templates]>
 Creating and Initializing Project
 Failed to create environment. [Errno 17] File exists: '/home/software
 /trac-root/salma-hayek'
 Failed to initialize database. 1
 software at jessies:~$ rmdir /home/software/trac-root/salma-hayek
 software at jessies:~$ trac-admin /home/software/trac-root/salma-hayek
 initenv
 Creating a new Trac environment at /home/software/trac-root/salma-hayek

 Trac will first ask a few questions about your environment
 in order to initalize and prepare the project database.

  Please enter the name of your project.
  This name will be used in page titles and descriptions.

 Project Name [My Project]> salma-hayek

  Please specify the absolute path to the project Subversion repository.
  Repository must be local, and trac-admin requires read+write
  permission to initialize the Trac database.

 Path to repository [/var/svn/test]> /home/software/svnroot/salma-hayek

  Please enter location of Trac page templates.
  Default is the location of the site-wide templates installed with Trac.

 Templates directory [/usr/share/trac/templates]>
 Creating and Initializing Project
 ...
 Congratulations!

 software at jessies:~$

 I imagine I had to create the trac-root directory but I wasn't allowed to
 create the project environment directory itself.  I was on the verge of
 updating the documentation to note that you mustn't create the directory
 but then I thought "why doesn't trac-admin initenv just allow this, at
 least if the directory's empty?".  I prefer to say something in code to
 avoid saying it in the documentation.

 I know, it's more than one observation in one ticket but initenv could
 have guessed the name of the project from the directory's name - it
 couldn't have been any less likely to be right than guessing "My Project".
 And, slightly in contradiction to the last point perhaps, it would have
 been helpful if initenv had remembered the answers I gave it last time
 (like a web browser would have).

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2027>
The Trac Project <http://trac.edgewall.com/>


More information about the Trac-Tickets mailing list