* push around a little, it works though buggy ;)
This commit is contained in:
@@ -438,7 +438,7 @@ def remove_single(package_name):
|
|||||||
def build(package, authinfo=None):
|
def build(package, authinfo=None):
|
||||||
# wrapper for build op
|
# wrapper for build op
|
||||||
import pisi.build
|
import pisi.build
|
||||||
pisi.build.build(package, authinfo)
|
return pisi.build.build(package, authinfo)
|
||||||
|
|
||||||
def __is_virtual_upgrade(metadata):
|
def __is_virtual_upgrade(metadata):
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -89,7 +89,8 @@ class Builder:
|
|||||||
def from_name(name, authinfo = None):
|
def from_name(name, authinfo = None):
|
||||||
# download package and return an installer object
|
# download package and return an installer object
|
||||||
# find package in repository
|
# find package in repository
|
||||||
src, reponame = ctx.sourcedb.get_source(name)
|
sf, reponame = ctx.sourcedb.get_spec(name)
|
||||||
|
src = sf.source
|
||||||
if src:
|
if src:
|
||||||
|
|
||||||
src_uri = URI(src.sourceURI)
|
src_uri = URI(src.sourceURI)
|
||||||
|
|||||||
@@ -741,7 +741,6 @@ If package specs are given, they should be the names of package dirs under /var/
|
|||||||
name = ("rebuild-db", "rdb")
|
name = ("rebuild-db", "rdb")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
if self.args:
|
if self.args:
|
||||||
self.init(database=True)
|
self.init(database=True)
|
||||||
for package_fn in self.args:
|
for package_fn in self.args:
|
||||||
@@ -1001,16 +1000,16 @@ Gives a brief list of sources published in the repositories.
|
|||||||
list = ctx.sourcedb.list()
|
list = ctx.sourcedb.list()
|
||||||
list.sort()
|
list.sort()
|
||||||
for p in list:
|
for p in list:
|
||||||
source, repo = ctx.sourcedb.get_source(p)
|
sf, repo = ctx.sourcedb.get_spec(p)
|
||||||
if self.options.long:
|
if self.options.long:
|
||||||
ctx.ui.info('[Repository: ' + repo + ']')
|
ctx.ui.info('[Repository: ' + repo + ']')
|
||||||
ctx.ui.info(unicode(source))
|
ctx.ui.info(unicode(sf.source))
|
||||||
else:
|
else:
|
||||||
lenp = len(p)
|
lenp = len(p)
|
||||||
#if p in installed_list:
|
#if p in installed_list:
|
||||||
# p = colorize(p, 'cyan')
|
# p = colorize(p, 'cyan')
|
||||||
p = p + ' ' * max(0, 15 - lenp)
|
p = p + ' ' * max(0, 15 - lenp)
|
||||||
ctx.ui.info('%s - %s ' % (source.name, unicode(source.summary)))
|
ctx.ui.info('%s - %s' % (sf.source.name, unicode(sf.source.summary)))
|
||||||
self.finalize()
|
self.finalize()
|
||||||
|
|
||||||
class ListUpgrades(Command):
|
class ListUpgrades(Command):
|
||||||
|
|||||||
+13
-8
@@ -620,9 +620,11 @@ def plan_emerge(A):
|
|||||||
|
|
||||||
def get_spec(name):
|
def get_spec(name):
|
||||||
if ctx.sourcedb.has_spec(name):
|
if ctx.sourcedb.has_spec(name):
|
||||||
return ctx.sourcedb.get_spec(name)[1]
|
return ctx.sourcedb.get_spec(name)[0]
|
||||||
else:
|
else:
|
||||||
raise Error(_('Cannot find source package: %s') % name)
|
raise Error(_('Cannot find source package: %s') % name)
|
||||||
|
def get_src(name):
|
||||||
|
return get_spec(name).source
|
||||||
def add_src(src):
|
def add_src(src):
|
||||||
if not str(src.name) in G_f.vertices():
|
if not str(src.name) in G_f.vertices():
|
||||||
G_f.add_vertex(str(src.name), (src.version, src.release))
|
G_f.add_vertex(str(src.name), (src.version, src.release))
|
||||||
@@ -638,24 +640,27 @@ def plan_emerge(A):
|
|||||||
Bp = set()
|
Bp = set()
|
||||||
for x in B:
|
for x in B:
|
||||||
sf = get_spec(x)
|
sf = get_spec(x)
|
||||||
add_src(sf.source)
|
src = sf.source
|
||||||
|
add_src(src)
|
||||||
|
|
||||||
# add dependencies
|
# add dependencies
|
||||||
|
|
||||||
for builddep in src.buildDependencies:
|
for builddep in src.buildDependencies:
|
||||||
srcdep = pkgtosrc(builddep.package)
|
srcdep = pkgtosrc(builddep.package)
|
||||||
add_src(srcdep)
|
add_src(get_src(srcdep))
|
||||||
if not dep.package in G_f.vertices():
|
if not srcdep in G_f.vertices():
|
||||||
Bp.add(srcdep)
|
Bp.add(srcdep)
|
||||||
G_f.add_edge(src.name, srcdep)
|
G_f.add_edge(src.name, srcdep)
|
||||||
for pkg in x.packages:
|
|
||||||
|
for pkg in sf.packages:
|
||||||
for rtdep in pkg.packageDependencies:
|
for rtdep in pkg.packageDependencies:
|
||||||
if not dependency.installed_satisfies_dep(rtdep):
|
if not dependency.installed_satisfies_dep(rtdep):
|
||||||
srcdep = pkgtosrc(rtdep.package)
|
srcdep = pkgtosrc(rtdep.package)
|
||||||
add_src(srcdep)
|
add_src(get_src(srcdep))
|
||||||
if not dep.package in G_f.vertices():
|
if not srcdep in G_f.vertices():
|
||||||
Bp.add(srcdep)
|
Bp.add(srcdep)
|
||||||
if not src.name == srcdep: # firefox - firefox-devel thing
|
if not src.name == srcdep: # firefox - firefox-devel thing
|
||||||
G_f.add_edge(src.name, srcdep )
|
G_f.add_edge(src.name, srcdep)
|
||||||
B = Bp
|
B = Bp
|
||||||
|
|
||||||
if ctx.config.get_option('debug'):
|
if ctx.config.get_option('debug'):
|
||||||
|
|||||||
Reference in New Issue
Block a user