Patchwork [2/2] screen: add pkg_postinst to register entry to /etc/shells

login
register
mail settings
Submitter Ming Liu
Date Oct. 16, 2013, 9:58 a.m.
Message ID <1381917496-28055-2-git-send-email-ming.liu@windriver.com>
Download mbox | patch
Permalink /patch/60007/
State New
Headers show

Comments

Ming Liu - Oct. 16, 2013, 9:58 a.m.
Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
 meta/recipes-extended/screen/screen_4.0.3.bb | 5 +++++
 1 file changed, 5 insertions(+)
Saul Wold - Oct. 16, 2013, 6:33 p.m.
On 10/16/2013 02:58 AM, Ming Liu wrote:
> Signed-off-by: Ming Liu <ming.liu@windriver.com>
> ---
>   meta/recipes-extended/screen/screen_4.0.3.bb | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
> index 1a7eb20..456f970 100644
> --- a/meta/recipes-extended/screen/screen_4.0.3.bb
> +++ b/meta/recipes-extended/screen/screen_4.0.3.bb
> @@ -41,3 +41,8 @@ do_install_append () {
>   		fi
>   	done
>   }
> +
> +pkg_postinst_${PN} () {
> +        touch $D${sysconfdir}/shells
> +        grep -q "usr/bin/screen" $D${sysconfdir}/shells || echo /usr/bin/screen >> $D${sysconfdir}/shells
> +}
>
should you be using ${bindir} here instead of usr/bin? since it's 
possible to have different ${prefix}.

Sau!
Ming Liu - Oct. 17, 2013, 1:20 a.m.
On 10/17/2013 02:33 AM, Saul Wold wrote:
> On 10/16/2013 02:58 AM, Ming Liu wrote:
>> Signed-off-by: Ming Liu <ming.liu@windriver.com>
>> ---
>>   meta/recipes-extended/screen/screen_4.0.3.bb | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb 
>> b/meta/recipes-extended/screen/screen_4.0.3.bb
>> index 1a7eb20..456f970 100644
>> --- a/meta/recipes-extended/screen/screen_4.0.3.bb
>> +++ b/meta/recipes-extended/screen/screen_4.0.3.bb
>> @@ -41,3 +41,8 @@ do_install_append () {
>>           fi
>>       done
>>   }
>> +
>> +pkg_postinst_${PN} () {
>> +        touch $D${sysconfdir}/shells
>> +        grep -q "usr/bin/screen" $D${sysconfdir}/shells || echo 
>> /usr/bin/screen >> $D${sysconfdir}/shells
>> +}
>>
> should you be using ${bindir} here instead of usr/bin? since it's 
> possible to have different ${prefix}.

Yes, you are correct, I will send the V1.

//Ming
>
> Sau!
>
>
>

Patch

diff --git a/meta/recipes-extended/screen/screen_4.0.3.bb b/meta/recipes-extended/screen/screen_4.0.3.bb
index 1a7eb20..456f970 100644
--- a/meta/recipes-extended/screen/screen_4.0.3.bb
+++ b/meta/recipes-extended/screen/screen_4.0.3.bb
@@ -41,3 +41,8 @@  do_install_append () {
 		fi
 	done
 }
+
+pkg_postinst_${PN} () {
+        touch $D${sysconfdir}/shells
+        grep -q "usr/bin/screen" $D${sysconfdir}/shells || echo /usr/bin/screen >> $D${sysconfdir}/shells
+}