Should be possible if you have configured the repos which contain all those packages via
- Code: Select all
urpmi --no-install $(cat /var/log/rpmpkgs | sed 's/.rpm$//')
Although depending how much packages you have in there you may have to chop the list into pieces, as either shell argument limit or urpmi argument size will kick in
So maybe as quick&dirty workaround use a loop:
- 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
Then copy that directory somewhere or mount it via network to the other machine, and inside thatfolder simply run
- Code: Select all
genhdlist2 .
- that's the equivalent to createrepo.
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.