Bug 1185408 - need a method to remove a package from transaction
Summary: need a method to remove a package from transaction
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-23 16:37 UTC by Chris Lumens
Modified: 2015-06-22 18:06 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-05 16:25:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Chris Lumens 2015-01-23 16:37:34 UTC
Let's say I am writing an installer that processes a kickstart file, and I've got the following:

%packages
@groupA
-packageB
%end

And let's say packageB is a member of groupA.  I can add the group to the transaction easily with base.group_install.  However when it comes time to then remove that package, base.remove won't work.  It looks like it attempts to remove an already installed package.  For me, packageB is not already installed - it's only been added to the transaction to be installed.  I need to remove it from the transaction itself.

I don't see a method to do that right now, but maybe I am misunderstanding things.  If so, could you point me in the right direction?  Thanks!

Comment 1 Honza Silhan 2015-02-05 16:25:09 UTC
As you have noticed you can't use base.remove. You can give into base.group_install as optional exclude param pkg names. If the ackages are mandatory then you have to use this workground [1].

Tip: For quicker response you can use combination of API documentation and asking on #yum on freenode.

I hope I understand it correctly. This should solve your issue. If not feel free to reopen.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1131969#c11
[2] http://dnf.readthedocs.org/en/latest

Comment 2 Adam Williamson 2015-06-22 18:06:05 UTC
*** Bug 1234545 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.