aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/commands/getspec.py
diff options
context:
space:
mode:
Diffstat (limited to 'RepSys/commands/getspec.py')
-rw-r--r--RepSys/commands/getspec.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/RepSys/commands/getspec.py b/RepSys/commands/getspec.py
index 1079a81..6a8f7ea 100644
--- a/RepSys/commands/getspec.py
+++ b/RepSys/commands/getspec.py
@@ -1,6 +1,7 @@
#!/usr/bin/python
from RepSys import Error
from RepSys.command import *
+from RepSys.layout import package_url
from RepSys.rpmutil import get_spec
import getopt
import sys
@@ -8,12 +9,16 @@ import sys
HELP = """\
Usage: repsys getspec [OPTIONS] REPPKGURL
+Prints the .spec file of a given package.
+
Options:
-t DIR Use DIR as target for spec file (default is ".")
+ -M Do not use the mirror (use the main repository)
-h Show this message
Examples:
- repsys getspec http://repos/svn/cnc/snapshot/foo
+ repsys getspec pkgname
+ repsys getspec svn+ssh://svn.mandriva.com/svn/packages/cooker/pkgname
"""
def parse_options():
@@ -22,7 +27,7 @@ def parse_options():
opts, args = parser.parse_args()
if len(args) != 1:
raise Error, "invalid arguments"
- opts.pkgdirurl = default_parent(args[0])
+ opts.pkgdirurl = package_url(args[0])
return opts
def main():