Now that I have your attention,
to put an end to this discussion I have coded a small perl script which
is able to download or (human-legibly) list the sources and patches in a
spec file, even if they contain macros, well even if they're
conditionalized beyond all recognition. It does this by using RPM for
the parsing of the macros etc. and so should be able to cope with most
spec files.
Options (which unfortunately aren't listed by the script):
-l|--list: only list expanded sources/patches
-D|--dummy: don't retrieve stuff, just do as if (for testing)
-d|--define: to define macros just like with RPM (use as often as you
want to)
-v|--verbose: increase verbosity level, useful with --dummy
It accepts as arguments:
- the spec file
- optionally what to list/retrieve: "sources", "patches",
"all",
"source0", "patch5", you get the idea.
Good night,
Nils
--
Nils Philippsen / Red Hat / nphilipp(a)redhat.com
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- B. Franklin, 1759
PGP fingerprint: C4A8 9474 5C4C ADE3 2B8F 656D 47D8 9B65 6951 3011