Created
August 5, 2016 23:25
-
-
Save t3rmin4t0r/a2c68f8e8136a0502c6e0701a5bd1094 to your computer and use it in GitHub Desktop.
Get URLs for all HDP rpms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yum | |
yb = yum.YumBase() | |
yb.setCacheDir() | |
pkgs=[p for p in yb.pkgSack.returnNewestByNameArch(patterns='*.rpm') if 'HDP' in p.repoid] | |
for p in pkgs: | |
print "wget -c ", p.remote_url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment