Lines 173-183
Link Here
|
173 |
usage = "Usage: quickpkg [options] <list of package atoms>" |
173 |
usage = "Usage: quickpkg [options] <list of package atoms>" |
174 |
from optparse import OptionParser |
174 |
from optparse import OptionParser |
175 |
parser = OptionParser(usage=usage) |
175 |
parser = OptionParser(usage=usage) |
176 |
options, args = parser.parse_args(sys.argv[1:]) |
176 |
parser.add_option("--umask", |
|
|
177 |
default="0077", |
178 |
help="umask used during package creation (default is 0077)") |
179 |
from portage import settings |
180 |
default_opts = settings.get("QUICKPKG_DEFAULT_OPTS","").split() |
181 |
options, args = parser.parse_args(default_opts + sys.argv[1:]) |
177 |
if not args: |
182 |
if not args: |
178 |
parser.error("no packages atoms given") |
183 |
parser.error("no packages atoms given") |
|
|
184 |
try: |
185 |
umask = int(options.umask, 8) |
186 |
except ValueError: |
187 |
parser.error("invalid umask: %s" % options.umask) |
179 |
# We need to ensure a sane umask for the packages that will be created. |
188 |
# We need to ensure a sane umask for the packages that will be created. |
180 |
old_umask = os.umask(022) |
189 |
old_umask = os.umask(umask) |
181 |
from output import get_term_size, EOutput |
190 |
from output import get_term_size, EOutput |
182 |
eout = EOutput() |
191 |
eout = EOutput() |
183 |
def sigwinch_handler(signum, frame): |
192 |
def sigwinch_handler(signum, frame): |