Skip to contentSkip to conversation

oracle-jse-jdk: Don't use ${D} installing symlink target

PATCH Applied Kyle Russell 3 participants 3 messages Dec 2, 2015 – Dec 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 oracle-jse-jdk: Don't use ${D} installing symlink target

When installed to the sysroot, this makes the symlink point to the workdir, which is invalid in the sstate package. Since we cd to ${D} before creating the symlink, this ensures the link is created in the correct install location, so just point the link to the final target so that the patch is correctly fixed up during populate_sysroot.

---
 recipes-devtools/oracle-java/oracle-jse-jdk.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-devtools/oracle-java/oracle-jse-jdk.inc +1 -1
index 54e83b8..6f13125 100644
@@ -16,7 +16,7 @@ do_install_class-native() {
     install -d -m 0755 ${D}${bindir}
     cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE} ${D}${libdir}/
     for prog in java javac; do
-	( cd ${D}${bindir} && ln -sf ${D}${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin/$prog )
+	( cd ${D}${bindir} && ln -sf ${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin/$prog )
     done
 
     ( cd ${D}${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin ; \
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 5 lines · Kyle Russell

When installed to the sysroot, this makes the symlink point to the workdir, which is invalid in the sstate package. Since we cd to ${D} before creating the symlink, this ensures the link is created in the correct install location, so just point the link to the final target so that the patch is correctly fixed up during populate_sysroot.

Looks good to me: Acked-by: Bruce Ashfield <[email protected]>

Quoted 20 lines
---
  recipes-devtools/oracle-java/oracle-jse-jdk.inc |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
recipes-devtools/oracle-java/oracle-jse-jdk.inc +1 -1
index 54e83b8..6f13125 100644
@@ -16,7 +16,7 @@ do_install_class-native() {
      install -d -m 0755 ${D}${bindir}
      cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE} ${D}${libdir}/
      for prog in java javac; do
-	( cd ${D}${bindir} && ln -sf ${D}${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin/$prog )
+	( cd ${D}${bindir} && ln -sf ${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin/$prog )
      done
 
      ( cd ${D}${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin ; \
#2 lore raw
In reply to Kyle Russell

Hi,

Quoted 26 lines · Kyle Russell

When installed to the sysroot, this makes the symlink point to the workdir, which is invalid in the sstate package. Since we cd to ${D} before creating the symlink, this ensures the link is created in the correct install location, so just point the link to the final target so that the patch is correctly fixed up during populate_sysroot.

---
 recipes-devtools/oracle-java/oracle-jse-jdk.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-devtools/oracle-java/oracle-jse-jdk.inc +1 -1
index 54e83b8..6f13125 100644
@@ -16,7 +16,7 @@ do_install_class-native() {
     install -d -m 0755 ${D}${bindir}
     cp -a ${S}/${JDK_JRE}${PV}_${PV_UPDATE} ${D}${libdir}/
     for prog in java javac; do
-	( cd ${D}${bindir} && ln -sf ${D}${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin/$prog )
+	( cd ${D}${bindir} && ln -sf ${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin/$prog )
     done
 
     ( cd ${D}${libdir}/${JDK_JRE}${PV}_${PV_UPDATE}/bin ; \
Signature · 1 line
1.7.9.5

Pushed to master. Thanks, Kyle Russell and Bruce.

Best Regards,
Maxin