Skip to contentSkip to conversation

mtools: fix broken /usr/bin/lz

PATCH Superseded [email protected] 2 participants 3 messages Oct 15, 2014 – Oct 16, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtools: fix broken /usr/bin/lz

From: Wenlin Kang <[email protected]>

When build fs with mtools-3.9.9, has file /usr/bin/lz in rootfs, it is the symlink to uz:

root@qemu3:~# /usr/bin/lz
-sh: /usr/bin/lz: No such file or directory
$root@qemu3:~# ls -l /usr/bin/lz
lrwxrwxrwx 1 root root 2 Jul 18 18:07 /usr/bin/lz -> uz
root@qemu3:~# uz
-sh: uz: command not found

But the uz isn't actually exist, so the result is that lz is a broken symlink.

The root cause is that uz hasn't been installed when install-scripts.

---
 meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch | 16 ++++++++++++++++
 meta/recipes-devtools/mtools/mtools_3.9.9.bb            |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch
meta/recipes-devtools/mtools/mtools/fix-broken-lz.patch new file +16 -0
new file mode 100644
index 0000000..eaa3a5f
@@ -0,0 +1,16 @@
+Upstream-Status: Backport
+
+Signed-off-by: Wenlin Kang <[email protected]>
+
+diff -uarN mtools-3.9.9-org/Makefile.in mtools-3.9.9/Makefile.in
+--- mtools-3.9.9-org/Makefile.in	2014-08-05 16:10:25.782241173 +0800
++++ mtools-3.9.9/Makefile.in	2014-08-05 16:11:30.864155951 +0800
+@@ -250,7 +250,7 @@
+ install-scripts: ${DESTDIR}$(bindir)/mtools
+ 	@$(top_srcdir)/mkinstalldirs ${DESTDIR}$(bindir)
+ 	@for j in $(SCRIPTS) ; do \
+-		$(INSTALL_SCRIPT) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
++		$(INSTALL_PROGRAM) $(srcdir)/scripts/$$j ${DESTDIR}$(bindir)/$$j ; \
+ 		echo ${DESTDIR}$(bindir)/$$j ; \
+ 	done
+ 	rm -f ${DESTDIR}$(bindir)/lz
meta/recipes-devtools/mtools/mtools_3.9.9.bb +3 -1
index d995c8f..f6dd336 100644
@@ -31,7 +31,9 @@ RRECOMMENDS_${PN} = "\
 SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/mtools-${PV}.tar.gz \
 	file://mtools-makeinfo.patch \
 	file://mtools.patch \
-	file://no-x11.patch"
+	file://no-x11.patch \
+	file://fix-broken-lz.patch \
+"
 
 SRC_URI[md5sum] = "3e68b857b4e1f3a6521d1dfefbd30a36"
 SRC_URI[sha256sum] = "af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e"
Signature · 1 line
2.0.0
#1 lore raw
Quoted 2 lines · On 15 October 2014 10:28, <[email protected]> wrote:
+-              $(INSTALL_SCRIPT) $(srcdir)/scripts/$j ${DESTDIR}$(bindir)/$j ; \
++              $(INSTALL_PROGRAM) $(srcdir)/scripts/$j ${DESTDIR}$(bindir)/$j ; \

Maybe you meant to install both scripts and programs:

$ buildhistory-diff
packages/corei7-64-poky-linux/mtools/mtools: FILELIST: removed
"/usr/bin/tgz.tgz" added "/usr/bin/mcomp /usr/bin/mcheck
/usr/bin/mxtar /usr/bin/uz /usr/bin/tgz"
packages/corei7-64-poky-linux/mtools/mtools: PKGR changed from r6.0 to r6.1
packages/corei7-64-poky-linux/mtools/mtools: PKGSIZE changed from
954588 to 180302 (-81%)
  * FILELIST: removed "/usr/bin/tgz.tgz" added "/usr/bin/mcomp
/usr/bin/mcheck /usr/bin/mxtar /usr/bin/uz /usr/bin/tgz"

This patch means /usr/bin/tgz.tgz isn't shipped anymore.

Ross

#2 lore raw
Quoted 9 lines

-----Original Message-----
From: Burton, Ross [mailto:[email protected]]
Sent: Wednesday, October 15, 2014 6:26 PM
To: Huang, Jie (Jackie)
Cc: OE-core
Subject: Re: [OE-core] [PATCH] mtools: fix broken /usr/bin/lz

Quoted 6 lines
Quoted 3 lines · On 15 October 2014 10:28, <[email protected]> wrote:
+-              $(INSTALL_SCRIPT) $(srcdir)/scripts/$j ${DESTDIR}$(bindir)/$j ; \
++              $(INSTALL_PROGRAM) $(srcdir)/scripts/$j

++ ${DESTDIR}$(bindir)/$j ; \

Maybe you meant to install both scripts and programs:

Yes, thanks for pointing out, the expected results should be:

$ buildhistory-diff 
packages/core2-64-poky-linux/mtools/mtools: FILELIST: added "/usr/bin/mcomp /usr/bin/mcheck /usr/bin/mxtar /usr/bin/uz /usr/bin/tgz"

I will send v2 for this.

Thanks,
Jackie

Quoted 13 lines
$ buildhistory-diff
packages/corei7-64-poky-linux/mtools/mtools: FILELIST: removed "/usr/bin/tgz.tgz" added
"/usr/bin/mcomp /usr/bin/mcheck /usr/bin/mxtar /usr/bin/uz /usr/bin/tgz"
packages/corei7-64-poky-linux/mtools/mtools: PKGR changed from r6.0 to r6.1
packages/corei7-64-poky-linux/mtools/mtools: PKGSIZE changed from
954588 to 180302 (-81%)
  * FILELIST: removed "/usr/bin/tgz.tgz" added "/usr/bin/mcomp /usr/bin/mcheck /usr/bin/mxtar
/usr/bin/uz /usr/bin/tgz"

This patch means /usr/bin/tgz.tgz isn't shipped anymore.

Ross