<?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>491</bug_id>
          
          <creation_ts>2010-10-19 09:28:13 +0000</creation_ts>
          <short_desc>[zypper] package removal failure</short_desc>
          <delta_ts>2011-03-23 00:16:29 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Qing He">qing.he</reporter>
          <assigned_to name="Qing He">qing.he</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>jiajun.xu</cc>
    
    <cc>ke.yu</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>n3npq</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10664</commentid>
    <comment_count>0</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-19 09:28:13 +0000</bug_when>
    <thetext>reproduce step:

$ zypper remove findutils
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following packages are going to be REMOVED:
  findutils findutils-dev task-poky-sdk

3 packages to remove.
After the operation, 595.0 KiB will be freed.
Continue? [y/n/?] (y):
Removing task-poky-sdk-1.0-r5 [error]
Removal of (13124)task-poky-sdk-1.0-r5.armv5te(@System) failed:
Error: Subprocess failed. Error: RPM failed: error: package task-poky-sdk-1.0-r5.armv5te is not installed

Abort, retry, ignore? [a/r/i] (a):</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10665</commentid>
    <comment_count>1</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-19 09:30:06 +0000</bug_when>
    <thetext>with --verbose parameter, it shows that

---
...
Check failed:
History:
 - Command exited with status 129.
 - Executing &apos;lsof&apos; failed (129).
---

but lsof is not installed in the image
Is the missing of lsof causes this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10666</commentid>
    <comment_count>2</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-19 09:44:37 +0000</bug_when>
    <thetext>the rpm command gets called by zypper is something as follow:

   rpm --root / --dbpath /var/lib/rpm -e --allmatches --nodeps -- task-poky-sdk-1.0-r5.armv5te


and rpm reports that &quot;error: package task-poky-sdk-1.0-r5.armv5te&quot; is not installed


while using simply the package name works

   rpm -e task-poky-sdk


While &quot;rpm -qa&quot; shows full name, including version, revision and arch.


Should zypper invokes rpm using simply the package name? or should &quot;rpm -e&quot; accepts full package names?

Cc Mark Hatle</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10667</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-10-19 09:45:55 +0000</bug_when>
    <thetext>If installing lsof fixes the problem, it sounds like we need to add lsof to the RDEPENDS of zypper.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10668</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2010-10-19 09:57:39 +0000</bug_when>
    <thetext>When removing a package it should be valid to list all of the components or simply a subset.. i.e.

rpm -e task-poky-sdk
rpm -e task-poky-sdk-1.0-r5
rpm -e task-poky-sdk-1.0-r5.armv5te


I was able to boot into a target and run similar commands to verify this.

With the commands below added:

--root / --dbpath /var/lib/rpm -e --allmatches --nodeps

it still worked correctly on the target as well.

So I&apos;m not sure how to explain the behavior from Zypper..  If you can figure out a command line reproducer for this we can resolve it.  If not, then we may need to start running things through a debugger.

(If possible, add &quot;-vv&quot; to the command line from Zypper to RPM.. This will add extended debug info that might help...  comparing the output of the -vv from Zypper and from you running the command on the command line yourself might point out the issue)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10669</commentid>
    <comment_count>5</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-19 10:03:06 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; When removing a package it should be valid to list all of the components or
&gt; simply a subset.. i.e.
&gt; rpm -e task-poky-sdk
&gt; rpm -e task-poky-sdk-1.0-r5

these two passed in my image, manual execution


&gt; rpm -e task-poky-sdk-1.0-r5.armv5te

this one failed with &quot;error: package xxx is not installed&quot;, manual execution

&gt; I was able to boot into a target and run similar commands to verify this.
&gt; With the commands below added:
&gt; --root / --dbpath /var/lib/rpm -e --allmatches --nodeps
&gt; it still worked correctly on the target as well.

Yeah, I think they don&apos;t add anything different


Has this anything to do with armv5te and armv5tejl differences (see bug 489)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10670</commentid>
    <comment_count>6</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-19 10:13:17 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; If installing lsof fixes the problem, it sounds like we need to add lsof to the
&gt; RDEPENDS of zypper.

a deeper look shows that lsof is used by --verbose functionality of zypper, not zypper itself. It can later be added as an RRECOMMENDS or something</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10696</commentid>
    <comment_count>7</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-20 02:05:13 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; When removing a package it should be valid to list all of the components or
&gt; &gt; simply a subset.. i.e.
&gt; &gt; rpm -e task-poky-sdk
&gt; &gt; rpm -e task-poky-sdk-1.0-r5
&gt; 
&gt; these two passed in my image, manual execution
&gt; 
&gt; 
&gt; &gt; rpm -e task-poky-sdk-1.0-r5.armv5te
&gt; 
&gt; this one failed with &quot;error: package xxx is not installed&quot;, manual execution
&gt; 

talked with Jiajun, now we can confirm that, the arch is misrepresented in zypper

$ rpm -qa | grep task-poky-sdk
task-poky-sdk-1.0-r5.qemuarm

but zypper recognized them all as armv5te</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10706</commentid>
    <comment_count>8</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-20 17:54:58 +0000</bug_when>
    <thetext>see also bug 498

The issues seem related but distinct</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10807</commentid>
    <comment_count>9</comment_count>
    <who name="Jeff Johnson">n3npq</who>
    <bug_when>2010-10-27 11:40:51 +0000</bug_when>
    <thetext>Tracked at https://bugs.launchpad.net/rpm/+bug/667407</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11039</commentid>
    <comment_count>10</comment_count>
    <who name="Ke Yu">ke.yu</who>
    <bug_when>2010-12-08 22:36:40 +0000</bug_when>
    <thetext>wait for zypper and rpm usability enhancement complete</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11774</commentid>
    <comment_count>11</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2011-02-15 00:49:25 +0000</bug_when>
    <thetext>move to M4 due to the image instabilities before end of M3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12730</commentid>
    <comment_count>12</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2011-03-16 19:08:21 +0000</bug_when>
    <thetext>should be fixed in

http://git.pokylinux.org/cgit.cgi/poky/commit/?h=bernard&amp;id=8f0fc87a18295d54aa3d229a7975722c88abaefe</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12924</commentid>
    <comment_count>13</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2011-03-23 00:16:29 +0000</bug_when>
    <thetext>Verify the bug with 20110318 gold build, it is fixed.

The commit number is 82af8b9fb6d6d1439943fd15b8a75c0e663e4a45.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>