/usr/lib/pardus/pisi/build.py:420: Statement appears to have no effect
/usr/lib/pardus/pisi/build.py:563: Parameter (build_no) not used /usr/lib/pardus/pisi/build.py:666: (file) shadows builtin /usr/lib/pardus/pisi/build.py:672: (file) shadows builtin
This commit is contained in:
+7
-8
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
# python standard library
|
# python standard library
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import glob
|
import glob
|
||||||
import copy
|
import copy
|
||||||
import stat
|
import stat
|
||||||
@@ -417,7 +416,7 @@ class Builder:
|
|||||||
self.actionLocals[func]()
|
self.actionLocals[func]()
|
||||||
else:
|
else:
|
||||||
if mandatory:
|
if mandatory:
|
||||||
Error, _("unable to call function from actions: %s") %func
|
raise Error(_("unable to call function from actions: %s") % func)
|
||||||
|
|
||||||
os.chdir(curDir)
|
os.chdir(curDir)
|
||||||
return True
|
return True
|
||||||
@@ -560,7 +559,7 @@ class Builder:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pisi.util.strip_directory(install_dir)
|
pisi.util.strip_directory(install_dir)
|
||||||
|
|
||||||
def gen_metadata_xml(self, package, build_no=None):
|
def gen_metadata_xml(self, package):
|
||||||
"""Generate the metadata.xml file for build source.
|
"""Generate the metadata.xml file for build source.
|
||||||
|
|
||||||
metadata.xml is composed of the information from specfile plus
|
metadata.xml is composed of the information from specfile plus
|
||||||
@@ -663,15 +662,15 @@ class Builder:
|
|||||||
ctx.ui.warning('Package file %s may be corrupt. Skipping.' % old_package_fn)
|
ctx.ui.warning('Package file %s may be corrupt. Skipping.' % old_package_fn)
|
||||||
|
|
||||||
for root, dirs, files in os.walk(ctx.config.compiled_packages_dir()):
|
for root, dirs, files in os.walk(ctx.config.compiled_packages_dir()):
|
||||||
for file in files:
|
for f in files:
|
||||||
locate_old_package(pisi.util.join_path(root,file))
|
locate_old_package(pisi.util.join_path(root,f))
|
||||||
|
|
||||||
outdir=ctx.get_option('output_dir')
|
outdir=ctx.get_option('output_dir')
|
||||||
if not outdir:
|
if not outdir:
|
||||||
outdir = '.'
|
outdir = '.'
|
||||||
for file in [pisi.util.join_path(outdir,entry) for entry in os.listdir(outdir)]:
|
for f in [pisi.util.join_path(outdir,entry) for entry in os.listdir(outdir)]:
|
||||||
if os.path.isfile(file):
|
if os.path.isfile(f):
|
||||||
locate_old_package(file)
|
locate_old_package(f)
|
||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
return (1, None)
|
return (1, None)
|
||||||
|
|||||||
Reference in New Issue
Block a user