Bug 1124536

Summary: file /media from install of filesystem-3.2-28.fc22.x86_64 conflicts with file from package filesystem-3.2-26.fc21.x86_64
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: filesystemAssignee: Ondrej Vasik <ovasik>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: floeris.valkonet, michal, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-30 12:37:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miro Hrončok 2014-07-29 17:52:27 UTC
Description of problem:
When I try to use mock from fedpkg on master branch, I get the following error:


ERROR: Command failed: 
 # ['/usr/bin/yum', '--installroot', '/var/lib/mock/fedora-rawhide-x86_64/root/', '--releasever', '21', 'update']
Not using downloaded repomd.xml because it is older than what we have:
  Current   : Tue Jul 29 11:52:56 2014
  Downloaded: Wed Jul  9 11:57:00 2014
file:///tmp/repo/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /tmp/repo/repodata/repomd.xml"
Trying other mirror.

================================================================================
 Package                Arch     Version                         Repository
                                                                           Size
================================================================================
Updating:
...snip...

Transaction Summary
================================================================================
Upgrade  98 Packages

Total size: 90 M
Transaction couldn't start:
file /media from install of filesystem-3.2-28.fc22.x86_64 conflicts with file from package filesystem-3.2-26.fc21.x86_64


Version-Release number of selected component (if applicable):
filesystem-3.2-28.fc22

Comment 1 Michal Jaegermann 2014-07-29 23:45:48 UTC
The situation is even worse.  As a new package attempts to replace /media directory with a symlink to /run/media if you try to "force" an update it fails on a rename in cpio unpacking a new layout.  This will make upgrading existing installations quite difficult.

Maybe this could be done in steps.  As F20 and F21 do not really seem to use /media for anything then maybe it would be possible to issue an update to a 'filesystem' package with
/media just removed (and possibly replaced by a symlink in a %post script).  Once such update is in place then the next update could correct this to a desired state.  Not perfect but substantially better than the current mess.

Comment 2 Ondrej Vasik 2014-07-30 12:37:01 UTC
Well, replacing is documented in Packaging guidelines (lua scriptlet in %pre - https://fedoraproject.org/wiki/Packaging:Directory_Replacement ) - so I did that this way in filesystem-3.2-29.fc22 - unfortunately -28 was already built incorrectly in rawhide - sorry for that. Update running fine was confirmed for 3.2-29.fc22 - so closing RAWHIDE.

(please note, to be on safe side now, update creates toplevel /media.rpmmoved directory to prevent accidental data.loss/failures for cases where /media were used for something)