Skip to contentSkip to conversation

dpkg 1.15.8.7: bad interpreter when long tmpdir

PATCH Applied Robert Yang 2 participants 3 messages Jul 4, 2012 – Jul 5, 2012

lore
Share & tools
lore
#0 lore raw

cover dpkg 1.15.8.7: bad interpreter when long tmpdir

The following changes since commit a6b6df1350149c116050cb93c3c7b4802c709d31:

task-core-tools-debug: Added openssh-sftp-server. (2012-07-03 14:52:38 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/dpkg
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/dpkg

Robert Yang (1):
dpkg 1.15.8.7: bad interpreter when long tmpdir

 meta/recipes-devtools/dpkg/dpkg.inc |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
#1 lore raw

PATCH 1/1 dpkg 1.15.8.7: bad interpreter when long tmpdir

When use PACKAGE_CLASSES = "package_deb", and the length of tmpdir is longer than 177, the error occurs during the image generation:

/very/long/path/totmp/sysroots/x86_64-linux/usr/bin/dpkg-scanpackages:
bad interpreter: No such file or directory

The interpreter is perl, and it does exist, this is because the first line:

#!/very/long/path/to/perl

in the script can't be very long.

Create a wrapper for it would fix the problem.

[YOCTO #2640]

---
 meta/recipes-devtools/dpkg/dpkg.inc |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
meta/recipes-devtools/dpkg/dpkg.inc +10 -1
index 09bfbbc..7f4f620 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Package maintenance system for Debian."
 LICENSE = "GPLv2.0+"
 SECTION = "base"
 
-INC_PR = "r16"
+INC_PR = "r17"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2 \
            file://ignore_extra_fields.patch"
@@ -56,6 +56,15 @@ do_install_append () {
 	fi
 }
 
+# Create a wrapper for the perl script to avoid the "bad interpreter"
+# error when the tmpdir is longer than 150.
+do_install_append_virtclass-native () {
+	tmp=`find ${D}${bindir} -type f -exec grep -m 1 -l '#!/.*/perl-native/perl' {} \;`
+	for i in $tmp; do
+		create_wrapper $i ${STAGING_BINDIR_NATIVE}/perl-native/perl
+	done
+}
+
 PROV = "virtual/update-alternatives"
 PROV_virtclass-native = ""
 
Signature · 1 line
1.7.1
Applied
#2 lore raw
In reply to Robert Yang
Quoted 11 lines · Robert Yang

The following changes since commit a6b6df1350149c116050cb93c3c7b4802c709d31:

   task-core-tools-debug: Added openssh-sftp-server. (2012-07-03 14:52:38 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/dpkg
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/dpkg

Robert Yang (1):
dpkg 1.15.8.7: bad interpreter when long tmpdir

Quoted 10 lines
  meta/recipes-devtools/dpkg/dpkg.inc |   11 ++++++++++-
  1 files changed, 10 insertions(+), 1 deletions(-)

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Merged into OE-Core

Thanks
Sau!