Patchwork useradd.bbclass: remove hardcoded reference to /usr/bin

login
register
mail settings
Submitter Phil Blundell
Date Sept. 1, 2011, 3:03 p.m.
Message ID <1314889432.19905.189.camel@phil-desktop>
Download mbox | patch
Permalink /patch/10833/
State New, archived
Headers show

Comments

Phil Blundell - Sept. 1, 2011, 3:03 p.m.
Otherwise the class doesn't work if ${bindir} is set to a different value;
likewise for /var vs ${localstatedir}.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/classes/useradd.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Joshua Lock - Sept. 1, 2011, 3:57 p.m.
On Thu, 2011-09-01 at 16:03 +0100, Phil Blundell wrote:
> Otherwise the class doesn't work if ${bindir} is set to a different value;
> likewise for /var vs ${localstatedir}.
> 
> Signed-off-by: Phil Blundell <philb@gnu.org>

Good find!

Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
>  meta/classes/useradd.bbclass |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
> index ba8d8dc..5f5b68d 100644
> --- a/meta/classes/useradd.bbclass
> +++ b/meta/classes/useradd.bbclass
> @@ -74,8 +74,8 @@ fi
>  }
>  
>  useradd_sysroot () {
> -	export PSEUDO="${STAGING_DIR_NATIVE}/usr/bin/pseudo"
> -	export PSEUDO_LOCALSTATEDIR="${STAGING_DIR_TARGET}/var/pseudo"
> +	export PSEUDO="${STAGING_DIR_NATIVE}${bindir}/pseudo"
> +	export PSEUDO_LOCALSTATEDIR="${STAGING_DIR_TARGET}${localstatedir}/pseudo"
>  
>  	# Explicitly set $D since it isn't set to anything
>  	# before do_install
Richard Purdie - Sept. 2, 2011, 5:27 p.m.
On Thu, 2011-09-01 at 16:03 +0100, Phil Blundell wrote:
> Otherwise the class doesn't work if ${bindir} is set to a different value;
> likewise for /var vs ${localstatedir}.
> 
> Signed-off-by: Phil Blundell <philb@gnu.org>
> ---
>  meta/classes/useradd.bbclass |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index ba8d8dc..5f5b68d 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -74,8 +74,8 @@  fi
 }
 
 useradd_sysroot () {
-	export PSEUDO="${STAGING_DIR_NATIVE}/usr/bin/pseudo"
-	export PSEUDO_LOCALSTATEDIR="${STAGING_DIR_TARGET}/var/pseudo"
+	export PSEUDO="${STAGING_DIR_NATIVE}${bindir}/pseudo"
+	export PSEUDO_LOCALSTATEDIR="${STAGING_DIR_TARGET}${localstatedir}/pseudo"
 
 	# Explicitly set $D since it isn't set to anything
 	# before do_install