LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Removing an RPM package from within another RPM package (https://www.linuxquestions.org/questions/linux-software-2/removing-an-rpm-package-from-within-another-rpm-package-443488/)

jimwelc 05-10-2006 10:58 AM

Removing an RPM package from within another RPM package
 
Hello All,

I am fairly new to RPM so I was hoping someone might be able to help me with my issue.

Previously I had two RPMs lets say A.rpm and B.rpm, I have recently moved all commponents & functionality from B.rpm into A.rpm. My problem occurs when attempting to upgrade from my previous installed RPM package to my new one single rpm. RPM complains that some of the components of A.rpm conflict with files from package B.rpm. Is there any way to remove package B.rpm from with my new RPM before the conflict occurs. Or is there any way to get around this issue from within my new A.rpm. Any help you can provide will be greatly appreciated.

Best Regards,
-Jim

Lenard 05-10-2006 11:09 AM

With your new A.rpm let rpm know that it now provides the package and obsolete the B package, example;

Provides: udev-persistent = 0:%{version}-%{release}
Obsoletes: udev-persistent[ < 0:030-5]

[] == optional

jimwelc 05-10-2006 12:37 PM

Thanks for your help Lenard...."Obsoletes:" was exactly what I am looking for.

Cheers!

-Jim

jimwelc 05-10-2006 02:51 PM

One follow up questions that relates to the Provides/Obsoletes action. It seems now that when I have the obsoletes defined in my rpm and I am performing an upgrade my rpm, at the end of processing, runs an uninstall of the package defined in the Obsoletes: section. Is there a way to redirect the output from this uninstall action?

-Jim

Lenard 05-10-2006 05:18 PM

Yes, but instead of answering your follow up question, maybe it is time to review;

http://www.redhat.com/docs/books/max-rpm/

Hints: %triggerun, %triggerpostun

jimwelc 05-11-2006 10:38 AM

Hello Lenard,

I appreciate your link, but the Maximum RPM link you gave me does not seem to mention %triggerun, %triggerpostun. After some web searches I did find some documentation that described these macros. These will work but no matter what I've tried to redirect the output it does not seem to happen. Any more Hints or links?

-Jim

Lenard 05-11-2006 11:57 AM

Sorry about that link.....

You can find an examples in both the new initscripts-8.33-1.src.rpm and udev-091-3.src.rpm spec files;

http://download.fedora.redhat.com/pu...lopment/SRPMS/

You want to have a look at the %postrun sections also.

jimwelc 05-12-2006 02:13 PM

Hello Lenard,

I took a look at both of the SPEC files contained in the two initscripts-8.33-1.src.rpm and udev-091-3.src.rpm you mentioned and I do not see any example of how they are redirecting the output.

-Jim


All times are GMT -5. The time now is 04:49 PM.