Bug 840119 - Spec file creates broken symlink
Summary: Spec file creates broken symlink
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-actionpack
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mo Morsi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-13 19:06 UTC by John Eckersberg
Modified: 2012-08-01 06:28 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-01 06:28:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to remove unneeded symlink logic (686 bytes, patch)
2012-07-13 19:06 UTC, John Eckersberg
no flags Details | Diff

Description John Eckersberg 2012-07-13 19:06:10 UTC
Created attachment 598151 [details]
Patch to remove unneeded symlink logic

Description of problem:

File usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/test/fixtures/symlink_parent/symlink_parent is a dangling symlink (to ../../symlink_parent/)

Version-Release number of selected component (if applicable):
rubygem-actionpack-3.0.15-1.fc18.noarch

How reproducible:
Always

Steps to Reproduce:
1. wget http://kojipkgs.fedoraproject.org//packages/rubygem-actionpack/3.0.15/1.fc18/noarch/rubygem-actionpack-3.0.15-1.fc18.noarch.rpm
2. rpmdev-extract rubygem-actionpack-3.0.15-1.fc18.noarch.rpm
3. ls -l rubygem-actionpack-3.0.15-1.fc18.noarch/usr/share/gems/gems/actionpack-3.0.15/test/fixtures/symlink_parent/symlink_parent
  
Actual results:
Broken symlink

Expected results:
No broken symlink

Additional info:
It looks like the original symlink was probably absent at some point in the past (test/fixtures/layout_tests/layouts/symlinked) which caused it to get added to the RPM spec.  But when the link got fixed upstream, it caused the spec file to *follow* the corrected symlink and create the broken link inside of the *target* of the original.

End result, it looks like the symlink can just go away from the spec and everything is fine.  Attaching a patch for that.

Comment 1 Bohuslav "Slavek" Kabrda 2012-07-31 10:09:15 UTC
This file is needed for a unit test (note that it's present in the "test/fixtures" directory), that tests behaviour when using broken symlinks. The symlink is therefore broken on purpose, this is expected.

I'm closing this as NOTABUG.

Comment 2 John Eckersberg 2012-07-31 14:19:52 UTC
What unit test are you referring to?

I see tests that verify a valid symlink is correctly followed (LayoutSymlinkedTest/LayoutSymlinkedIsRenderedTest).

I do not see any tests that check for broken symlinks.

If you apply the attached patch and run the tests, all of the tests still pass.

Comment 3 Bohuslav "Slavek" Kabrda 2012-08-01 06:12:48 UTC
Ah, sorry you are right. It seems that the symlink was added to the specfile when actionpack was being updated to 2.3.4 (dist-git commit hash f3870f6).

As you say, the symlink is not needed, I will fix this in Rawhide, I don't think it's necessary to fix this issue in lower Fedoras, as it doesn't cause any problems.


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