Kaydet (Commit) 4008c469 authored tarafından S.Çağlar Onur's avatar S.Çağlar Onur

[merge] cleanup from -catbox branch/merge quilt support/merge catbox support

üst 383b6b06
......@@ -99,9 +99,9 @@ class Command(object):
@staticmethod
def commands_string():
s = ''
list = [x.name[0] for x in Command.cmd]
list.sort()
for name in list:
l = [x.name[0] for x in Command.cmd]
l.sort()
for name in l:
commandcls = Command.cmd_dict[name]
trans = gettext.translation('pisi', fallback=True)
summary = trans.ugettext(commandcls.__doc__).split('\n')[0]
......@@ -173,12 +173,12 @@ class Command(object):
# make destdir absolute
if self.options.destdir:
dir = str(self.options.destdir)
d = str(self.options.destdir)
import os.path
if not os.path.exists(dir):
pisi.cli.printu(_('Destination directory %s does not exist. Creating directory.\n') % dir)
os.makedirs(dir)
self.options.destdir = os.path.realpath(dir)
if not os.path.exists(d):
pisi.cli.printu(_('Destination directory %s does not exist. Creating directory.\n') % d)
os.makedirs(d)
self.options.destdir = os.path.realpath(d)
def check_auth_info(self):
username = self.options.username
......@@ -451,6 +451,10 @@ to be downloaded from a repository containing sources.
default=False, help=_("Do not install build dependencies, fail if a build dependency is present"))
group.add_option("-F", "--package-format", action="store", default='1.1',
help=_("PiSi binary package formats: '1.0', '1.1' (default)"))
group.add_option("--use-quilt", action="store_true", default=False,
help=_("Use quilt patch management system instead of GNU patch"))
group.add_option("--ignore-sandbox", action="store_true", default=False,
help=_("Constrain build process inside the build folder"))
def add_steps_options(self):
group = OptionGroup(self.parser, _("build steps"))
......@@ -528,7 +532,7 @@ and creates a delta pisi package with the changed files between two releases.
self.init(database=False, write=False)
if len(self.args) is not 2:
if len(self.args) != 2:
self.help()
return
......@@ -728,9 +732,9 @@ expanded to package names.
import os
patterns = []
file = ctx.get_option('exclude_from')
if os.path.exists(file):
for line in open(file, "r").readlines():
f = ctx.get_option('exclude_from')
if os.path.exists(f):
for line in open(f, "r").readlines():
if not line.startswith('#') and not line == '\n':
patterns.append(line.strip())
if patterns:
......@@ -750,8 +754,8 @@ expanded to package names.
if not match:
# match pattern in component names
for cmp in fnmatch.filter(ctx.componentdb.list_components(), pattern):
packages = packages - set(ctx.componentdb.get_union_packages(cmp, walk=True))
for compare in fnmatch.filter(ctx.componentdb.list_components(), pattern):
packages = packages - set(ctx.componentdb.get_union_packages(compare, walk=True))
return list(packages)
......@@ -966,8 +970,6 @@ Usage: info <package1> <package2> ... <packagen>
ctx.ui.info(_("%s is not installed") % arg)
def print_pkginfo(self, metadata, files, repo = None):
import os.path
if ctx.get_option('short'):
pkg = metadata.package
ctx.ui.info('%15s - %s' % (pkg.name, unicode(pkg.summary)))
......@@ -1381,12 +1383,12 @@ all repositories.
component = ctx.get_option('component')
if component:
list = ctx.componentdb.get_packages(component, walk=True, repo=repo)
l = ctx.componentdb.get_packages(component, walk=True, repo=repo)
else:
list = ctx.packagedb.list_packages(repo)
l = ctx.packagedb.list_packages(repo)
installed_list = ctx.installdb.list_installed()
list.sort()
for p in list:
l.sort()
for p in l:
package = ctx.packagedb.get_package(p)
if self.options.long:
ctx.ui.info(unicode(package))
......@@ -1424,9 +1426,9 @@ repositories.
self.init(database = True, write = False)
list = ctx.componentdb.list_components()
list.sort()
for p in list:
l = ctx.componentdb.list_components()
l.sort()
for p in l:
component = ctx.componentdb.get_component(p)
if self.options.long:
ctx.ui.info(unicode(component))
......@@ -1463,9 +1465,9 @@ Gives a brief list of sources published in the repositories.
self.init(database = True, write = False)
list = ctx.sourcedb.list()
list.sort()
for p in list:
l = ctx.sourcedb.list()
l.sort()
for p in l:
sf, repo = ctx.sourcedb.get_spec_repo(p)
if self.options.long:
ctx.ui.info('[Repository: ' + repo + ']')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment