Hi!
It was suggested to me to bring this issue to this list.
The packaging guidelines says that a package should not own a directory that is owned by a package on which it depends.
The packaging guidelines also says that packages should own all directories needed in order not to leave orphaned directories after a package de-installation.
The way rpm/yum currently works these guidelines are contradicting and you must choose which one to implement in your packaging.
My question is - is this a bug in yum/rpm, or a flaw in the packaging guidelines?
Here is an example that implements the first guideline - and violates the second - spec file attached.
The spec builds a main package, 8 packages (A-H) that depend on the main package and 8 devel packages that each depends on one of the packages (A-H).
If I install all 17 packages and then do "yum remove mytest", all packages should be removed cleanly if the Requires are influencing the order the packages are uninstalled, which it must do if both guidelines is supposed to be implementable simultaneously.
This is not what happens:
[root@localhost ~]# rpm -ivh /home/ellert/rpmbuild/RPMS/i386/mytest-* Förbereder... ########################################### [100%] 1:mytest ########################################### [ 6%] 2:mytest-A ########################################### [ 12%] 3:mytest-B ########################################### [ 18%] 4:mytest-C ########################################### [ 24%] 5:mytest-D ########################################### [ 29%] 6:mytest-E ########################################### [ 35%] 7:mytest-F ########################################### [ 41%] 8:mytest-G ########################################### [ 47%] 9:mytest-H ########################################### [ 53%] 10:mytest-A-devel ########################################### [ 59%] 11:mytest-B-devel ########################################### [ 65%] 12:mytest-C-devel ########################################### [ 71%] 13:mytest-D-devel ########################################### [ 76%] 14:mytest-E-devel ########################################### [ 82%] 15:mytest-F-devel ########################################### [ 88%] 16:mytest-G-devel ########################################### [ 94%] 17:mytest-H-devel ########################################### [100%] [root@localhost ~]# yum remove mytest Loaded plugins: refresh-packagekit Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package mytest.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest for package: mytest-A --> Processing Dependency: mytest for package: mytest-E --> Processing Dependency: mytest for package: mytest-G --> Processing Dependency: mytest for package: mytest-B --> Processing Dependency: mytest for package: mytest-F --> Processing Dependency: mytest for package: mytest-C --> Processing Dependency: mytest for package: mytest-D --> Processing Dependency: mytest for package: mytest-H --> Running transaction check ---> Package mytest-A.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest-A = 1.0-1.fc10 for package: mytest-A-devel ---> Package mytest-B.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest-B = 1.0-1.fc10 for package: mytest-B-devel ---> Package mytest-C.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest-C = 1.0-1.fc10 for package: mytest-C-devel ---> Package mytest-D.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest-D = 1.0-1.fc10 for package: mytest-D-devel ---> Package mytest-E.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest-E = 1.0-1.fc10 for package: mytest-E-devel ---> Package mytest-F.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest-F = 1.0-1.fc10 for package: mytest-F-devel ---> Package mytest-G.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest-G = 1.0-1.fc10 for package: mytest-G-devel ---> Package mytest-H.i386 0:1.0-1.fc10 set to be erased --> Processing Dependency: mytest-H = 1.0-1.fc10 for package: mytest-H-devel --> Running transaction check ---> Package mytest-A-devel.i386 0:1.0-1.fc10 set to be erased ---> Package mytest-B-devel.i386 0:1.0-1.fc10 set to be erased ---> Package mytest-C-devel.i386 0:1.0-1.fc10 set to be erased ---> Package mytest-D-devel.i386 0:1.0-1.fc10 set to be erased ---> Package mytest-E-devel.i386 0:1.0-1.fc10 set to be erased ---> Package mytest-F-devel.i386 0:1.0-1.fc10 set to be erased ---> Package mytest-G-devel.i386 0:1.0-1.fc10 set to be erased ---> Package mytest-H-devel.i386 0:1.0-1.fc10 set to be erased --> Finished Dependency Resolution
Dependencies Resolved
================================================================================ Package Arch Version Repository Size ================================================================================ Removing: mytest i386 1.0-1.fc10 installed 0.0 Removing for dependencies: mytest-A i386 1.0-1.fc10 installed 6.0 mytest-A-devel i386 1.0-1.fc10 installed 7.0 mytest-B i386 1.0-1.fc10 installed 6.0 mytest-B-devel i386 1.0-1.fc10 installed 7.0 mytest-C i386 1.0-1.fc10 installed 6.0 mytest-C-devel i386 1.0-1.fc10 installed 7.0 mytest-D i386 1.0-1.fc10 installed 6.0 mytest-D-devel i386 1.0-1.fc10 installed 7.0 mytest-E i386 1.0-1.fc10 installed 6.0 mytest-E-devel i386 1.0-1.fc10 installed 7.0 mytest-F i386 1.0-1.fc10 installed 6.0 mytest-F-devel i386 1.0-1.fc10 installed 7.0 mytest-G i386 1.0-1.fc10 installed 6.0 mytest-G-devel i386 1.0-1.fc10 installed 7.0 mytest-H i386 1.0-1.fc10 installed 6.0 mytest-H-devel i386 1.0-1.fc10 installed 7.0
Transaction Summary ================================================================================ Install 0 Package(s) Update 0 Package(s) Remove 17 Package(s)
Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Erasing : mytest-E-devel 1/17 Erasing : mytest-H-devel 2/17 Erasing : mytest-A 3/17 Erasing : mytest-C 4/17 Erasing : mytest-D 5/17 Erasing : mytest-E 6/17 Erasing : mytest-G 7/17 Erasing : mytest-H 8/17 Erasing : mytest-C-devel 9/17 Erasing : mytest-F-devel 10/17 Erasing : mytest-F 11/17 Erasing : mytest-A-devel 12/17 Erasing : mytest-D-devel 13/17 Erasing : mytest 14/17 Erasing : mytest-G-devel 15/17 Erasing : mytest-B 16/17 Erasing : mytest-B-devel 17/17
Removed: mytest.i386 0:1.0-1.fc10
Dependency Removed: mytest-A.i386 0:1.0-1.fc10 mytest-A-devel.i386 0:1.0-1.fc10 mytest-B.i386 0:1.0-1.fc10 mytest-B-devel.i386 0:1.0-1.fc10 mytest-C.i386 0:1.0-1.fc10 mytest-C-devel.i386 0:1.0-1.fc10 mytest-D.i386 0:1.0-1.fc10 mytest-D-devel.i386 0:1.0-1.fc10 mytest-E.i386 0:1.0-1.fc10 mytest-E-devel.i386 0:1.0-1.fc10 mytest-F.i386 0:1.0-1.fc10 mytest-F-devel.i386 0:1.0-1.fc10 mytest-G.i386 0:1.0-1.fc10 mytest-G-devel.i386 0:1.0-1.fc10 mytest-H.i386 0:1.0-1.fc10 mytest-H-devel.i386 0:1.0-1.fc10
Complete!
After the removal there are orphaned directories:
[root@localhost ~]# find /usr/share/mytest /usr/share/mytest /usr/share/mytest/C /usr/share/mytest/G /usr/share/mytest/B /usr/share/mytest/D /usr/share/mytest/A [root@localhost ~]# rpm -q --whatprovides `find /usr/share/mytest` filen /usr/share/mytest tillhör inget paket filen /usr/share/mytest/C tillhör inget paket filen /usr/share/mytest/G tillhör inget paket filen /usr/share/mytest/B tillhör inget paket filen /usr/share/mytest/D tillhör inget paket filen /usr/share/mytest/A tillhör inget paket
Mattias Ellert wrote:
It was suggested to me to bring this issue to this list.
The packaging guidelines says that a package should not own a directory that is owned by a package on which it depends.
The packaging guidelines also says that packages should own all directories needed in order not to leave orphaned directories after a package de-installation.
The way rpm/yum currently works these guidelines are contradicting and you must choose which one to implement in your packaging.
My question is - is this a bug in yum/rpm, or a flaw in the packaging guidelines?
bug.
-- Rex
On Mon, 23 Mar 2009, Rex Dieter wrote:
Mattias Ellert wrote:
It was suggested to me to bring this issue to this list.
The packaging guidelines says that a package should not own a directory that is owned by a package on which it depends.
The packaging guidelines also says that packages should own all directories needed in order not to leave orphaned directories after a package de-installation.
The way rpm/yum currently works these guidelines are contradicting and you must choose which one to implement in your packaging.
My question is - is this a bug in yum/rpm, or a flaw in the packaging guidelines?
bug.
What bug number is this?
-sv
Mattias Ellert wrote, at 03/23/2009 11:31 PM +9:00:
Hi!
It was suggested to me to bring this issue to this list.
The packaging guidelines says that a package should not own a directory that is owned by a package on which it depends.
The packaging guidelines also says that packages should own all directories needed in order not to leave orphaned directories after a package de-installation.
The way rpm/yum currently works these guidelines are contradicting and you must choose which one to implement in your packaging.
My question is - is this a bug in yum/rpm, or a flaw in the packaging guidelines?
I guess this is a bug in rpm. As far as I am correct current Fedora packaging guidelines assume this is properly handled by rpm. Actually I filed bug 490975 and am waiting for comments from rpm maintainers.
Regards, Mamoru
mån 2009-03-23 klockan 23:38 +0900 skrev Mamoru Tasaka:
Mattias Ellert wrote, at 03/23/2009 11:31 PM +9:00:
Hi!
It was suggested to me to bring this issue to this list.
The packaging guidelines says that a package should not own a directory that is owned by a package on which it depends.
The packaging guidelines also says that packages should own all directories needed in order not to leave orphaned directories after a package de-installation.
The way rpm/yum currently works these guidelines are contradicting and you must choose which one to implement in your packaging.
My question is - is this a bug in yum/rpm, or a flaw in the packaging guidelines?
I guess this is a bug in rpm. As far as I am correct current Fedora packaging guidelines assume this is properly handled by rpm. Actually I filed bug 490975 and am waiting for comments from rpm maintainers.
Regards, Mamoru
I added my test case to your existing bug report.
Considering that this bug is the cause for thousands of packages violating the packaging guidelines, should the severity/priority of the bug be raised? Should it be made a blocker?
Mattias
Hello:
Mattias Ellert wrote, at 03/25/2009 02:24 PM +9:00:
mån 2009-03-23 klockan 23:38 +0900 skrev Mamoru Tasaka:
Mattias Ellert wrote, at 03/23/2009 11:31 PM +9:00:
Hi!
It was suggested to me to bring this issue to this list.
The packaging guidelines says that a package should not own a directory that is owned by a package on which it depends.
The packaging guidelines also says that packages should own all directories needed in order not to leave orphaned directories after a package de-installation.
The way rpm/yum currently works these guidelines are contradicting and you must choose which one to implement in your packaging.
My question is - is this a bug in yum/rpm, or a flaw in the packaging guidelines?
I guess this is a bug in rpm. As far as I am correct current Fedora packaging guidelines assume this is properly handled by rpm. Actually I filed bug 490975 and am waiting for comments from rpm maintainers.
Regards, Mamoru
I added my test case to your existing bug report.
Considering that this bug is the cause for thousands of packages violating the packaging guidelines, should the severity/priority of the bug be raised? Should it be made a blocker?
Mattias
For now I marked this as F11Target (I don't think that we should stop reviewing submitted review requests until this bug is fixed)
Mamoru
packaging@lists.fedoraproject.org