Bug 242162 - os.symlink('../yum.conf', os.path.join(yumdir, 'yum.conf')) fails : File exists
Summary: os.symlink('../yum.conf', os.path.join(yumdir, 'yum.conf')) fails : File exists
Status: CLOSED ERRATA
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock
Version: unspecified
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Keywords:
: 242167 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-01 21:40 UTC by Philippe Valembois
Modified: 2013-01-10 04:19 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-06-21 20:04:32 UTC


Attachments (Terms of Use)
mock-autocache.patch (763 bytes, patch)
2007-06-05 10:47 UTC, Mark McLoughlin
no flags Details | Diff

Description Philippe Valembois 2007-06-01 21:40:22 UTC
Description of problem:
When using cache, preping install fails because of yum.conf symlink already
present in cache tree

Version-Release number of selected component (if applicable):
rpm -q mock
mock-0.6.12-1.fc7

How reproducible:
Always

Steps to Reproduce:
1. Create a mock cache like said in MockTricks
2. Try to build a package
3.
  
Actual results:
Traceback (most recent call last):
  File "/usr/bin/mock", line 1046, in <module>
    main()
  File "/usr/bin/mock", line 1043, in main
    do_rebuild(config_opts, srpms)
  File "/usr/bin/mock", line 910, in do_rebuild
    my.prep()
  File "/usr/bin/mock", line 254, in prep
    self._prep_install()
  File "/usr/bin/mock", line 659, in _prep_install
    os.symlink('../yum.conf', os.path.join(yumdir, 'yum.conf'))
OSError: [Errno 17] File exists


Expected results:
Building of the package

Additional info:
A if os.path.exists should be done over the symlink path like it is done for
regular file yum.conf and devices above
Current workaround is to edit the cache to remove the symlink each time the
cache is generated.

Comment 1 Julian Sikorski 2007-06-03 00:38:13 UTC
*** Bug 242167 has been marked as a duplicate of this bug. ***

Comment 2 Mark McLoughlin 2007-06-05 10:47:43 UTC
Created attachment 156200 [details]
mock-autocache.patch

Simple patch to fix this

Comment 3 Wart 2007-06-08 15:21:38 UTC
This patch fixes the problem for me.

Comment 4 Fedora Update System 2007-06-14 21:12:29 UTC
mock-0.7.1-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Philippe Valembois 2007-06-17 12:33:46 UTC
Works for me but added another trouble related to koji
I fill a separate bug

Comment 6 Fedora Update System 2007-06-21 20:04:07 UTC
mock-0.7.1-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.


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