diff options
author | daviddavid <geiger.david68210@gmail.com> | 2024-02-12 18:58:26 +0100 |
---|---|---|
committer | daviddavid <geiger.david68210@gmail.com> | 2024-02-12 18:58:26 +0100 |
commit | fde9fe10ef2bb4d201f81c28052dd82f36276cff (patch) | |
tree | b2b546c4817844ffd469bd6fc0b2b6145bc5cf6e | |
parent | 67beb9c37327603c46beb9c1e0523143d1ffc65f (diff) | |
download | bm-fde9fe10ef2bb4d201f81c28052dd82f36276cff.tar bm-fde9fe10ef2bb4d201f81c28052dd82f36276cff.tar.gz bm-fde9fe10ef2bb4d201f81c28052dd82f36276cff.tar.bz2 bm-fde9fe10ef2bb4d201f81c28052dd82f36276cff.tar.xz bm-fde9fe10ef2bb4d201f81c28052dd82f36276cff.zip |
Set current working directory for 'unpack (-u)' command (mga#31850)
- Thanks to Aurelian R
-rw-r--r-- | bm | 5 | ||||
-rw-r--r-- | man/bm.8 | 2 |
2 files changed, 4 insertions, 3 deletions
@@ -23,13 +23,14 @@ def passtrough(option, opt, val, parser): del parser.rargs[:option.nargs] def parse_options(): + workDir = os.getcwd() parser = OptionParser("%prog [OPTIONS] [<rpm dir>] [<spec file>] [<srpm file>]", version="%prog "+VERSION) parser.add_option("-a", dest="mode", action="store_const", const="all", help="do everything and build source and binary packages" " (default)", default="all") parser.add_option("-u", dest="mode", action="store_const", const="unpack", - help="just unpack") + help="just unpack - default directory is \""+workDir+"\"") parser.add_option("-p", dest="mode", action="store_const", const="prep", help="unpack and run %prep stage") parser.add_option("-r", dest="mode", action="store_const", const="generate_buildrequires", @@ -49,7 +50,7 @@ def parse_options(): parser.add_option("-o", dest="options", action="append", metavar="OPT", default=[], help="pass given parameters directly to rpm") - parser.add_option("--unpack-dir", metavar="DIR", default="/var/tmp", + parser.add_option("--unpack-dir", metavar="DIR", default=workDir, help="specify directory where to unpack file(s)") parser.add_option("--build-log", metavar="FILE", help="specify where to put the build log for each package") @@ -30,7 +30,7 @@ do everything and build source and binary packages (default) .TP .B \fB-u\fP -just unpack +just unpack - default directory is the current working directory .TP .B \fB-p\fP |