Skip to contentSkip to conversation

java.bbclass: Use force (-f) for ln (suggested by Marcin).

PATCH In review Marcin Juszkiewicz 3 participants 5 messages Oct 5, 2009 – Nov 5, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 java.bbclass: Use force (-f) for ln (suggested by Marcin).

From: Robert Schuster <rschus@entw2.(none)>

---
 classes/java.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
classes/java.bbclass +1 -1
index 38256d7..cacd2ce 100644
@@ -72,7 +72,7 @@ oe_jarinstall() {
       oewarn "file was in the way. removing:" $dir/$1
       rm $dir/$1
     fi
-    ln -s $destname $dir/$1
+    ln -sf $destname $dir/$1
     shift
   done
 }
Signature · 1 line
1.6.4.3
#1 lore raw
Quoted 14 lines · Marcin Juszkiewicz

From: Robert Schuster <rschus@entw2.(none)>

---
 classes/java.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
classes/java.bbclass +0 -0
index 38256d7..cacd2ce 100644

classes/java.bbclass oe_jarinstall() { · line 78

Quoted 8 lines
classes/java.bbclass +1 -1
@@ -72,7 +72,7 @@ oe_jarinstall() {
       oewarn "file was in the way. removing:" $dir/$1
       rm $dir/$1
     fi
-    ln -s $destname $dir/$1
+    ln -sf $destname $dir/$1
     shift
   done
 }

ACK

Bye Henning

#2 lore raw
In reply to Marcin Juszkiewicz

classes/java.bbclass oe_jarinstall() { · line 78

Quoted 9 lines · Marcin Juszkiewicz
classes/java.bbclass +1 -1
@@ -72,7 +72,7 @@ oe_jarinstall() {
       oewarn "file was in the way. removing:" $dir/$1
       rm $dir/$1
     fi
-    ln -s $destname $dir/$1
+    ln -sf $destname $dir/$1
     shift
   done
 }

What's the reason for the -f argument? If the target file already exists then it seems like that "rm" should already take care of it.

p.

#3 lore raw

Dnia wtorek, 6 października 2009 o 10:40:12 Phil Blundell napisał(a):

Quoted 5 lines · Marcin Juszkiewicz
Quoted 4 lines
classes/java.bbclass +0 -0
@@ -72,7 +72,7 @@ oe_jarinstall() {
       oewarn "file was in the way. removing:" $dir/$1
       rm $dir/$1
     fi
Quoted 8 lines

classes/java.bbclass oe_jarinstall() { · line 78

Quoted 5 lines
classes/java.bbclass +1 -1
-    ln -s $destname $dir/$1
+    ln -sf $destname $dir/$1
     shift
   done
 }

What's the reason for the -f argument? If the target file already exists then it seems like that "rm" should already take care of it.

There are rare moments when it does not work as it should. This was best workaround ;)

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
#4 lore raw
In reply to Phil Blundell

Dnia wtorek, 6 października 2009 o 10:40:12 Phil Blundell napisał(a):

Quoted 5 lines · Marcin Juszkiewicz
Quoted 4 lines
classes/java.bbclass +0 -0
@@ -72,7 +72,7 @@ oe_jarinstall() {
       oewarn "file was in the way. removing:" $dir/$1
       rm $dir/$1
     fi
Quoted 8 lines

classes/java.bbclass oe_jarinstall() { · line 78

Quoted 5 lines
classes/java.bbclass +1 -1
-    ln -s $destname $dir/$1
+    ln -sf $destname $dir/$1
     shift
   done
 }

What's the reason for the -f argument? If the target file already exists then it seems like that "rm" should already take care of it.

Finally debugged it. "ln -sf" was needed if $dir/$1 was broken symlink. I have better fix for that thanks to Thomas Horsten and will push it to .dev and then request for stable.

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz