[OE-core] util-linux: Multiple alternatives issues preventing clean upgrades

Bryan Evenson bevenson at melinkcorp.com
Thu Mar 2 19:51:47 UTC 2017


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

> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org
> [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf
> Of Bryan Evenson
> Sent: Wednesday, March 01, 2017 9:22 AM
> To: Openembedded-core at 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 at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list