Patchwork e2fsprogs: fix symlinks and work with dash

login
register
mail settings
Submitter Bernhard Reutner-Fischer
Date Dec. 23, 2010, 9:37 a.m.
Message ID <1293097031-26936-1-git-send-email-rep.dot.nop@gmail.com>
Download mbox | patch
Permalink /patch/112/
State Superseded
Delegated to: Andreas Oberritter
Headers show

Comments

Bernhard Reutner-Fischer - Dec. 23, 2010, 9:37 a.m.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
 recipes/e2fsprogs/e2fsprogs.inc |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
Andreas Oberritter - Dec. 23, 2010, 10:58 a.m.
Hello Bernhard,

On 12/23/2010 10:37 AM, Bernhard Reutner-Fischer wrote:
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
> ---
>  recipes/e2fsprogs/e2fsprogs.inc |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/recipes/e2fsprogs/e2fsprogs.inc b/recipes/e2fsprogs/e2fsprogs.inc
> index ef9aace..e400c75 100644
> --- a/recipes/e2fsprogs/e2fsprogs.inc
> +++ b/recipes/e2fsprogs/e2fsprogs.inc
> @@ -30,8 +30,8 @@ do_compile_prepend () {
>  do_install_append () {
>  
>      	oe_runmake install-libs DESTDIR=${D}
> -	ln -sf ${D}/${base_sbindir}/tune2fs findfs
> -	ln -sf ${D}/${base_sbindir}/tune2fs e2label
> +	ln -sf tune2fs ${D}${base_sbindir}/findfs
> +	ln -sf tune2fs ${D}${base_sbindir}/e2label
>  }
>  
>  do_install_append_pn-e2fsprogs () {
> @@ -43,9 +43,10 @@ do_install_append_pn-e2fsprogs () {
>  	done
>  	fsck=$(cd ${D}${base_sbindir}/ && ls -1 fsck.ext* | sed s/[^\.]*//)
>  	for e in $fsck; do
> -		rm ${D}${base_sbindir}/{fsck,mkfs}$e;
> -		ln -s ${D}${base_sbindir}/e2fsck$e.${PN}$e fsck$e.${PN}
> -		ln -s ${D}${base_sbindir}/mke2fs$e.${PN}$e mkfs$e.${PN}
> +		rm ${D}${base_sbindir}/fsck$e;
> +		rm ${D}${base_sbindir}/mkfs$e;
> +		ln -s e2fsck$e.${PN}$e ${D}${base_sbindir}/fsck$e.${PN}
> +		ln -s mke2fs$e.${PN}$e ${D}${base_sbindir}/mkfs$e.${PN}

this would create fsck.ext3.e2fsprogs -> e2fsck.ext3.e2fsprogs.ext3
etc., which is not what we want. Also, PR needs to be incremented,
because the links didn't appear in the current package.

Would you mind if I pushed the following changeset instead?

http://git.opendreambox.org/?p=obi/openembedded.git;a=commitdiff;h=d87d337f2d2693f3859de64a8b09c5b4b362abdd

Regards,
Andreas
Bernhard Reutner-Fischer - Dec. 23, 2010, 12:19 p.m.
On Thu, Dec 23, 2010 at 11:58:00AM +0100, Andreas Oberritter wrote:

>this would create fsck.ext3.e2fsprogs -> e2fsck.ext3.e2fsprogs.ext3
>etc., which is not what we want. Also, PR needs to be incremented,
>because the links didn't appear in the current package.
>
>Would you mind if I pushed the following changeset instead?
>
>http://git.opendreambox.org/?p=obi/openembedded.git;a=commitdiff;h=d87d337f2d2693f3859de64a8b09c5b4b362abdd

Sounds good.

Patch

diff --git a/recipes/e2fsprogs/e2fsprogs.inc b/recipes/e2fsprogs/e2fsprogs.inc
index ef9aace..e400c75 100644
--- a/recipes/e2fsprogs/e2fsprogs.inc
+++ b/recipes/e2fsprogs/e2fsprogs.inc
@@ -30,8 +30,8 @@  do_compile_prepend () {
 do_install_append () {
 
     	oe_runmake install-libs DESTDIR=${D}
-	ln -sf ${D}/${base_sbindir}/tune2fs findfs
-	ln -sf ${D}/${base_sbindir}/tune2fs e2label
+	ln -sf tune2fs ${D}${base_sbindir}/findfs
+	ln -sf tune2fs ${D}${base_sbindir}/e2label
 }
 
 do_install_append_pn-e2fsprogs () {
@@ -43,9 +43,10 @@  do_install_append_pn-e2fsprogs () {
 	done
 	fsck=$(cd ${D}${base_sbindir}/ && ls -1 fsck.ext* | sed s/[^\.]*//)
 	for e in $fsck; do
-		rm ${D}${base_sbindir}/{fsck,mkfs}$e;
-		ln -s ${D}${base_sbindir}/e2fsck$e.${PN}$e fsck$e.${PN}
-		ln -s ${D}${base_sbindir}/mke2fs$e.${PN}$e mkfs$e.${PN}
+		rm ${D}${base_sbindir}/fsck$e;
+		rm ${D}${base_sbindir}/mkfs$e;
+		ln -s e2fsck$e.${PN}$e ${D}${base_sbindir}/fsck$e.${PN}
+		ln -s mke2fs$e.${PN}$e ${D}${base_sbindir}/mkfs$e.${PN}
 	done
 }