Bug 1292535

Summary: dnf/yum documentation or other fault
Product: [Fedora] Fedora Reporter: Richard Jasmin <spike85051>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-23 14:17: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 Richard Jasmin 2015-12-17 17:33:34 UTC
Description of problem:
I should post this on the ask pages.
Basically what happens is that people want to dump and restore packages across a format or install, or in some cases to spin from.

You used to do this with yum shell but as we know, yum shell was removed. Well, either someone half assed the removal or yum+dnf both have an alternate means to en-mass add/dump packages.It is not documented anywhere on fedora pages.I had to dig for the information.

Version-Release number of selected component (if applicable):
22+

How reproducible:
every install

Steps to Reproduce:
n/a
dump:rpm -qa --qf "%{NAME}.%{ARCH}\n" | sort > packages.list
re-import: yum -y install $(cat packages.list)


Actual results:
Although this is wonderful, the how do should be documented more clearly.

Expected results:
No, this works as expected. yum shell commands, however, fail miserably.

Additional info:
ARCH is used as I have multi-arch installed(required by some apps).
This works for non-fedora repos as long as the keys are imported FIRST.Anything else gets asked to import during the install process. Note that this will not ask to install packages, in my case thats over 11GB of packages in one swoop.Package conflicts such as logos will have to use the --allow-erasing option or the install will fail.

Comment 1 Honza Silhan 2015-12-23 14:17:39 UTC
The best place for this would be probably on ask.fedoraproject.org. It would be great if you could raise there a question and answer to yourself. This does not IMO belong to DNF doc pages.

These no right way how to sync packages across distro. If it's the same release, your solution can work otherwise packages could be renamed or disappear.

I would suggest following commands (to skip conflicting/broken packages due to reason explained above)
re-import: dnf -y --setopt=strict=1 install $(cat packages.list)
re-import: yum -y --skip-broken install $(cat packages.list)

Thanks.