nxion / upi Goto Github PK
View Code? Open in Web Editor NEWPost installation script for Ubuntu - Will install and configure i3
License: GNU General Public License v3.0
Post installation script for Ubuntu - Will install and configure i3
License: GNU General Public License v3.0
From what it seems that when the script tries to execute code block starting on line 322-329:
# Xresources
if (config.has_option("dotfiles", "xres")):
showexec(_("Downloading the Xresources file"), _WGET+"-O $HOME/.Xresources "+config.get("dotfiles", "xres"))
showexec(_("Installing the Xresources file"), "chown -R $me:$me $HOME/.Xresources")
# xinitrc
if (config.has_option("dotfiles", "xinit")):
showexec(_("Downloading the xinitrc file"), _WGET+"-O $HOME/.xinitrc "+config.get("dotfiles", "xres"))
showexec(_("Installing the xinitrc file"), "chown -R $me:$me $HOME/.xinitrc")
the log that gets created and is located in /tmp
will show returncode 32512
when it tries to retrieve the files referenced in the .cfg
file. Then the next line in the code block above for each file are to execute the installation but that gives a returncode 512
.
I did find that there is a possible bug with Python that os.system
will return a code of 32512 when there are to many characters in the command. In the bug report it mentions Python3 but this also seems to exist with Python2.7. Since you get 32512, the 512 code goes hand and hand. 512 is sayoing that it cannot find the command you want.
the showexec
functions is below:
def showexec(description, command, exitonerror = 0, presskey = 0, waitmessage = ""):
"""
Exec a system command with a pretty status display (Running / Ok / Warning / Error)
By default (exitcode=0), the function did not exit if the command failed
"""
if _DEBUG:
logging.debug("%s" % description)
logging.debug("%s" % command)
# Wait message
if (waitmessage == ""):
waitmessage = description
# Manage very long description
if (len(waitmessage) > 65):
waitmessage = waitmessage[0:65] + "..."
if (len(description) > 65):
description = description[0:65] + "..."
# Display the command
if (presskey == 1):
status = _("[ ENTER ]")
else:
status = _("[Running]")
statuscolor = colors.BLUE
sys.stdout.write (colors.NO + "%s" % waitmessage + statuscolor + "%s" % status.rjust(79-len(waitmessage)) + colors.NO)
sys.stdout.flush()
# Wait keypressed (optionnal)
if (presskey == 1):
try:
input = raw_input
except:
pass
raw_input()
# Run the command
returncode = os.system ("/bin/sh -c \"%s\" >> /dev/null 2>&1" % command)
# Display the result
if ((returncode == 0) or (returncode == 25600)):
status = "[ OK ]"
statuscolor = colors.GREEN
else:
if exitonerror == 0:
status = "[Warning]"
statuscolor = colors.ORANGE
else:
status = "[ Error ]"
statuscolor = colors.RED
sys.stdout.write (colors.NO + "\r%s" % description + statuscolor + "%s\n" % status.rjust(79-len(description)) + colors.NO)
if _DEBUG:
logging.debug (_("Returncode = %d") % returncode)
# Stop the program if returncode and exitonerror != 0
if ((returncode != 0) & (exitonerror != 0)):
if _DEBUG:
logging.debug (_("Forced to quit"))
exit(exitonerror)
Still working on finding a fix...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.