urpmi --no-install $(cat /var/log/rpmpkgs | sed 's/.rpm$//')
for pkg in $(cat /var/log/rpmpkgs | sed 's/.rpm$//'); do urpmi --replacepkgs --no-install ${pkg};done
genhdlist2 .
- Code: Select all
for pkg in $(cat /var/log/rpmpkgs | sed 's/.rpm$//'); do urpmi --replacepkgs --no-install ${pkg};done
EDIT: Seems it doesn't work on installed packages, so does not provide the same functionality as e.g. yum reinstall --downloadonly/yumdownloader/repotrack![]()
EDIT2: Gotcha! Simply add --replacepkgs
Default download directory is /var/cache/urpmi/rpms
Running on host1:
1. for pkg in $(cat rpmpkgs.host2 | sed 's/.rpm$//'); do urpmi --replacepkgs --no-install ${pkg};done
2. for pkg in $(cat rpmpkgs.host2 | sed 's/.rpm$//'); do urpmi --download-all --force --no-install ${pkg};done
Then copy that directory somewhere or mount it via network to the other machine, and inside thatfolder simply run- that's the equivalent to createrepo.
- Code: Select all
genhdlist2 .
Doesn't matter where you put this, if onto local filesystem, via network or removable media . urpmi doesn't care about that, same as for Fedora/RHEL, the only thing you need to pay attention that the path to the repo includes the protocol (like baseurl=file://). Otherwise the downloaders don't care, even RPM itself supports all download protocols itself.
urpmi.addmedia Host2_rpms /path/to/local/folder
Return to The magician suggests...
Users browsing this forum: No registered users and 1 guest