[Pkg-debile-commits] [debile-slave] 24/28: Make compatible every plugin with new binary structure
Sylvestre Ledru
sylvestre at alioth.debian.org
Mon Aug 19 14:55:22 UTC 2013
This is an automated email from the git hooks/post-receive script.
sylvestre pushed a commit to branch master
in repository debile-slave.
commit 61c2e03ff87500934b29da15800e11d4a91440aa
Author: Léo Cavaillé <leo at cavaille.net>
Date: Fri Aug 16 11:15:44 2013 +0200
Make compatible every plugin with new binary structure
---
PACKAGING | 13 +++++++++----
ethel/commands/adequate.py | 7 ++++---
ethel/commands/piuparts.py | 6 +++---
ethel/runners/adequate.py | 12 +++++-------
ethel/runners/coccinelle.py | 1 +
ethel/runners/piuparts.py | 7 +++----
6 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/PACKAGING b/PACKAGING
index 05addaf..0876298 100644
--- a/PACKAGING
+++ b/PACKAGING
@@ -108,11 +108,13 @@ source-root-groups=root,sbuild
* Install what is required for checkers
# FIXME : only in experimental :/ not possible on wheezy with dependancies
* Install lintian4py
-
+ * Install pep8
+ * Install libperl-critic-perl
+ * Install cppcheck
(root)
* Install coccinelle
- download it from http://coccinelle.lip6.fr/download.php
- the version must be 1.0.0-rc18 or newer
+ http://leo.cavaille.net/public/coccinelle-1.0.0rc17+firehose.tar.gz
+ Install dependency : ocaml-nox python-dev
cd coccinelle
./configure --enable-python
make
@@ -120,7 +122,10 @@ source-root-groups=root,sbuild
(ethel)
* get the semantic patches
+ cd /home/ethel/ethel
bin/update-coccinelle-semantic-patches coccinelle_sp
* put in config.ini the path of coccinelle_sp
- coccinelle_patches_folder: /path/to/coccinelle_sp
+ coccinelle_patches_folder=/path/to/coccinelle_sp/CONTRIB/firehose
+
+
diff --git a/ethel/commands/adequate.py b/ethel/commands/adequate.py
index 12caf2a..2d52deb 100644
--- a/ethel/commands/adequate.py
+++ b/ethel/commands/adequate.py
@@ -1,9 +1,10 @@
from ethel.runners.adequate import adequate, version
from ethel.config import Config
+# For binaries only
-def run(debs, package, job, firehose):
- if any((not x.endswith(".deb") for x in debs)):
+def run(target, package, job, firehose):
+ if not target.endswith(".deb"):
raise Exception("Non-deb given")
config = Config()
@@ -15,7 +16,7 @@ def run(debs, package, job, firehose):
suite=package['suite'],
arch=arch
)
- return adequate(chroot_name, debs, firehose)
+ return adequate(chroot_name, target, package['name'], firehose)
def get_version():
return version()
diff --git a/ethel/commands/piuparts.py b/ethel/commands/piuparts.py
index 57cee6d..d65a955 100644
--- a/ethel/commands/piuparts.py
+++ b/ethel/commands/piuparts.py
@@ -2,9 +2,9 @@ from ethel.runners.piuparts import piuparts, version
from ethel.config import Config
-def run(debs, package, job, firehose):
+def run(target, package, job, firehose):
config = Config()
- if any((not x.endswith(".deb") for x in debs)):
+ if not target.endswith(".deb"):
raise Exception("Non-deb given")
arch = package['arch']
@@ -16,7 +16,7 @@ def run(debs, package, job, firehose):
arch=arch
)
- return piuparts(chroot_name, debs, firehose)
+ return piuparts(chroot_name, target, firehose)
def get_version():
return version()
diff --git a/ethel/runners/adequate.py b/ethel/runners/adequate.py
index 4131401..0ae35a9 100644
--- a/ethel/runners/adequate.py
+++ b/ethel/runners/adequate.py
@@ -5,26 +5,24 @@ from schroot import schroot
import os
-def adequate(chroot_name, packages, analysis):
+def adequate(chroot_name, target, package_name, analysis):
with schroot(chroot_name) as chroot:
- for deb in packages:
- chroot.copy(deb, "/tmp")
+ chroot.copy(target, "/tmp")
out, err, ret = chroot.run([
'apt-get', 'install', '-y', 'adequate'
], user='root')
out, err, ret = chroot.run([
- 'dpkg', '-i'
- ] + [
- "/tmp/%s" % (x) for x in packages
+ 'dpkg', '-i',
+ "/tmp/%s" % target
], user='root', return_codes=(0, 1))
out, err, ret = chroot.run([
'apt-get', 'install', '-y', '-f'
], user='root')
- out, err, ret = chroot.run(['adequate', deb.split("_", 1)[0]])
+ out, err, ret = chroot.run(['adequate', package_name])
failed = False
for issue in parse_adequate(out.splitlines()):
diff --git a/ethel/runners/coccinelle.py b/ethel/runners/coccinelle.py
index 21f15ca..aeb34d9 100644
--- a/ethel/runners/coccinelle.py
+++ b/ethel/runners/coccinelle.py
@@ -14,6 +14,7 @@ def coccinelle(dsc, analysis):
complete_out = ""
failed = False
for semantic_patch in list_semantic_patches():
+ print semantic_patch
out, err, ret = run_command([
"spatch",
"-D", "firehose",
diff --git a/ethel/runners/piuparts.py b/ethel/runners/piuparts.py
index a01a128..92d5d36 100644
--- a/ethel/runners/piuparts.py
+++ b/ethel/runners/piuparts.py
@@ -19,7 +19,7 @@ LINE_INFO = re.compile(
r"(?P<minutes>\d+)m(?P<sec>(\d(\.?))+)s (?P<severity>\w+): (?P<info>.*)")
-def piuparts(chroot, packages, analysis):
+def piuparts(chroot, target, analysis):
cfg = configparser.ConfigParser()
if cfg.read("/etc/schroot/chroot.d/%s" % (chroot)) == []:
raise Exception("Shit. No such tarball")
@@ -34,8 +34,7 @@ def piuparts(chroot, packages, analysis):
with schroot(chroot) as chroot:
chroot.copy(location, copy_location)
- for package in packages:
- chroot.copy(package, "/tmp")
+ chroot.copy(target, "/tmp")
print("[ ] Installing...")
chroot.run(['apt-get', 'install', '-y', 'piuparts'], user='root')
@@ -47,7 +46,7 @@ def piuparts(chroot, packages, analysis):
out, err, ret = chroot.run([
'piuparts',
'-b', copy_location,
- ] + [ "/tmp/%s" % (x) for x in packages ] + [
+ '/tmp/%s' % target,
'--warn-on-debsums-errors',
'--pedantic-purge-test',
], user='root')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-slave.git
More information about the Pkg-debile-commits
mailing list