All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] util-linux-ng: fix readprofile update-alternatives vs busybox
@ 2010-09-09 20:48 Eric Bénard
  2010-09-10 20:40 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Bénard @ 2010-09-09 20:48 UTC (permalink / raw)
  To: openembedded-devel

* util-linux-ng installs readprofile in /sbin, busybox installs
it in /usr/sbin which tiggers the following log when configuring
the package :
Configuring util-linux-ng-readprofile.
update-alternatives: Error: cannot register alternative readprofile to
/sbin/readprofile since it is already registered to /usr/sbin/readprofile
Collected errors:
 * pkg_run_script: postinst script returned status 1.
 * opkg_configure: util-linux-ng-readprofile.postinst returned 1.

* the fix is to have util-linux-ng install readprofile in /usr/sbin

* this patch fix http://bugs.openembedded.org/show_bug.cgi?id=5474 as
suggested by Tom Rini

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 recipes/util-linux-ng/util-linux-ng.inc |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/recipes/util-linux-ng/util-linux-ng.inc b/recipes/util-linux-ng/util-linux-ng.inc
index cbdf68d..ca0790e 100644
--- a/recipes/util-linux-ng/util-linux-ng.inc
+++ b/recipes/util-linux-ng/util-linux-ng.inc
@@ -8,7 +8,7 @@ inherit autotools gettext
 
 DEFAULT_PREFERENCE = "-1"
 
-INC_PR = "r27"
+INC_PR = "r28"
 
 # allows for a release candidate
 RC ?= ""
@@ -51,7 +51,7 @@ FILES_util-linux-ng-losetup = "${base_sbindir}/losetup.${PN}"
 FILES_util-linux-ng-mount = "${base_bindir}/mount.${PN} ${sysconfdir}/default/mountall"
 FILES_util-linux-ng-umount = "${base_bindir}/umount.${PN}"
 # Moved to ${base_sbindir} by do_install:
-FILES_util-linux-ng-readprofile = "${base_sbindir}/readprofile.${PN}"
+FILES_util-linux-ng-readprofile = "${sbindir}/readprofile.${PN}"
 FILES_util-linux-ng-fsck = "${base_sbindir}/fsck.${PN}"
 FILES_util-linux-ng-blkid = "${base_sbindir}/blkid.${PN}"
 FILES_${PN}-mountall = "${sysconfdir}/default/mountall.${PN}"
@@ -124,8 +124,9 @@ do_install () {
 	mkdir -p ${D}${base_bindir}
 
         sbinprogs="agetty blockdev ctrlaltdel cfdisk"
-        sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile fsck blkid vigr vipw"
+        sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk fsck blkid vigr vipw"
         usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt"
+        usrsbinprogs_a="readprofile"
         binprogs_a="dmesg kill more umount mount login reset"
 
         if [ "${base_sbindir}" != "${sbindir}" ]; then
@@ -152,6 +153,12 @@ do_install () {
                 fi
         done
 
+        for p in $usrsbinprogs_a; do
+                if [ -f "${D}${sbindir}/$p" ]; then
+                        mv "${D}${sbindir}/$p" "${D}${sbindir}/$p.${PN}"
+                fi
+        done
+
         for p in $binprogs_a; do
                 if [ -f "${D}${base_bindir}/$p" ]; then
                         mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}"
@@ -271,7 +278,7 @@ pkg_prerm_util-linux-ng-swaponoff () {
 }
 
 pkg_postinst_util-linux-ng-readprofile() {
-    update-alternatives --install ${base_sbindir}/readprofile readprofile readprofile.${PN} 100
+    update-alternatives --install ${sbindir}/readprofile readprofile readprofile.${PN} 100
 }
 
 pkg_prerm_util-linux-ng-readprofile () {
-- 
1.6.3.3




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] util-linux-ng: fix readprofile update-alternatives vs busybox
  2010-09-09 20:48 [PATCH] util-linux-ng: fix readprofile update-alternatives vs busybox Eric Bénard
@ 2010-09-10 20:40 ` Tom Rini
  2010-09-10 20:49   ` Philip Balister
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2010-09-10 20:40 UTC (permalink / raw)
  To: openembedded-devel

Eric Bénard wrote:
> * util-linux-ng installs readprofile in /sbin, busybox installs
> it in /usr/sbin which tiggers the following log when configuring
> the package :
> Configuring util-linux-ng-readprofile.
> update-alternatives: Error: cannot register alternative readprofile to
> /sbin/readprofile since it is already registered to /usr/sbin/readprofile
> Collected errors:
>  * pkg_run_script: postinst script returned status 1.
>  * opkg_configure: util-linux-ng-readprofile.postinst returned 1.
> 
> * the fix is to have util-linux-ng install readprofile in /usr/sbin
> 
> * this patch fix http://bugs.openembedded.org/show_bug.cgi?id=5474 as
> suggested by Tom Rini
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>

Signed-off-by: Tom Rini <tom_rini@mentor.com>

> ---
>  recipes/util-linux-ng/util-linux-ng.inc |   15 +++++++++++----
>  1 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/recipes/util-linux-ng/util-linux-ng.inc b/recipes/util-linux-ng/util-linux-ng.inc
> index cbdf68d..ca0790e 100644
> --- a/recipes/util-linux-ng/util-linux-ng.inc
> +++ b/recipes/util-linux-ng/util-linux-ng.inc
> @@ -8,7 +8,7 @@ inherit autotools gettext
>  
>  DEFAULT_PREFERENCE = "-1"
>  
> -INC_PR = "r27"
> +INC_PR = "r28"
>  
>  # allows for a release candidate
>  RC ?= ""
> @@ -51,7 +51,7 @@ FILES_util-linux-ng-losetup = "${base_sbindir}/losetup.${PN}"
>  FILES_util-linux-ng-mount = "${base_bindir}/mount.${PN} ${sysconfdir}/default/mountall"
>  FILES_util-linux-ng-umount = "${base_bindir}/umount.${PN}"
>  # Moved to ${base_sbindir} by do_install:
> -FILES_util-linux-ng-readprofile = "${base_sbindir}/readprofile.${PN}"
> +FILES_util-linux-ng-readprofile = "${sbindir}/readprofile.${PN}"
>  FILES_util-linux-ng-fsck = "${base_sbindir}/fsck.${PN}"
>  FILES_util-linux-ng-blkid = "${base_sbindir}/blkid.${PN}"
>  FILES_${PN}-mountall = "${sysconfdir}/default/mountall.${PN}"
> @@ -124,8 +124,9 @@ do_install () {
>  	mkdir -p ${D}${base_bindir}
>  
>          sbinprogs="agetty blockdev ctrlaltdel cfdisk"
> -        sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile fsck blkid vigr vipw"
> +        sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk fsck blkid vigr vipw"
>          usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt"
> +        usrsbinprogs_a="readprofile"
>          binprogs_a="dmesg kill more umount mount login reset"
>  
>          if [ "${base_sbindir}" != "${sbindir}" ]; then
> @@ -152,6 +153,12 @@ do_install () {
>                  fi
>          done
>  
> +        for p in $usrsbinprogs_a; do
> +                if [ -f "${D}${sbindir}/$p" ]; then
> +                        mv "${D}${sbindir}/$p" "${D}${sbindir}/$p.${PN}"
> +                fi
> +        done
> +
>          for p in $binprogs_a; do
>                  if [ -f "${D}${base_bindir}/$p" ]; then
>                          mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}"
> @@ -271,7 +278,7 @@ pkg_prerm_util-linux-ng-swaponoff () {
>  }
>  
>  pkg_postinst_util-linux-ng-readprofile() {
> -    update-alternatives --install ${base_sbindir}/readprofile readprofile readprofile.${PN} 100
> +    update-alternatives --install ${sbindir}/readprofile readprofile readprofile.${PN} 100
>  }
>  
>  pkg_prerm_util-linux-ng-readprofile () {


-- 
Tom Rini
Mentor Graphics Corporation



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] util-linux-ng: fix readprofile update-alternatives vs busybox
  2010-09-10 20:40 ` Tom Rini
@ 2010-09-10 20:49   ` Philip Balister
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Balister @ 2010-09-10 20:49 UTC (permalink / raw)
  To: openembedded-devel

On 09/10/2010 04:40 PM, Tom Rini wrote:
> Eric Bénard wrote:
>> * util-linux-ng installs readprofile in /sbin, busybox installs
>> it in /usr/sbin which tiggers the following log when configuring
>> the package :
>> Configuring util-linux-ng-readprofile.
>> update-alternatives: Error: cannot register alternative readprofile to
>> /sbin/readprofile since it is already registered to /usr/sbin/readprofile
>> Collected errors:
>> * pkg_run_script: postinst script returned status 1.
>> * opkg_configure: util-linux-ng-readprofile.postinst returned 1.
>>
>> * the fix is to have util-linux-ng install readprofile in /usr/sbin
>>
>> * this patch fix http://bugs.openembedded.org/show_bug.cgi?id=5474 as
>> suggested by Tom Rini
>>
>> Signed-off-by: Eric Bénard <eric@eukrea.com>
>
> Signed-off-by: Tom Rini <tom_rini@mentor.com>

Tested-by: Philip Balister <philip@balister.org>

>
>> ---
>> recipes/util-linux-ng/util-linux-ng.inc | 15 +++++++++++----
>> 1 files changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/recipes/util-linux-ng/util-linux-ng.inc
>> b/recipes/util-linux-ng/util-linux-ng.inc
>> index cbdf68d..ca0790e 100644
>> --- a/recipes/util-linux-ng/util-linux-ng.inc
>> +++ b/recipes/util-linux-ng/util-linux-ng.inc
>> @@ -8,7 +8,7 @@ inherit autotools gettext
>>
>> DEFAULT_PREFERENCE = "-1"
>>
>> -INC_PR = "r27"
>> +INC_PR = "r28"
>>
>> # allows for a release candidate
>> RC ?= ""
>> @@ -51,7 +51,7 @@ FILES_util-linux-ng-losetup =
>> "${base_sbindir}/losetup.${PN}"
>> FILES_util-linux-ng-mount = "${base_bindir}/mount.${PN}
>> ${sysconfdir}/default/mountall"
>> FILES_util-linux-ng-umount = "${base_bindir}/umount.${PN}"
>> # Moved to ${base_sbindir} by do_install:
>> -FILES_util-linux-ng-readprofile = "${base_sbindir}/readprofile.${PN}"
>> +FILES_util-linux-ng-readprofile = "${sbindir}/readprofile.${PN}"
>> FILES_util-linux-ng-fsck = "${base_sbindir}/fsck.${PN}"
>> FILES_util-linux-ng-blkid = "${base_sbindir}/blkid.${PN}"
>> FILES_${PN}-mountall = "${sysconfdir}/default/mountall.${PN}"
>> @@ -124,8 +124,9 @@ do_install () {
>> mkdir -p ${D}${base_bindir}
>>
>> sbinprogs="agetty blockdev ctrlaltdel cfdisk"
>> - sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix
>> fsck.minix losetup swapon fdisk readprofile fsck blkid vigr vipw"
>> + sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix
>> fsck.minix losetup swapon fdisk fsck blkid vigr vipw"
>> usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall
>> setsid chrt"
>> + usrsbinprogs_a="readprofile"
>> binprogs_a="dmesg kill more umount mount login reset"
>>
>> if [ "${base_sbindir}" != "${sbindir}" ]; then
>> @@ -152,6 +153,12 @@ do_install () {
>> fi
>> done
>>
>> + for p in $usrsbinprogs_a; do
>> + if [ -f "${D}${sbindir}/$p" ]; then
>> + mv "${D}${sbindir}/$p" "${D}${sbindir}/$p.${PN}"
>> + fi
>> + done
>> +
>> for p in $binprogs_a; do
>> if [ -f "${D}${base_bindir}/$p" ]; then
>> mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}"
>> @@ -271,7 +278,7 @@ pkg_prerm_util-linux-ng-swaponoff () {
>> }
>>
>> pkg_postinst_util-linux-ng-readprofile() {
>> - update-alternatives --install ${base_sbindir}/readprofile
>> readprofile readprofile.${PN} 100
>> + update-alternatives --install ${sbindir}/readprofile readprofile
>> readprofile.${PN} 100
>> }
>>
>> pkg_prerm_util-linux-ng-readprofile () {
>
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-10 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-09 20:48 [PATCH] util-linux-ng: fix readprofile update-alternatives vs busybox Eric Bénard
2010-09-10 20:40 ` Tom Rini
2010-09-10 20:49   ` Philip Balister

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.