Bug 758781 - buildsrpm errors with symlink dangling (patch included)
Summary: buildsrpm errors with symlink dangling (patch included)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 16
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-30 17:32 UTC by alfred
Modified: 2012-02-24 23:41 UTC (History)
3 users (show)

Fixed In Version: mock-1.0.28-1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-22 05:24:52 UTC
Type: ---


Attachments (Terms of Use)
Patch against mockbuild/backend.py that resolves the issue. (1.10 KB, patch)
2011-11-30 17:32 UTC, alfred
no flags Details | Diff

Description alfred 2011-11-30 17:32:47 UTC
Created attachment 538663 [details]
Patch against mockbuild/backend.py that resolves the issue.

Description of problem:
I'm using mock 1.1.16 on F16, and using SCM integration.  The package I'm working with, when first checked out, has a dangling symlink (ie, a symlink whose target is not present) that is later used in its build process.  I ran into 2 issues with this:
1) in mockbuild/backend.py, function buildsrpm, the os.rmdir and shutil.copytree functions throw exceptions.  I've resolved this by replacing os.rmdir with mockbuild.util.rmtree, and adding the 'symlinks=True' option to shutil.copytree.

2) This took longer to track down that necessary, as the exceptions thrown by os.rmdir were being eaten by the extra try,except clause embedded in buildsrpm's finally clause.

Version-Release number of selected component (if applicable):
mock 1.1.6

How reproducible:
easy!

Steps to Reproduce:
1. Create an SCM package whose SCM contents include a symlink whose target is missing.
2. Use mock to try and build the package.
  
Actual results:
Mock will give an error stating 'No package specified to rebuild command', coming from do_rebuild.  

Expected results:
the scm should build.

Additional info:

Comment 1 Clark Williams 2011-11-30 21:03:50 UTC
Added Marko to the CC (since he's Mr SCM :)). 

The patch looks good, I'll look at adding this to the next release.

Comment 2 Marko Myllynen 2011-12-01 07:12:54 UTC
Yup, the patch looks good, thanks!

Comment 3 Clark Williams 2012-01-02 16:38:08 UTC
Added to my work branch, will be there in next release.

Comment 4 Fedora Update System 2012-01-13 20:18:33 UTC
mock-1.1.19-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.19-1.el6

Comment 5 Fedora Update System 2012-01-13 20:19:09 UTC
mock-1.1.19-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.19-1.fc16

Comment 6 Fedora Update System 2012-01-13 20:19:41 UTC
mock-1.0.26-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.26-1.el5

Comment 7 Fedora Update System 2012-01-13 20:20:12 UTC
mock-1.1.19-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.19-1.fc15

Comment 8 Fedora Update System 2012-01-14 19:29:53 UTC
mock-1.1.19-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.19-2.fc15

Comment 9 Fedora Update System 2012-01-14 19:30:33 UTC
mock-1.1.19-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.19-2.el6

Comment 10 Fedora Update System 2012-01-14 19:31:05 UTC
mock-1.0.26-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.26-2.el5

Comment 11 Fedora Update System 2012-01-14 19:31:41 UTC
mock-1.1.19-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.19-2.fc16

Comment 12 Fedora Update System 2012-01-15 23:26:08 UTC
Package mock-1.1.19-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.1.19-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-0134/mock-1.1.19-2.el6
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2012-01-22 05:24:52 UTC
mock-1.1.19-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2012-02-01 16:45:28 UTC
mock-1.1.20-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.20-1.fc15

Comment 15 Fedora Update System 2012-02-01 16:46:22 UTC
mock-1.1.20-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.20-1.el6

Comment 16 Fedora Update System 2012-02-01 16:47:08 UTC
mock-1.1.20-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.20-1.fc16

Comment 17 Fedora Update System 2012-02-01 16:47:58 UTC
mock-1.0.27-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.27-2.el5

Comment 18 Fedora Update System 2012-02-08 22:57:34 UTC
mock-1.1.20-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2012-02-09 02:22:07 UTC
mock-1.1.21-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.21-1.fc15

Comment 20 Fedora Update System 2012-02-09 02:22:51 UTC
mock-1.1.21-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.21-1.el6

Comment 21 Fedora Update System 2012-02-09 02:23:35 UTC
mock-1.0.28-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.28-1.el5

Comment 22 Fedora Update System 2012-02-09 02:24:18 UTC
mock-1.1.21-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.21-1.fc16

Comment 23 Fedora Update System 2012-02-15 23:56:12 UTC
mock-1.1.21-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2012-02-19 02:00:25 UTC
mock-1.1.21-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2012-02-24 23:37:32 UTC
mock-1.1.21-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2012-02-24 23:41:03 UTC
mock-1.0.28-1.el5 has been pushed to the Fedora EPEL 5 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.