Blame SOURCES/0031-fix-removal-of-cpu-machine-links-on-mingw-msys.patch

6b3c76
From d173f8fd3046732a13ecefec5ada5129b828db20 Mon Sep 17 00:00:00 2001
a85e8e
From: Andrey Borzenkov <arvidjaar@gmail.com>
a85e8e
Date: Sat, 18 Jan 2014 22:48:04 +0400
6b3c76
Subject: [PATCH 031/261] fix removal of {cpu,machine} links on mingw/msys
a85e8e
a85e8e
At least on Windows 2003 using "ln -s dir1 dir2" in msys shell succeeds,
a85e8e
but results in what looks like hard link. Subsequent "rm -f dir2" (e.g.
a85e8e
during second config.status invocation) fails. Check that we also can
a85e8e
remove link to directory.
a85e8e
a85e8e
Make it more clear in message that we are checking "ln -s".
a85e8e
---
a85e8e
 ChangeLog    | 5 +++++
a85e8e
 acinclude.m4 | 6 +++---
a85e8e
 2 files changed, 8 insertions(+), 3 deletions(-)
a85e8e
a85e8e
diff --git a/ChangeLog b/ChangeLog
6b3c76
index cff9386d3..c3bfa9fcb 100644
a85e8e
--- a/ChangeLog
a85e8e
+++ b/ChangeLog
a85e8e
@@ -1,3 +1,8 @@
a85e8e
+2014-01-18  Andrey Borzenkov <arvidjaar@gmail.com>
a85e8e
+
a85e8e
+	* acinclude.m4 (grub_CHECK_LINK_DIR): Check that we can also remove
a85e8e
+	symbolic link to directory. It fails in Msys shell on Windows 2003.
a85e8e
+
a85e8e
 2014-01-18  Vladimir Serbinenko  <phcoder@gmail.com>
a85e8e
 
a85e8e
 	* Makefile.am (default_payload.elf): Add modules
a85e8e
diff --git a/acinclude.m4 b/acinclude.m4
6b3c76
index 32d5477d1..b2bb88d83 100644
a85e8e
--- a/acinclude.m4
a85e8e
+++ b/acinclude.m4
a85e8e
@@ -418,15 +418,15 @@ else
a85e8e
 [fi]
a85e8e
 ])
a85e8e
 
a85e8e
-dnl Check if ln can handle directories properly (mingw).
a85e8e
+dnl Check if ln -s can handle directories properly (mingw).
a85e8e
 AC_DEFUN([grub_CHECK_LINK_DIR],[
a85e8e
-AC_MSG_CHECKING([whether ln can handle directories properly])
a85e8e
+AC_MSG_CHECKING([whether ln -s can handle directories properly])
a85e8e
 [mkdir testdir 2>/dev/null
a85e8e
 case $srcdir in
a85e8e
 [\\/$]* | ?:[\\/]* ) reldir=$srcdir/include/grub/util ;;
a85e8e
     *) reldir=../$srcdir/include/grub/util ;;
a85e8e
 esac
a85e8e
-if ln -s $reldir testdir/util 2>/dev/null ; then]
a85e8e
+if ln -s $reldir testdir/util 2>/dev/null && rm -f testdir/util 2>/dev/null ; then]
a85e8e
   AC_MSG_RESULT([yes])
a85e8e
   [link_dir=yes
a85e8e
 else
6b3c76
-- 
6b3c76
2.13.5
6b3c76