Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i'm starting to use puppet. i wanted to have my own yum repository to serve puppet server so i issued

 yum install createrepo

no errors reported (cenotos 5.5) after that i issued

createrepo /var/www/html/repository

but i get:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 724, in ?
    main(sys.argv[1:])
  File "/usr/share/createrepo/genpkgmetadata.py", line 592, in main
    cmds, directories = parseArgs(args)
  File "/usr/share/createrepo/genpkgmetadata.py", line 431, in parseArgs
    cmds['basedir'] = os.getcwd()
 OSError: [Errno 2] No such file or directory

note the folder:

/var/www/html

exists

share|improve this question

1 Answer 1

up vote 1 down vote accepted

i found the problem os.getcwd() throws exception because as it turned the directory i was in was deleted by another process. all i needed to do was to change to a valid directory. interesting watson.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.