[merge] cleanup from -catbox branch/merge quilt support/merge catbox support
This commit is contained in:
+28
-26
@@ -99,9 +99,9 @@ class Command(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def commands_string():
|
def commands_string():
|
||||||
s = ''
|
s = ''
|
||||||
list = [x.name[0] for x in Command.cmd]
|
l = [x.name[0] for x in Command.cmd]
|
||||||
list.sort()
|
l.sort()
|
||||||
for name in list:
|
for name in l:
|
||||||
commandcls = Command.cmd_dict[name]
|
commandcls = Command.cmd_dict[name]
|
||||||
trans = gettext.translation('pisi', fallback=True)
|
trans = gettext.translation('pisi', fallback=True)
|
||||||
summary = trans.ugettext(commandcls.__doc__).split('\n')[0]
|
summary = trans.ugettext(commandcls.__doc__).split('\n')[0]
|
||||||
@@ -173,12 +173,12 @@ class Command(object):
|
|||||||
|
|
||||||
# make destdir absolute
|
# make destdir absolute
|
||||||
if self.options.destdir:
|
if self.options.destdir:
|
||||||
dir = str(self.options.destdir)
|
d = str(self.options.destdir)
|
||||||
import os.path
|
import os.path
|
||||||
if not os.path.exists(dir):
|
if not os.path.exists(d):
|
||||||
pisi.cli.printu(_('Destination directory %s does not exist. Creating directory.\n') % dir)
|
pisi.cli.printu(_('Destination directory %s does not exist. Creating directory.\n') % d)
|
||||||
os.makedirs(dir)
|
os.makedirs(d)
|
||||||
self.options.destdir = os.path.realpath(dir)
|
self.options.destdir = os.path.realpath(d)
|
||||||
|
|
||||||
def check_auth_info(self):
|
def check_auth_info(self):
|
||||||
username = self.options.username
|
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"))
|
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',
|
group.add_option("-F", "--package-format", action="store", default='1.1',
|
||||||
help=_("PiSi binary package formats: '1.0', '1.1' (default)"))
|
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):
|
def add_steps_options(self):
|
||||||
group = OptionGroup(self.parser, _("build steps"))
|
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)
|
self.init(database=False, write=False)
|
||||||
|
|
||||||
if len(self.args) is not 2:
|
if len(self.args) != 2:
|
||||||
self.help()
|
self.help()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -728,9 +732,9 @@ expanded to package names.
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
patterns = []
|
patterns = []
|
||||||
file = ctx.get_option('exclude_from')
|
f = ctx.get_option('exclude_from')
|
||||||
if os.path.exists(file):
|
if os.path.exists(f):
|
||||||
for line in open(file, "r").readlines():
|
for line in open(f, "r").readlines():
|
||||||
if not line.startswith('#') and not line == '\n':
|
if not line.startswith('#') and not line == '\n':
|
||||||
patterns.append(line.strip())
|
patterns.append(line.strip())
|
||||||
if patterns:
|
if patterns:
|
||||||
@@ -750,8 +754,8 @@ expanded to package names.
|
|||||||
|
|
||||||
if not match:
|
if not match:
|
||||||
# match pattern in component names
|
# match pattern in component names
|
||||||
for cmp in fnmatch.filter(ctx.componentdb.list_components(), pattern):
|
for compare in fnmatch.filter(ctx.componentdb.list_components(), pattern):
|
||||||
packages = packages - set(ctx.componentdb.get_union_packages(cmp, walk=True))
|
packages = packages - set(ctx.componentdb.get_union_packages(compare, walk=True))
|
||||||
|
|
||||||
return list(packages)
|
return list(packages)
|
||||||
|
|
||||||
@@ -966,8 +970,6 @@ Usage: info <package1> <package2> ... <packagen>
|
|||||||
ctx.ui.info(_("%s is not installed") % arg)
|
ctx.ui.info(_("%s is not installed") % arg)
|
||||||
|
|
||||||
def print_pkginfo(self, metadata, files, repo = None):
|
def print_pkginfo(self, metadata, files, repo = None):
|
||||||
import os.path
|
|
||||||
|
|
||||||
if ctx.get_option('short'):
|
if ctx.get_option('short'):
|
||||||
pkg = metadata.package
|
pkg = metadata.package
|
||||||
ctx.ui.info('%15s - %s' % (pkg.name, unicode(pkg.summary)))
|
ctx.ui.info('%15s - %s' % (pkg.name, unicode(pkg.summary)))
|
||||||
@@ -1381,12 +1383,12 @@ all repositories.
|
|||||||
|
|
||||||
component = ctx.get_option('component')
|
component = ctx.get_option('component')
|
||||||
if component:
|
if component:
|
||||||
list = ctx.componentdb.get_packages(component, walk=True, repo=repo)
|
l = ctx.componentdb.get_packages(component, walk=True, repo=repo)
|
||||||
else:
|
else:
|
||||||
list = ctx.packagedb.list_packages(repo)
|
l = ctx.packagedb.list_packages(repo)
|
||||||
installed_list = ctx.installdb.list_installed()
|
installed_list = ctx.installdb.list_installed()
|
||||||
list.sort()
|
l.sort()
|
||||||
for p in list:
|
for p in l:
|
||||||
package = ctx.packagedb.get_package(p)
|
package = ctx.packagedb.get_package(p)
|
||||||
if self.options.long:
|
if self.options.long:
|
||||||
ctx.ui.info(unicode(package))
|
ctx.ui.info(unicode(package))
|
||||||
@@ -1424,9 +1426,9 @@ repositories.
|
|||||||
|
|
||||||
self.init(database = True, write = False)
|
self.init(database = True, write = False)
|
||||||
|
|
||||||
list = ctx.componentdb.list_components()
|
l = ctx.componentdb.list_components()
|
||||||
list.sort()
|
l.sort()
|
||||||
for p in list:
|
for p in l:
|
||||||
component = ctx.componentdb.get_component(p)
|
component = ctx.componentdb.get_component(p)
|
||||||
if self.options.long:
|
if self.options.long:
|
||||||
ctx.ui.info(unicode(component))
|
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)
|
self.init(database = True, write = False)
|
||||||
|
|
||||||
list = ctx.sourcedb.list()
|
l = ctx.sourcedb.list()
|
||||||
list.sort()
|
l.sort()
|
||||||
for p in list:
|
for p in l:
|
||||||
sf, repo = ctx.sourcedb.get_spec_repo(p)
|
sf, repo = ctx.sourcedb.get_spec_repo(p)
|
||||||
if self.options.long:
|
if self.options.long:
|
||||||
ctx.ui.info('[Repository: ' + repo + ']')
|
ctx.ui.info('[Repository: ' + repo + ']')
|
||||||
|
|||||||
Reference in New Issue
Block a user