summaryrefslogtreecommitdiff
path: root/recipes-devtools
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-09-08 14:32:32 -0500
committerJohn Klug <john.klug@multitech.com>2020-09-08 14:32:32 -0500
commit980113d462a2697f105ad13cd5c8700276c4c5db (patch)
tree53845da25aa3b17f10269949a4cf2b67094a9a28 /recipes-devtools
parent4c85e1bd74442ea03f9b2fe9e28d15752c976b85 (diff)
downloadmeta-mlinux-980113d462a2697f105ad13cd5c8700276c4c5db.tar.gz
meta-mlinux-980113d462a2697f105ad13cd5c8700276c4c5db.tar.bz2
meta-mlinux-980113d462a2697f105ad13cd5c8700276c4c5db.zip
Fix opkg to follow symlinks, otherwise /etc/modprobe.d is broken, and maybe more
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/opkg/files/0004-opkg-symlink.patch24
-rw-r--r--recipes-devtools/opkg/opkg_%.bbappend3
2 files changed, 26 insertions, 1 deletions
diff --git a/recipes-devtools/opkg/files/0004-opkg-symlink.patch b/recipes-devtools/opkg/files/0004-opkg-symlink.patch
new file mode 100644
index 0000000..e105a8f
--- /dev/null
+++ b/recipes-devtools/opkg/files/0004-opkg-symlink.patch
@@ -0,0 +1,24 @@
+opkg refused to install when a symlink was in a path.
+Have it follow symlinks when installing.
+===================================================================
+diff -Naru orig/libopkg/opkg_install.c new/libopkg/opkg_install.c
+--- orig/libopkg/opkg_install.c 2020-09-08 14:08:55.550694837 -0500
++++ new/libopkg/opkg_install.c 2020-09-08 14:18:00.286678711 -0500
+@@ -443,6 +443,17 @@
+ pkg_t *obs;
+ int existing_is_dir = file_is_dir(filename);
+
++ /* Existing patch might be a symlink, and still be OK */
++ if ((!existing_is_dir) && S_ISDIR(file_info->mode)) {
++ int rslt;
++ struct stat sbuf;
++
++ /* Use stat to follow a symlink */
++ rslt = stat(filename,&sbuf);
++ if((!rslt) && S_ISDIR(sbuf.st_mode))
++ existing_is_dir = 1; /* file_is_dir was wrong */
++ }
++
+ /* OK if both the existing file and new file are directories. */
+ if (existing_is_dir && S_ISDIR(file_info->mode)) {
+ continue;
diff --git a/recipes-devtools/opkg/opkg_%.bbappend b/recipes-devtools/opkg/opkg_%.bbappend
index 7b45903..7db3ade 100644
--- a/recipes-devtools/opkg/opkg_%.bbappend
+++ b/recipes-devtools/opkg/opkg_%.bbappend
@@ -1,6 +1,7 @@
-PR .= ".mlinux1"
+PR .= ".mlinux2"
SRC_URI += " file://0003-opkg_conf-create-opkg.lock-in-run-lock-instead-of-run.patch \
+ file://0004-opkg-symlink.patch \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"