Skip to content
Snippets Groups Projects
Commit 38017f2c authored by christian's avatar christian Committed by osak buildhauer user
Browse files

all subshells now print the their output

parent 2b1ccfe1
No related branches found
No related tags found
1 merge request!3WIP: Ws16
...@@ -88,11 +88,10 @@ def installProcess(): ...@@ -88,11 +88,10 @@ def installProcess():
window.ui.progressBar.show() window.ui.progressBar.show()
window.ui.progressBar.setRange(0,0) window.ui.progressBar.setRange(0,0)
pkglist = getPackagelistTree() pkglist = getPackagelistTree()
print(pkglist) installPackages(pkglist)
#installPackages() #window.ui.progressBar.setRange(0,1)
window.ui.progressBar.setRange(0,1) #window.ui.progressBar.setValue(1)
window.ui.progressBar.setValue(1) makeDoku(pkglist)
makeDocu(pkglist)
showSuccBox() showSuccBox()
def showSuccBox(): def showSuccBox():
...@@ -128,25 +127,23 @@ def checkIfRoot(): ...@@ -128,25 +127,23 @@ def checkIfRoot():
else: else:
pass pass
def installPackages(): def installPackages(strlist):
command=["echo", "apt-get", "install","--quiet", "-y", "--force-yes"] command=["echo", "apt-get", "install","--quiet", "-y", "--force-yes"," ".join(strlist)]
#command=["apt-get", "install","--quiet", "-y", "--force-yes"] #command=["apt-get", "install","--quiet", "-y", "--force-yes"]
subprocess.check_call(command+pkglist, shell=False) #subprocess.call(command, shell=False)
stdout_installPackages = subprocess.check_output(command, shell=False)
print(stdout_installPackages)
def mountStick(): def mountStick():
command=[basepath+"infuse_offline_repo.sh"] command=[basepath+"infuse_offline_repo.sh"]
try: stdout_mountStick = subprocess.check_output(command, shell=False)
subprocess.run(command, shell=False) print(stdout_mountStick)
except:
showErrorBox("subprocess infuse_offlinerepo.sh failed.")
def makeDocu(): def makeDoku(stringlist):
command=["echo", "./makeDoku.sh", os.path.dirname(basepath), " ".join(pkglist)] command=["echo", "./makeDoku.sh", os.path.dirname(basepath), " ".join(stringlist)]
#command=["./makeDoku.sh", os.path.dirname(basepath), " ".join(pkglist)] #command=["./makeDoku.sh", os.path.dirname(basepath), " ".join(pkglist)]
try: stdout_makeDoku = subprocess.check_output(command, shell=False)
subprocess.run(command, shell=False) print(stdout_makeDoku)
except:
showErrorBox("Subprocess makeDocu.sh failed")
def getPackagelist(): def getPackagelist():
installList = [] installList = []
...@@ -217,7 +214,7 @@ if __name__ == '__main__': ...@@ -217,7 +214,7 @@ if __name__ == '__main__':
#mountStick() #mountStick()
window = Main() window = Main()
window.setWindowTitle("Linux Install Party Software Installer") window.setWindowTitle("Linux Install Party Software Installer")
with open('./offline_repo.json', 'r') as inputfile: with open('../offline_repo.json', 'r') as inputfile:
#with open('./test.json', 'r') as inputfile: #with open('./test.json', 'r') as inputfile:
data=json.loads(inputfile.read(), object_pairs_hook=OrderedDict) data=json.loads(inputfile.read(), object_pairs_hook=OrderedDict)
fillTreeView(data, window.ui.treeView) fillTreeView(data, window.ui.treeView)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment