<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13850</bug_id>
          
          <creation_ts>2020-04-02 10:24:05 +0000</creation_ts>
          <short_desc>opkg upgrade of busybox fails</short_desc>
          <delta_ts>2020-11-26 15:49:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.6.4</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>3.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mikael Pahmp">mikael.pahmp</reporter>
          <assigned_to name="Jeremy A. Puhlman">jpuhlman</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>86885</commentid>
    <comment_count>0</comment_count>
    <who name="Mikael Pahmp">mikael.pahmp</who>
    <bug_when>2020-04-02 10:24:05 +0000</bug_when>
    <thetext>Preconditions/Environment
-------------------------
busybox installed on target and no other provider of /bin/sh.
Package management enabled using ipk/opkg.

Triggering Action/Cause
-----------------------
Install new version of busybox using &quot;opkg install&quot; or reinstall same version using &quot;opkg install --force-reinstall&quot;.

Expectation
-----------
Succeeds.

Actual Result
-------------
The busybox prerm script right after:
    update-alternatives: removing /bin/sh as no more alternatives exist for fails with error:
    ///var/lib/opkg/info/busybox.prerm: line 62: update-alternatives: not found


Reproducibility
---------------
Every time


Observations
-----------
The prerm script first sets up links for a number of commands (e.g. sh, sed, ln) in a temporary directory and adds that directory to PATH. Hence, the update-alternatives can still function when those commands are removed. But when /bin/sh is removed, update-alternatives can&apos;t be invoked because it has the she-bang &quot;#!/bin/sh&quot;, i.e. the loader will look for /bin/sh, it won&apos;t look on PATH.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86896</commentid>
    <comment_count>1</comment_count>
    <who name="Jeremy A. Puhlman">jpuhlman</who>
    <bug_when>2020-04-03 04:28:07 +0000</bug_when>
    <thetext>Initial fix for master.

https://patchwork.openembedded.org/patch/171546/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86913</commentid>
    <comment_count>2</comment_count>
    <who name="Jeremy A. Puhlman">jpuhlman</who>
    <bug_when>2020-04-04 01:36:56 +0000</bug_when>
    <thetext>zeus: https://patchwork.openembedded.org/patch/171596/
warrior: https://patchwork.openembedded.org/patch/171597/
thud: https://patchwork.openembedded.org/patch/171598/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87018</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-04-15 18:52:37 +0000</bug_when>
    <thetext>Fixed in master and dunfell in:
https://git.openembedded.org/openembedded-core/commit/a9d2af8f5b3da8239cf00a52883ca596a19ea23a

so a 3.2 milestone makes sense I guess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87019</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-04-15 19:01:21 +0000</bug_when>
    <thetext>This is odd, the link I just added is the right commit ID but when I open a tab to follow the link, I see a commit with the short log:
   build-appliance-image: Update to master head revision
Jeremy, Did I provide the wrong link or do you know what&apos;s wrong here?
I guess I should stop trying to &apos;help&apos;! ;-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87020</commentid>
    <comment_count>5</comment_count>
    <who name="Jeremy A. Puhlman">jpuhlman</who>
    <bug_when>2020-04-15 19:04:44 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; This is odd, the link I just added is the right commit ID but when I open a
&gt; tab to follow the link, I see a commit with the short log:
&gt;    build-appliance-image: Update to master head revision
&gt; Jeremy, Did I provide the wrong link or do you know what&apos;s wrong here?
&gt; I guess I should stop trying to &apos;help&apos;! ;-)

Yeah I didn&apos;t know what the right move here was. The specific bug was for 2.6, and there was a fix submitted for master/dunfell, zeus, warrior and thud, but it was accepted for master/dunfell, it is/was in the queue or zeus, but I haven&apos;t seen any responce on warrior and thud. Its fixed in master, but waiting on the one it was filed against.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88680</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-11-26 15:49:00 +0000</bug_when>
    <thetext>Fixed in master and dunfell and zeus/thud/warrior are out of maintenance at this point.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>