Bug 723490 - have to manually delete directories when lorax aborts and needs restart
Summary: have to manually delete directories when lorax aborts and needs restart
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lorax
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Gracik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-20 10:59 UTC by Karsten Hopp
Modified: 2013-07-04 12:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-20 11:31:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Karsten Hopp 2011-07-20 10:59:35 UTC
Description of problem:
lorax aborted with the following error:
  File "/usr/lib/python2.7/site-packages/pylorax/yumhelper.py", line 61, in install
    logger.error(msg.format(pattern, e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 38: ordinal not in range(128)

after setting LANG=C and starting pungi with --force, lorax aborts with a different error:
Traceback (most recent call last):
  File "/usr/bin/pungi", line 218, in <module>
    main()
  File "/usr/bin/pungi", line 122, in main
    mypungi.doBuildinstall()
  File "/usr/lib/python2.7/site-packages/pypungi/__init__.py", line 845, in doBuildinstall
    workdir=workdir, outputdir=outputdir)
  File "/usr/lib/python2.7/site-packages/pylorax/__init__.py", line 192, in run
    self.yum = yumhelper.LoraxYumHelper(ybo)
  File "/usr/lib/python2.7/site-packages/pylorax/yumhelper.py", line 47, in __init__
    os.makedirs(installroot)
  File "/usr/lib64/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/tmp/kh/work/ppc64/yumroot/installroot'


several options:
- lorax removes that directory on startup
- protect os.makedirs in lorax/LoraxYumHelper by 'try:'
- pungi passes that --force option to lorax and lorax should then do the right thing

Version-Release number of selected component (if applicable):
lorax-0.7-1.fc16


Steps to Reproduce:
1. export LANG=de_DE.UTF-8
2. run pungi -B
3. watch pungi abort and re-run it with pungi -B --force

Comment 1 Martin Gracik 2011-07-20 11:31:32 UTC
The installroot directory is not created anymore. This was changed in the new version.


Note You need to log in before you can comment on or make changes to this bug.