dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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