Ticket #132 (closed defect: fixed)

Opened 19 months ago

Last modified 7 weeks ago

confman import fails on nonexistent directories

Reported by: blee Owned by: confman-developers@…
Priority: critical Milestone: confman-1.9.4
Component: confman Version: 1.9.3b
Keywords: Cc:

Description

blee@supra ~/src/conf $ confman import testmodule /nonexistent/foo.conf
Password: 
confman[5485]: blee: /usr/libexec/confman/abspath: line 41: cd: /nonexistent: No such file or directory
Who should be the file's owner? [ root ]

Who should be the file's group? [ root ]

What should the file's permissions be? [ 0644 ]

What string starts comment lines? [ # ]

Making directory /home with root:root, 755
/usr/bin/svn mkdir /home/blee/src/conf/testmodule/home
A         /home/blee/src/conf/testmodule/home
property 'confman:owner' set on '/home/blee/src/conf/testmodule/home'
property 'confman:group' set on '/home/blee/src/conf/testmodule/home'
property 'confman:mode' set on '/home/blee/src/conf/testmodule/home'
property 'confman:comment' set on '/home/blee/src/conf/testmodule/home'
Making directory /home/blee with blee:blee, 755
/usr/bin/svn mkdir /home/blee/src/conf/testmodule/home/blee
A         /home/blee/src/conf/testmodule/home/blee
property 'confman:owner' set on '/home/blee/src/conf/testmodule/home/blee'
property 'confman:group' set on '/home/blee/src/conf/testmodule/home/blee'
property 'confman:mode' set on '/home/blee/src/conf/testmodule/home/blee'
property 'confman:comment' set on '/home/blee/src/conf/testmodule/home/blee'
Making directory /home/blee/src with blee:blee, 755
/usr/bin/svn mkdir /home/blee/src/conf/testmodule/home/blee/src
A         /home/blee/src/conf/testmodule/home/blee/src
property 'confman:owner' set on '/home/blee/src/conf/testmodule/home/blee/src'
property 'confman:group' set on '/home/blee/src/conf/testmodule/home/blee/src'
property 'confman:mode' set on '/home/blee/src/conf/testmodule/home/blee/src'
property 'confman:comment' set on '/home/blee/src/conf/testmodule/home/blee/src'
Making directory /home/blee/src/conf with blee:blee, 700
/usr/bin/svn mkdir /home/blee/src/conf/testmodule/home/blee/src/conf
A         /home/blee/src/conf/testmodule/home/blee/src/conf
property 'confman:owner' set on '/home/blee/src/conf/testmodule/home/blee/src/conf'
property 'confman:group' set on '/home/blee/src/conf/testmodule/home/blee/src/conf'
property 'confman:mode' set on '/home/blee/src/conf/testmodule/home/blee/src/conf'
property 'confman:comment' set on '/home/blee/src/conf/testmodule/home/blee/src/conf'
/home/blee/src/conf/foo.conf
A         /home/blee/src/conf/testmodule/home/blee/src/conf/foo.conf
property 'svn:keywords' set on '/home/blee/src/conf/testmodule/home/blee/src/conf/foo.conf'
property 'confman:owner' set on '/home/blee/src/conf/testmodule/home/blee/src/conf/foo.conf'
property 'confman:group' set on '/home/blee/src/conf/testmodule/home/blee/src/conf/foo.conf'
property 'confman:mode' set on '/home/blee/src/conf/testmodule/home/blee/src/conf/foo.conf'
property 'confman:comment' set on '/home/blee/src/conf/testmodule/home/blee/src/conf/foo.conf'
property 'confman:symlink' set on '/home/blee/src/conf/testmodule/home/blee/src/conf/foo.conf'

Change History

comment:1 Changed 9 months ago by joshu

  • Status changed from new to needsmerge

(In [518]) confman now checks whether a directory exists before trying to import it or any files in it. Fixes #132.

comment:2 Changed 9 months ago by joshu

  • Status changed from needsmerge to assigned

Apparently this was not the way that the problem was meant to be fixed.

comment:3 Changed 8 months ago by joshu

  • Status changed from assigned to needsmerge

(In [520]) confman now checks whether the directory that contains a file to be imported exists and, if it does not, recursively creates the containing directories. Fixes #132.

comment:4 Changed 8 months ago by joshu

joshu@corcagia:~/src % confman import testmodule /nonexistent/foo.conf
Who should be the file's owner? [ root ]

Who should be the file's group? [ wheel ]

What should the file's permissions be? [ 0444 ]

What string starts comment lines? [ # ]

Making directory /root with root:wheel, 0755
/usr/local/bin/svn mkdir /home/joshu/src/conf/testmodule/root
A         /home/joshu/src/conf/testmodule/root
property 'confman:owner' set on '/home/joshu/src/conf/testmodule/root'
property 'confman:group' set on '/home/joshu/src/conf/testmodule/root'
property 'confman:mode' set on '/home/joshu/src/conf/testmodule/root'
property 'confman:comment' set on '/home/joshu/src/conf/testmodule/root'
Who should be the directory's owner? [ root ]

Who should be the directory's group? [ wheel ]

What should the directory's permissions be? [ 0755 ]

Making directory /root/nonexistent with root:wheel, 0755
/usr/local/bin/svn mkdir /home/joshu/src/conf/testmodule/root/nonexistent
A         /home/joshu/src/conf/testmodule/root/nonexistent
property 'confman:owner' set on '/home/joshu/src/conf/testmodule/root/nonexistent'
property 'confman:group' set on '/home/joshu/src/conf/testmodule/root/nonexistent'
property 'confman:mode' set on '/home/joshu/src/conf/testmodule/root/nonexistent'
property 'confman:comment' set on '/home/joshu/src/conf/testmodule/root/nonexistent'
/root/nonexistent/foo.conf
A         /home/joshu/src/conf/testmodule/root/nonexistent/foo.conf
property 'svn:keywords' set on '/home/joshu/src/conf/testmodule/root/nonexistent/foo.conf'
property 'confman:owner' set on '/home/joshu/src/conf/testmodule/root/nonexistent/foo.conf'
property 'confman:group' set on '/home/joshu/src/conf/testmodule/root/nonexistent/foo.conf'
property 'confman:mode' set on '/home/joshu/src/conf/testmodule/root/nonexistent/foo.conf'
property 'confman:comment' set on '/home/joshu/src/conf/testmodule/root/nonexistent/foo.conf'
property 'confman:symlink' set on '/home/joshu/src/conf/testmodule/root/nonexistent/foo.conf'

comment:5 Changed 6 months ago by joshu

(In [521]) Reverting changes made for import failing on nonexistent directories; see #132

comment:6 Changed 6 months ago by joshu

  • Status changed from needsmerge to assigned

comment:7 Changed 6 months ago by joshu

(In [533]) Corrected abspath's behavior to resolve as much of the real path as possible (see #132)

comment:8 Changed 6 months ago by joshu

  • Status changed from assigned to needsmerge

comment:9 Changed 7 weeks ago by blee

  • Status changed from needsmerge to closed
  • Resolution set to fixed

(In [561]) Merge fix for #132 into confman-1.9.

Closes #132

Note: See TracTickets for help on using tickets.