[zypp-devel] zypper can't remove NEVR packages
I built the whole ZYpp stack on Fedora (9) but zypper is not able to remove packages with an Epoch number. Example: [lorenzo@normandy ~]$ sudo zypper rm devhelp anjuta gtksourceview2 guile libgdl gnome-build autogen-libopts graphviz glade3-libgladeui libgnomecups perl-gettext libgnomeprintui22 libgnomeprint22 autogen Reading installed packages... The following packages are going to be REMOVED: libgnomeprintui22 libgnomeprint22 libgnomecups libgdl guile gtksourceview2 graphviz gnome-build glade3-libgladeui devhelp autogen-libopts autogen anjuta perl-gettext After the operation, 27.1 M will be freed. Continue? [YES/no]: Removing anjuta-1:2.4.1-1.fc9 [error] Removal of (15889)anjuta-1:2.4.1-1.fc9.i386(@System) failed: Error: Subprocess failed. Error: RPM failed: error: package anjuta-1:2.4.1-1.fc9.i386 is not installed Abort, retry, ignore? [A/r/i]: i [...] Removal of (16168)guile-5:1.8.5-1.fc9.i386(@System) failed: Error: Subprocess failed. Error: RPM failed: error: package guile-5:1.8.5-1.fc9.i386 is not installed [...] Packages with Epoch set are so common in Fedora that it is almost impossible to use zypper to remove such packages. I guess that zypper does not strip the '<Epoch number>:' part prior calling 'rpm -e' (or whatever it calls). I don't know if SuSE has a patched version of rpm or packages are not Epoch-versioned at all. My zypper version is 0.11.10 retrieved from openSuSE 11 branch. I'll see if I can make a patch to fix this. Regards -- Lorenzo Villani Blog: http://blog.binaryhelix.net -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Fri, Aug 08, Lorenzo Villani wrote:
Abort, retry, ignore? [A/r/i]: i [...] Removal of (16168)guile-5:1.8.5-1.fc9.i386(@System) failed: Error: Subprocess failed. Error: RPM failed: error: package guile-5:1.8.5-1.fc9.i386 is not installed [...]
Packages with Epoch set are so common in Fedora that it is almost impossible to use zypper to remove such packages. I guess that zypper does not strip the '<Epoch number>:' part prior calling 'rpm -e' (or whatever it calls). I don't know if SuSE has a patched version of rpm or packages are not Epoch-versioned at all. My zypper version is 0.11.10 retrieved from openSuSE 11 branch. I'll see if I can make a patch to fix this.
Got it. This is to be fixed in libzypp. target/rpm/RpmDb.cc void RpmDb::removePackage( Package::constPtr package, unsigned flags ) { return removePackage( package->name() + "-" + package->edition().asString() + "." + package->arch().asString(), flags ); } I suppose rpm dislikes the epoch in edition().asString(): '5:1.8.5-1' BTW: In case 2 versions 4:1.8.5-1 5:1.8.5-1 were installed at the same time, would it be possible ot remove just one of them with rpm? -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Fri, Aug 8, 2008 at 2:02 PM, Michael Andres
target/rpm/RpmDb.cc
void RpmDb::removePackage( Package::constPtr package, unsigned flags ) { return removePackage( package->name() + "-" + package->edition().asString() + "." + package->arch().asString(), flags ); } Yes, I cam to the same function after digging for 1/2 Hour in both zypper and libzypp source code (heh, I have no experience with their codebase)
I suppose rpm dislikes the epoch in edition().asString(): '5:1.8.5-1'
Right, I'm making a patch for fedora which removes the epoch part.
BTW: In case 2 versions
4:1.8.5-1 5:1.8.5-1
were installed at the same time, would it be possible ot remove just one of them with rpm?
AFAIK, the purpose of the Epoch number is to allow solvers to determine the latest version of a package in such cases, example: openafs-1.4.1rc9-rhel4.4 openafs-1.4.1-rhel4.5 The solution in this case is to add an Epoch: 1 to the SPEC file. Of course a better solution is to add an Obsoletes tag but many, many packages in Fedora use Epoch for "historical" reasons. Regards -- Lorenzo Villani Blog: http://blog.binaryhelix.net -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Fri, Aug 08, Lorenzo Villani wrote:
On Fri, Aug 8, 2008 at 2:02 PM, Michael Andres
wrote: target/rpm/RpmDb.cc
void RpmDb::removePackage( Package::constPtr package, unsigned flags ) { return removePackage( package->name() + "-" + package->edition().asString() + "." + package->arch().asString(), flags ); } Yes, I cam to the same function after digging for 1/2 Hour in both zypper and libzypp source code (heh, I have no experience with their codebase)
I suppose rpm dislikes the epoch in edition().asString(): '5:1.8.5-1'
Right, I'm making a patch for fedora which removes the epoch part.
BTW: In case 2 versions
4:1.8.5-1 5:1.8.5-1
were installed at the same time, would it be possible ot remove just one of them with rpm?
AFAIK, the purpose of the Epoch number is to allow solvers to determine the latest version of a package in such cases, example: openafs-1.4.1rc9-rhel4.4 openafs-1.4.1-rhel4.5 The solution in this case is to add an Epoch: 1 to the SPEC file. Of course a better solution is to add an Obsoletes tag but many, many packages in Fedora use Epoch for "historical" reasons.
I see. The bug is fixed in SVN for 11.0 and TRUNK. http://svn.opensuse.org/svn/zypp/trunk/libzypp http://svn.opensuse.org/svn/zypp/branches/SuSE-Linux-11_0-Branch/libzypp -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Fri, Aug 8, 2008 at 2:23 PM, Michael Andres
The bug is fixed in SVN for 11.0 and TRUNK.
Thanks :-) Regards -- Lorenzo Villani Blog: http://blog.binaryhelix.net -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Sorry if I harass you with this question. I guess that package removal is done by calling 'rpm -e' directly, Am I wrong? Why not move that code at rpmlib level? Regards -- Lorenzo Villani Blog: http://blog.binaryhelix.net -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dňa Tuesday 26 August 2008 18:35:46 Lorenzo Villani ste napísal:
Sorry if I harass you with this question. I guess that package removal is done by calling 'rpm -e' directly, Am I wrong? Why not move that code at rpmlib level?
Do you mean using librpm instead of invoking rpm? Stano -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Wed, Aug 27, 2008 at 09:54:46AM +0200, Stanislav Visnovsky wrote:
D??a Tuesday 26 August 2008 18:35:46 Lorenzo Villani ste napísal:
Sorry if I harass you with this question. I guess that package removal is done by calling 'rpm -e' directly, Am I wrong? Why not move that code at rpmlib level?
Do you mean using librpm instead of invoking rpm?
To bad the query options don't work with '-e', i.e.: rpm -e -f /bin/bash rpm -e --querybynumber 553 M. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (4)
-
Lorenzo Villani
-
Michael Andres
-
Michael Schroeder
-
Stanislav Visnovsky