kozmetik...
This commit is contained in:
@@ -96,7 +96,7 @@ def make(parameters = ''):
|
||||
raise MakeError(_('Make failed.'))
|
||||
|
||||
def fixInfoDir():
|
||||
infoDir = "%s/usr/share/info/dir" % get.installDIR()
|
||||
infoDir = '%s/usr/share/info/dir' % get.installDIR()
|
||||
if can_access_file(infoDir):
|
||||
unlink(infoDir)
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ def make(parameters = ''):
|
||||
raise InstallError(_('No Makefile found.'))
|
||||
|
||||
def fixInfoDir():
|
||||
infoDir = "%s/usr/share/info/dir" % get.installDIR()
|
||||
infoDir = '%s/usr/share/info/dir' % get.installDIR()
|
||||
if can_access_file(infoDir):
|
||||
unlink(infoDir)
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ def curPYTHON():
|
||||
|
||||
def curPERL():
|
||||
''' 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):
|
||||
'''returns any given environ variable'''
|
||||
|
||||
@@ -77,7 +77,7 @@ def install(parameters = 'install'):
|
||||
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:
|
||||
if can_access_file(podFile):
|
||||
|
||||
@@ -65,10 +65,10 @@ def run(parameters = ''):
|
||||
if system('python %s' % (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 '''
|
||||
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:
|
||||
if compiledFile.endswith(".pyc") or compiledFile.endswith(".pyo"):
|
||||
if can_access_file("%s/%s" % (root,compiledFile)):
|
||||
unlink("%s/%s" % (root,compiledFile))
|
||||
if compiledFile.endswith('.pyc') or compiledFile.endswith('.pyo'):
|
||||
if can_access_file('%s/%s' % (root,compiledFile)):
|
||||
unlink('%s/%s' % (root,compiledFile))
|
||||
|
||||
@@ -68,7 +68,7 @@ def chmod(filePath, mode = 0755):
|
||||
else:
|
||||
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'''
|
||||
if can_access_file(filePath):
|
||||
try:
|
||||
|
||||
@@ -91,7 +91,8 @@ class Dirs:
|
||||
# because of uninitialized context (ctx) because of exportFlags().
|
||||
#
|
||||
# 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
|
||||
|
||||
def initVariables():
|
||||
|
||||
Reference in New Issue
Block a user