summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-05 11:25:39 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-05 11:25:39 +0100
commitfe0a6e47ce7b3a92b298d64d7ea98dcd63cd86d0 (patch)
treee100233d348fbca5242140a9c4cd920981e6c414 /src
parent5ba5c8b8efc9a381aff1e4e51f3c795786b25f9f (diff)
convert all functions to camelcase
Diffstat (limited to 'src')
-rwxr-xr-xsrc/frontend/cli/sisyphus-cli.py71
-rwxr-xr-xsrc/frontend/gui/sisyphus-gui.py66
2 files changed, 69 insertions, 68 deletions
diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py
index f02ef58..3aea398 100755
--- a/src/frontend/cli/sisyphus-cli.py
+++ b/src/frontend/cli/sisyphus-cli.py
@@ -3,42 +3,43 @@
import sys
from libsisyphus import *
-check_system_mode()
+#checkSystemMode()
-PKGLIST = sys.argv[2:]
+pkgList = sys.argv[2:]
if "__main__" == __name__:
- if "install" in sys.argv[1:]:
- sisyphus_pkg_install(PKGLIST)
- elif "uninstall" in sys.argv[1:]:
- sisyphus_pkg_uninstall(PKGLIST)
- elif "force-uninstall" in sys.argv[1:]:
- sisyphus_pkg_force_uninstall(PKGLIST)
- elif "remove-orphans" in sys.argv[1:]:
- sisyphus_pkg_remove_orphans()
- elif "update" in sys.argv[1:]:
- sisyphus_pkg_system_update()
- elif "upgrade" in sys.argv[1:]:
- sisyphus_pkg_system_upgrade()
- elif "search" in sys.argv[1:]:
- sisyphus_pkg_search(PKGLIST)
- elif "spmsync" in sys.argv[1:]:
- sisyphus_pkg_spmsync()
- elif "rescue" in sys.argv[1:]:
- sisyphus_db_rescue()
- elif "sysinfo" in sys.argv[1:]:
- sisyphus_pkg_sysinfo()
- elif "mirror" in sys.argv[1:]:
- if not sys.argv[2:]:
- sisyphus_pkg_help()
- elif "list" in sys.argv[2]:
- listRepo()
- elif "set" in sys.argv[2:]:
- if not sys.argv[3:]:
- sisyphus_pkg_help()
+ if sys.argv[1:]:
+ if "install" in sys.argv[1:]:
+ startInstall(pkgList)
+ elif "uninstall" in sys.argv[1:]:
+ startUninstall(pkgList)
+ elif "force-uninstall" in sys.argv[1:]:
+ startUninstallForce(pkgList)
+ elif "remove-orphans" in sys.argv[1:]:
+ removeOrphans()
+ elif "update" in sys.argv[1:]:
+ startUpdate()
+ elif "upgrade" in sys.argv[1:]:
+ startUpgrade()
+ elif "search" in sys.argv[1:]:
+ startSearch(pkgList)
+ elif "spmsync" in sys.argv[1:]:
+ syncSpm()
+ elif "rescue" in sys.argv[1:]:
+ rescueDB()
+ elif "sysinfo" in sys.argv[1:]:
+ sysInfo()
+ elif "mirror" in sys.argv[1:]:
+ if "list" in sys.argv[2:]:
+ listRepo()
+ elif "set" in sys.argv[2:]:
+ if sys.argv[3:]:
+ setRepo(sys.argv[3:])
+ else:
+ showHelp()
else:
- setRepo(sys.argv[3:])
- elif "help" in sys.argv[1:]:
- sisyphus_pkg_help()
- elif not sys.argv[1:]:
- sisyphus_pkg_help()
+ showHelp()
+ elif "help" in sys.argv[1:]:
+ showHelp()
+ else:
+ showHelp()
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py
index f52592d..ef4d545 100755
--- a/src/frontend/gui/sisyphus-gui.py
+++ b/src/frontend/gui/sisyphus-gui.py
@@ -378,65 +378,65 @@ class MainWorker(QtCore.QObject):
@QtCore.pyqtSlot()
def startUpdate(self):
self.started.emit()
- sisyphus_pkg_system_update()
+ startUpdate()
self.finished.emit()
@QtCore.pyqtSlot()
def startInstall(self):
self.started.emit()
pkgList = Sisyphus.pkgList
- redcore_sync()
- generate_sisyphus_local_packages_table_csv_pre()
- portage_call = subprocess.Popen(
+ syncAll()
+ makeLocalPkgCSVpre()
+ portageExec = subprocess.Popen(
['emerge', '-q'] + pkgList, stdout=subprocess.PIPE)
- atexit.register(kill_bg_portage, portage_call)
- for portage_output in io.TextIOWrapper(portage_call.stdout, encoding="utf-8"):
- self.strReady.emit(portage_output.rstrip())
- generate_sisyphus_local_packages_table_csv_post()
- sync_sisyphus_local_packages_table_csv()
+ atexit.register(portageKill, portageExec)
+ for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
+ self.strReady.emit(portageOutput.rstrip())
+ makeLocalPkgCSVpost()
+ syncLocalPkgTable()
self.finished.emit()
@QtCore.pyqtSlot()
def startUninstall(self):
self.started.emit()
pkgList = Sisyphus.pkgList
- redcore_sync()
- generate_sisyphus_local_packages_table_csv_pre()
- portage_call = subprocess.Popen(
+ syncAll()
+ makeLocalPkgCSVpre()
+ portageExec = subprocess.Popen(
['emerge', '--depclean', '-q'] + pkgList, stdout=subprocess.PIPE)
- atexit.register(kill_bg_portage, portage_call)
- for portage_output in io.TextIOWrapper(portage_call.stdout, encoding="utf-8"):
- self.strReady.emit(portage_output.rstrip())
- generate_sisyphus_local_packages_table_csv_post()
- sync_sisyphus_local_packages_table_csv()
+ atexit.register(portageKill, portageExec)
+ for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
+ self.strReady.emit(portageOutput.rstrip())
+ makeLocalPkgCSVpost()
+ syncLocalPkgTable()
self.finished.emit()
@QtCore.pyqtSlot()
def startUpgrade(self):
self.started.emit()
- redcore_sync()
- generate_sisyphus_local_packages_table_csv_pre()
- portage_call = subprocess.Popen(
+ syncAll()
+ makeLocalPkgCSVpre()
+ portageExec = subprocess.Popen(
['emerge', '-uDNq', '--backtrack=100', '--with-bdeps=y', '@world'], stdout=subprocess.PIPE)
- atexit.register(kill_bg_portage, portage_call)
- for portage_output in io.TextIOWrapper(portage_call.stdout, encoding="utf-8"):
- self.strReady.emit(portage_output.rstrip())
- generate_sisyphus_local_packages_table_csv_post()
- sync_sisyphus_local_packages_table_csv()
+ atexit.register(portageKill, portageExec)
+ for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
+ self.strReady.emit(portageOutput.rstrip())
+ makeLocalPkgCSVpost()
+ syncLocalPkgTable()
self.finished.emit()
@QtCore.pyqtSlot()
def cleanOrphans(self):
self.started.emit()
- redcore_sync()
- generate_sisyphus_local_packages_table_csv_pre()
- portage_call = subprocess.Popen(
+ syncAll()
+ makeLocalPkgCSVpre()
+ portageExec = subprocess.Popen(
['emerge', '--depclean', '-q'], stdout=subprocess.PIPE)
- atexit.register(kill_bg_portage, portage_call)
- for portage_output in io.TextIOWrapper(portage_call.stdout, encoding="utf-8"):
- self.strReady.emit(portage_output.rstrip())
- generate_sisyphus_local_packages_table_csv_post()
- sync_sisyphus_local_packages_table_csv()
+ atexit.register(portageKill, portageExec)
+ for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
+ self.strReady.emit(portageOutput.rstrip())
+ makeLocalPkgCSVpost()
+ syncLocalPkgTable()
self.finished.emit()