Bug 1292535 - dnf/yum documentation or other fault
dnf/yum documentation or other fault
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-12-17 12:33 EST by Richard Jasmin
Modified: 2015-12-23 09:17 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-23 09:17:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard Jasmin 2015-12-17 12:33:34 EST
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):

How reproducible:
every install

Steps to Reproduce:
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 09:17:39 EST
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)


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