Bug 52099 - makedepend rename fails on CIFS mounted shares
Summary: makedepend rename fails on CIFS mounted shares
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/other (show other bugs)
Version: 7.7 (2012.06)
Hardware: Other All
: medium normal
Assignee: Alan Coopersmith
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-07-14 20:11 UTC by Glenn Burkhardt
Modified: 2013-01-19 16:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch for rename bug on CIFS mounted shares. (1.50 KB, patch)
2012-07-14 20:11 UTC, Glenn Burkhardt
no flags Details | Splinter Review

Description Glenn Burkhardt 2012-07-14 20:11:56 UTC
Created attachment 64218 [details] [review]
patch for rename bug on CIFS mounted shares.

When a filesystem is mounted with 'smbfs', or as a shared folder in VirtualBox, and the filesystem host is a Windows system, 'makedepend' will fail when it tries to rename the target makefile. It's been recognized that this operation doesn't work, for there is conditional code to handle it when the target OS is WIN32, UNIXOS2, or CYGWIN. The problem is that if the program has opened the 'makefile', and has an active file descriptor to the file, the 'rename()' function won't work.

A modest rewrite of the code will allow it to work for all OS's, and avoid the conditional code. The check for file exists can be made by handing the return from 'stat()' in the case when "-f" has specified the 'makefile'.

Please see attached patch.
Comment 1 Alan Coopersmith 2013-01-12 06:32:10 UTC
Thanks.   I've tweaked the patch a little, so that if the file isn't readable
we don't leave it under the backup name but move it back to the original name,
and posted it to xorg-devel for review:

http://patchwork.freedesktop.org/patch/12843/
Comment 2 Alan Coopersmith 2013-01-19 16:27:14 UTC
Thanks, revised patch has been pushed to git master for the next release:
http://cgit.freedesktop.org/xorg/util/makedepend/commit/?id=059e9be5a7321974b190d786d426b2ae27be8c56


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.