kozmetik...
This commit is contained in:
@@ -96,7 +96,7 @@ def make(parameters = ''):
|
|||||||
raise MakeError(_('Make failed.'))
|
raise MakeError(_('Make failed.'))
|
||||||
|
|
||||||
def fixInfoDir():
|
def fixInfoDir():
|
||||||
infoDir = "%s/usr/share/info/dir" % get.installDIR()
|
infoDir = '%s/usr/share/info/dir' % get.installDIR()
|
||||||
if can_access_file(infoDir):
|
if can_access_file(infoDir):
|
||||||
unlink(infoDir)
|
unlink(infoDir)
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ def make(parameters = ''):
|
|||||||
raise InstallError(_('No Makefile found.'))
|
raise InstallError(_('No Makefile found.'))
|
||||||
|
|
||||||
def fixInfoDir():
|
def fixInfoDir():
|
||||||
infoDir = "%s/usr/share/info/dir" % get.installDIR()
|
infoDir = '%s/usr/share/info/dir' % get.installDIR()
|
||||||
if can_access_file(infoDir):
|
if can_access_file(infoDir):
|
||||||
unlink(infoDir)
|
unlink(infoDir)
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ def curPYTHON():
|
|||||||
|
|
||||||
def curPERL():
|
def curPERL():
|
||||||
''' returns currently used perl's version'''
|
''' returns currently used perl's version'''
|
||||||
return os.path.realpath("/usr/bin/perl").split("perl")[1]
|
return os.path.realpath('/usr/bin/perl').split('perl')[1]
|
||||||
|
|
||||||
def ENV(environ):
|
def ENV(environ):
|
||||||
'''returns any given environ variable'''
|
'''returns any given environ variable'''
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ def install(parameters = 'install'):
|
|||||||
fixLocalPod()
|
fixLocalPod()
|
||||||
|
|
||||||
def fixLocalPod():
|
def fixLocalPod():
|
||||||
podFiles = glob.glob("%s/usr/lib/*/*/*/perllocal.pod" % get.installDIR())
|
podFiles = glob.glob('%s/usr/lib/*/*/*/perllocal.pod' % get.installDIR())
|
||||||
|
|
||||||
for podFile in podFiles:
|
for podFile in podFiles:
|
||||||
if can_access_file(podFile):
|
if can_access_file(podFile):
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ def run(parameters = ''):
|
|||||||
if system('python %s' % (parameters)):
|
if system('python %s' % (parameters)):
|
||||||
raise RunTimeError, _('Running %s failed.') % parameters
|
raise RunTimeError, _('Running %s failed.') % parameters
|
||||||
|
|
||||||
def fixCompiledPy(lookInto = "/usr/lib/%s/" % get.curPYTHON()):
|
def fixCompiledPy(lookInto = '/usr/lib/%s/' % get.curPYTHON()):
|
||||||
''' cleans *.py[co] from packages '''
|
''' cleans *.py[co] from packages '''
|
||||||
for root, dirs, files in os.walk("%s/%s" % (get.installDIR(),lookInto)):
|
for root, dirs, files in os.walk('%s/%s' % (get.installDIR(),lookInto)):
|
||||||
for compiledFile in files:
|
for compiledFile in files:
|
||||||
if compiledFile.endswith(".pyc") or compiledFile.endswith(".pyo"):
|
if compiledFile.endswith('.pyc') or compiledFile.endswith('.pyo'):
|
||||||
if can_access_file("%s/%s" % (root,compiledFile)):
|
if can_access_file('%s/%s' % (root,compiledFile)):
|
||||||
unlink("%s/%s" % (root,compiledFile))
|
unlink('%s/%s' % (root,compiledFile))
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ def chmod(filePath, mode = 0755):
|
|||||||
else:
|
else:
|
||||||
ctx.ui.error(_('ActionsAPI [chmod]: File %s doesn\'t exists.') % (fileName))
|
ctx.ui.error(_('ActionsAPI [chmod]: File %s doesn\'t exists.') % (fileName))
|
||||||
|
|
||||||
def chown(filePath, uid = "root", gid = "root"):
|
def chown(filePath, uid = 'root', gid = 'root'):
|
||||||
'''change the owner and group id of filePath to uid and gid'''
|
'''change the owner and group id of filePath to uid and gid'''
|
||||||
if can_access_file(filePath):
|
if can_access_file(filePath):
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ class Dirs:
|
|||||||
# because of uninitialized context (ctx) because of exportFlags().
|
# because of uninitialized context (ctx) because of exportFlags().
|
||||||
#
|
#
|
||||||
# We import this modue from build.py becase we need to reset/init glb
|
# We import this modue from build.py becase we need to reset/init glb
|
||||||
# for each build. # See bug #2575
|
# for each build.
|
||||||
|
# See bug #2575
|
||||||
glb = None
|
glb = None
|
||||||
|
|
||||||
def initVariables():
|
def initVariables():
|
||||||
|
|||||||
Reference in New Issue
Block a user