All of lore.kernel.org
 help / color / mirror / Atom feed
* util-linux: Multiple alternatives issues preventing clean upgrades
@ 2017-03-01 14:22 Bryan Evenson
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan Evenson @ 2017-03-01 14:22 UTC (permalink / raw)
  To: Openembedded-core

I am using opkg for package management, and before moving to a more recent branch (currently on dizzy) I'm doing some firmware upgrade tests to make sure I have a clean upgrade process.  For my testing I flash an image using our current production image and then do firmware upgrade from the command line by doing "opkg update; opkg upgrade --download-only; opkg upgrade" and checking what errors pop up.  I am currently testing upgrading to the jethro branch and I am seeing some errors in regards to util-linux.  I see the following errors during upgrade:

* check_data_file_clashes: Package util-linux-sulogin wants to install file /sbin/sulogin.util-linux
        But that file is already provided by package  * util-linux
update-alternatives: Error: cannot register alternative readprofile to /usr/sbin/readprofile since it is already registered to /sbin/readprofile
* pkg_run_script: package "util-linux-readprofile" postinst script returned status 1.
* opkg_configure: util-linux-readprofile.postinst returned 1.

The first error I traced down to being related to this commit: http://git.openembedded.org/openembedded-core/commit/meta/recipes-core/util-linux?h=jethro&id=4bde182ed236243547929dd98763f1c09eddd097

The second error I traced down to being related to this commit: http://git.openembedded.org/openembedded-core/commit/meta/recipes-core/util-linux?h=jethro&id=43424eb3c8bf03a2f9ec331b78dd4040dd39eacd

I know this is all related to alternatives, but that's about as far as my knowledge extends in this area.  Yes, everything is running okay but I'd like to clean up problems like this if possible.  Does anyone have any suggestions on what would need to change in the util-linux recipe to clean up these errors?

Thanks,
Bryan


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

* Re: util-linux: Multiple alternatives issues preventing clean upgrades
@ 2017-03-02 19:51 Bryan Evenson
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan Evenson @ 2017-03-02 19:51 UTC (permalink / raw)
  To: Bryan Evenson, Openembedded-core

I've made some progress but I'm afraid I still have a few more questions.

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of Bryan Evenson
> Sent: Wednesday, March 01, 2017 9:22 AM
> To: Openembedded-core@lists.openembedded.org
> Subject: [OE-core] util-linux: Multiple alternatives issues preventing clean
> upgrades
> 
> I am using opkg for package management, and before moving to a more
> recent branch (currently on dizzy) I'm doing some firmware upgrade tests to
> make sure I have a clean upgrade process.  For my testing I flash an image
> using our current production image and then do firmware upgrade from the
> command line by doing "opkg update; opkg upgrade --download-only; opkg
> upgrade" and checking what errors pop up.  I am currently testing upgrading
> to the jethro branch and I am seeing some errors in regards to util-linux.  I
> see the following errors during upgrade:
> 
> * check_data_file_clashes: Package util-linux-sulogin wants to install file
> /sbin/sulogin.util-linux
>         But that file is already provided by package  * util-linux
> update-alternatives: Error: cannot register alternative readprofile to
> /usr/sbin/readprofile since it is already registered to /sbin/readprofile
> * pkg_run_script: package "util-linux-readprofile" postinst script returned
> status 1.
> * opkg_configure: util-linux-readprofile.postinst returned 1.
> 
> The first error I traced down to being related to this commit:
> http://git.openembedded.org/openembedded-core/commit/meta/recipes-
> core/util-linux?h=jethro&id=4bde182ed236243547929dd98763f1c09eddd097
> 

I added the following line to util-linux.inc:
RREPLACES_util-linux-sulogin = "util-linux"

After adding this line, then opkg acknowledged that util-linux-sulogin replaced the files that were previously owned by util-linux and the error went away.  Looking at the commit log on master in the util-linux directory, it looks like util-linux is being split up into even more packages.  Should the proper RREPLACES be added for each package that was split out?

> The second error I traced down to being related to this commit:
> http://git.openembedded.org/openembedded-core/commit/meta/recipes-
> core/util-linux?h=jethro&id=43424eb3c8bf03a2f9ec331b78dd4040dd39eacd
> 

From the command line on the target I entered the line:
update-alternatives --remove readprofile /sbin/readprofile

After that I issued "opkg upgrade" again and the postinstall script for util-linux-readprofile finished without issue.  I'm a little baffled why the old link wasn't removed.  Is there something that needs to be added to the postinstall script to remove the old link prior to adding the new one?

Thanks,
Bryan

> I know this is all related to alternatives, but that's about as far as my
> knowledge extends in this area.  Yes, everything is running okay but I'd like to
> clean up problems like this if possible.  Does anyone have any suggestions on
> what would need to change in the util-linux recipe to clean up these errors?
> 
> Thanks,
> Bryan
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

end of thread, other threads:[~2017-03-02 19:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-01 14:22 util-linux: Multiple alternatives issues preventing clean upgrades Bryan Evenson
2017-03-02 19:51 Bryan Evenson

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.