Update to new pisi
This commit is contained in:
@@ -16,11 +16,7 @@ import exceptions
|
|||||||
|
|
||||||
import pisi
|
import pisi
|
||||||
|
|
||||||
def handle_exception(exception, value, tb):
|
installdb = pisi.db.installdb.InstallDB()
|
||||||
if exception == exceptions.KeyboardInterrupt:
|
|
||||||
pisi.api.finalize()
|
|
||||||
print("\n")
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
def ask_action(msg, actions, default):
|
def ask_action(msg, actions, default):
|
||||||
while True:
|
while True:
|
||||||
@@ -34,10 +30,11 @@ def ask_action(msg, actions, default):
|
|||||||
return s
|
return s
|
||||||
|
|
||||||
def get_installed_packages():
|
def get_installed_packages():
|
||||||
return pisi.context.installdb.list_installed()
|
return installdb.list_installed()
|
||||||
|
|
||||||
def check_changed_config_files(package):
|
def check_changed_config_files(package):
|
||||||
all_files = pisi.context.installdb.files(package)
|
|
||||||
|
all_files = installdb.get_files(package)
|
||||||
config_files = filter(lambda x: x.type == 'config', all_files.list)
|
config_files = filter(lambda x: x.type == 'config', all_files.list)
|
||||||
config_paths = map(lambda x: "/" + str(x.path), config_files)
|
config_paths = map(lambda x: "/" + str(x.path), config_files)
|
||||||
|
|
||||||
@@ -77,8 +74,6 @@ def check_changes():
|
|||||||
check_package(pkg)
|
check_package(pkg)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.excepthook = handle_exception
|
|
||||||
|
|
||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
print "Checking all packages"
|
print "Checking all packages"
|
||||||
check_changes()
|
check_changes()
|
||||||
|
|||||||
Reference in New Issue
Block a user