* remove multirepo support
This commit is contained in:
@@ -71,38 +71,3 @@ def finalize():
|
|||||||
if sourcedb:
|
if sourcedb:
|
||||||
sourcedb.close()
|
sourcedb.close()
|
||||||
sourcedb = None
|
sourcedb = None
|
||||||
|
|
||||||
sourcedbs = {}
|
|
||||||
|
|
||||||
def add_db(name):
|
|
||||||
pisi.sourcedb.sourcedbs[name] = SourceDB('repo-' + name)
|
|
||||||
|
|
||||||
def get_db(name):
|
|
||||||
return pisi.sourcedb.sourcedbs[name]
|
|
||||||
|
|
||||||
def remove_db(name):
|
|
||||||
del pisi.sourcedb.sourcedbs[name]
|
|
||||||
#FIXME: erase database file?
|
|
||||||
|
|
||||||
def has_package(name):
|
|
||||||
repo = which_repo(name)
|
|
||||||
if repo:# or thirdparty_packagedb.has_package(name) or inst_packagedb.has_package(name):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def which_repo(name):
|
|
||||||
import pisi.repodb
|
|
||||||
for repo in pisi.repodb.db.list():
|
|
||||||
if get_db(repo).has_source(name):
|
|
||||||
return repo
|
|
||||||
return None
|
|
||||||
|
|
||||||
def get_package(name):
|
|
||||||
repo = which_repo(name)
|
|
||||||
if repo:
|
|
||||||
return get_db(repo).get_source(name)
|
|
||||||
if thirdparty_packagedb.has_source(name):
|
|
||||||
return thirdparty_packagedb.get_source(name)
|
|
||||||
if inst_packagedb.has_source(name):
|
|
||||||
return inst_packagedb.get_source(name)
|
|
||||||
raise Error(_('get_source: source %s not found') % name)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user