Bug 1573418

Summary: [RFE] Add support for multiple %packages in kickstart
Product: [Fedora] Fedora Reporter: Yuval Turgeman <yturgema>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anaconda-maint-list, jkonecny, jonathan, kellin, mkolman, vanmeeuwen+fedora, v.podzimek+fedora, vponcova, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-13 12:08:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yuval Turgeman 2018-05-01 07:25:33 UTC
Description of problem:
In some cases, a user will want to break their %packages section into several sub sections, to allow installing sets of packages with multiple transactions.  To achieve this today, we need to install those packages in `%post --nochroot` using yum with /tmp/anaconda-yum.conf

Comment 1 Martin Kolman 2018-05-02 12:03:46 UTC
(In reply to Yuval Turgeman from comment #0)
> Description of problem:
> In some cases, a user will want to break their %packages section into
> several sub sections, to allow installing sets of packages with multiple
> transactions.  To achieve this today, we need to install those packages in
> `%post --nochroot` using yum with /tmp/anaconda-yum.conf

What is the actual usecase vs just adding the packages into a single %packages section ?

Also, I *think* we might already support multiple %packages section which we merge together and put into the installation transaction.

Comment 2 Yuval Turgeman 2018-05-02 12:33:41 UTC
Right, we do merge them into a single transaction, what I meant is add the ability to support multiple transactions for different %packages sections. Mainly, it would help installing packages that are not packaged "good enough" since the guidelines do not cover all edge cases.
To be more precise, an issue that we encountered is with selinux - some packages in %post check if selinux is enabled with /sbin/selinuxenabed, but even if it is enabled, but no policy is loaded, then some selinux utilities (semanage etc) fail to even start.  So the thing that we discussed is to add the right dependency on selinux-policy-targeted, but since there are many policies out there, the maintainers don't think they should add this, so we were a little stuck building our layered product until the hack in the description which enabled us to have a working base system in one transaction, and add our bits on top of it in %post.
Sorry for the long comment :)

Comment 3 Yuval Turgeman 2018-05-02 12:35:32 UTC
You can see bug 1563737 and bug 1570831 for the discussions we had about this

Comment 4 Brian Lane 2022-11-18 16:37:39 UTC
I think this should be closed. Keeping track of multiple separate %package sectionsin pykickstart would unnecessarily complicate things. Since this looks like a rare corner case I think a %post workaround is just fine.

Comment 5 Jiri Konecny 2023-04-13 12:08:39 UTC
Hi, Yuval. I understand your request but it's not possible for Anaconda to change the behavior so much for multiple reasons:

1) It's breaking backward compatibility (the current behavior is used heavily)
2) This functionality would require a significant change in logic of Anaconda, and we don't have capacity for that
3) This change would also mean slower installation process because each transaction needs to process metadata again

Because of these reasons I'm closing the bug.