[javapackages] [xmvn-resolve] Return empty result for empty request
by Michael Šimáček
commit 98d04f9547dc3870ec52b819674938ec7fc06e0c
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Fri Jan 2 14:29:06 2015 +0100
[xmvn-resolve] Return empty result for empty request
python/javapackages/xmvn/xmvn_resolve.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/python/javapackages/xmvn/xmvn_resolve.py b/python/javapackages/xmvn/xmvn_resolve.py
index 76ff8da..597886a 100644
--- a/python/javapackages/xmvn/xmvn_resolve.py
+++ b/python/javapackages/xmvn/xmvn_resolve.py
@@ -53,6 +53,8 @@ class XMvnResolve(object):
@staticmethod
def process_raw_request(raw_request_list):
+ if not raw_request_list:
+ return []
command = "{tool} {args}".format(tool=XMvnResolve.tool,
args="--raw-request")
request = XMvnResolve._join_raw_requests(raw_request_list)
9 years, 4 months
[javapackages] Raise an exception if xmvn-resolve fails
by Michael Šimáček
commit 8171d1530bff369331325169d5bcb4d260367533
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Fri Jan 2 13:57:40 2015 +0100
Raise an exception if xmvn-resolve fails
python/javapackages/xmvn/xmvn_resolve.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/python/javapackages/xmvn/xmvn_resolve.py b/python/javapackages/xmvn/xmvn_resolve.py
index 3722401..76ff8da 100644
--- a/python/javapackages/xmvn/xmvn_resolve.py
+++ b/python/javapackages/xmvn/xmvn_resolve.py
@@ -59,6 +59,8 @@ class XMvnResolve(object):
test_env = os.environ.get("JAVAPACKAGES_XMVN_RESOLVE_TEST", None)
if not test_env:
rc, stdout, stderr = execute_command(command, input=request)
+ if rc:
+ raise Exception("xmvn-resolve failed:\n" + stderr)
else:
stdout = ""
with open(test_env, "rb") as f:
9 years, 4 months
[smack] disable bosh and resolver-minidns modules
by gil
commit 72390fb53057ffa5d347f3dc31d464c05fbb97d8
Author: gil <puntogil(a)libero.it>
Date: Fri Jan 2 12:59:06 2015 +0100
disable bosh and resolver-minidns modules
smack.spec | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/smack.spec b/smack.spec
index 51aa146..3bd4b3c 100644
--- a/smack.spec
+++ b/smack.spec
@@ -1,3 +1,7 @@
+%if 0%{?fedora}
+%bcond_with bosh
+%bcond_with minidns
+%endif
Name: smack
Version: 4.0.6
Release: 1%{?dist}
@@ -17,22 +21,17 @@ Source9: http://repo1.maven.org/maven2/org/igniterealtime/smack/smack-tcp/
Source10: http://repo1.maven.org/maven2/org/igniterealtime/smack/smack-bosh/%{versi...
Source11: http://repo1.maven.org/maven2/org/igniterealtime/smack/smack-resolver-min...
-# http://repo1.maven.org/maven2/org/igniterealtime/smack/smack-jingle/4.0.0...
-# javax.media:jmf:2.1.1e
+# http://repo1.maven.org/maven2/org/igniterealtime/smack/smack-jingle/4.0.6...
+# smack-jingle use NON free javax.media:jmf:2.1.1e
# Default use gradle
Source12: smack-pom.xml
+BuildRequires: maven-local
BuildRequires: mvn(com.jamesmurty.utils:java-xmlbuilder)
BuildRequires: mvn(com.jcraft:jzlib)
-# https://bugzilla.redhat.com/show_bug.cgi?id=1177451
-BuildRequires: mvn(de.measite.minidns:minidns)
BuildRequires: mvn(dnsjava:dnsjava)
BuildRequires: mvn(junit:junit)
-# https://bugzilla.redhat.com/show_bug.cgi?id=1177442
-BuildRequires: mvn(org.igniterealtime.jbosh:jbosh)
-# https://bugzilla.redhat.com/show_bug.cgi?id=1177453
-BuildRequires: mvn(org.igniterealtime.jxmpp:jxmpp-util-cache)
BuildRequires: mvn(org.mockito:mockito-core)
BuildRequires: mvn(org.powermock:powermock-api-mockito)
BuildRequires: mvn(org.powermock:powermock-module-junit4)
@@ -40,7 +39,18 @@ BuildRequires: mvn(org.powermock:powermock-reflect)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildRequires: mvn(xmlunit:xmlunit)
BuildRequires: mvn(xpp3:xpp3)
-BuildRequires: maven-local
+
+%if %{with bosh}
+# https://bugzilla.redhat.com/show_bug.cgi?id=1177442
+BuildRequires: mvn(org.igniterealtime.jbosh:jbosh)
+%endif
+
+%if %{with minidns}
+# https://bugzilla.redhat.com/show_bug.cgi?id=1177451
+BuildRequires: mvn(de.measite.minidns:minidns)
+# https://bugzilla.redhat.com/show_bug.cgi?id=1177453
+BuildRequires: mvn(org.igniterealtime.jxmpp:jxmpp-util-cache)
+%endif
BuildArch: noarch
@@ -82,6 +92,14 @@ cp -p %{SOURCE11} %{name}-resolver-minidns/pom.xml
cp -p %{SOURCE12} pom.xml
sed -i "s|@VERSION@|%{version}|" pom.xml
+# Disabled for now. Unavailable deps
+%if %{without bosh}
+%pom_disable_module %{name}-bosh
+%endif
+%if %{without minidns}
+%pom_disable_module %{name}-resolver-minidns
+%endif
+
for m in core compression-jzlib debug experimental extensions legacy resolver-dnsjava resolver-javax tcp bosh resolver-minidns; do
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin %{name}-${m} "
9 years, 4 months
[javapackages] [test] Pass default config to all depgen tests, if not specified otherwise
by Michal Srb
commit ba5103c3d4344094d46f8fbbe0d313e258839bce
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Jan 2 12:45:36 2015 +0100
[test] Pass default config to all depgen tests, if not specified otherwise
test/test_common.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/test/test_common.py b/test/test_common.py
index b0830cd..bd5ad40 100644
--- a/test/test_common.py
+++ b/test/test_common.py
@@ -222,6 +222,10 @@ def rpmgen_process_args(args, kwargs):
env.update({"JAVACONFDIRS": os.pathsep.join(confdirs)})
kwargs.update({"env": env})
del kwargs["javaconfdirs"]
+ else:
+ env = {}
+ env.update({"JAVACONFDIRS": os.path.abspath(os.path.join(DIRPATH, '..', 'etc'))})
+ kwargs.update({"env": env})
if "xmvnresolve_output" in kwargs:
dest = "/tmp/"
9 years, 4 months
[javapackages] Fix setting javaconfdirs to tests
by Mikolaj Izdebski
commit 20c9ee28a64f1ca584a10764393099e37e549aa3
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Fri Jan 2 12:30:43 2015 +0100
Fix setting javaconfdirs to tests
test/maven_req_test.py | 4 ++--
test/test_common.py | 5 -----
2 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/test/maven_req_test.py b/test/maven_req_test.py
index 41bb067..a1ac898 100644
--- a/test/maven_req_test.py
+++ b/test/maven_req_test.py
@@ -159,7 +159,7 @@ class TestMavenReq(unittest.TestCase):
self.assertEqual(set(want), set(sout))
- @mavenreq(["require1/buildroot/usr/share/maven-metadata/require.xml"], config='alternative-java')
+ @mavenreq(["require1/buildroot/usr/share/maven-metadata/require.xml"], javaconfdirs=['alternative-java'])
def test_java_config(self, stdout, stderr, return_value):
self.assertEqual(return_value, 0, stderr)
sout = [x for x in stdout.split('\n') if x]
@@ -167,7 +167,7 @@ class TestMavenReq(unittest.TestCase):
"mvn(org.apache.maven:maven-project)")
self.assertEqual(set(want), set(sout))
- @mavenreq(["require_multi/buildroot/usr/share/maven-metadata/require.xml"], config='filtered')
+ @mavenreq(["require_multi/buildroot/usr/share/maven-metadata/require.xml"], javaconfdirs=['filtered'])
def test_dep_filtering(self, stdout, stderr, return_value):
self.assertEqual(return_value, 0, stderr)
sout = [x for x in stdout.split('\n') if x]
diff --git a/test/test_common.py b/test/test_common.py
index a322ea1..b0830cd 100644
--- a/test/test_common.py
+++ b/test/test_common.py
@@ -213,11 +213,6 @@ def javadocreq(*args, **kwargs):
def rpmgen_process_args(args, kwargs):
- if "config" in kwargs:
- config_path = os.path.join(DIRPATH, 'data', 'config', kwargs["config"])
- else:
- config_path = os.path.abspath(os.path.join(DIRPATH, '..', 'etc'))
- kwargs.update({"config": config_path})
if "javaconfdirs" in kwargs:
confdirs = [os.path.join(DIRPATH, "data", "config", conf) for conf in kwargs["javaconfdirs"]]
try:
9 years, 4 months
[javapackages] Pass --rpm-pid to depgenerators during tests
by Mikolaj Izdebski
commit 98ede4c1d5d9198bdd556c4a28d92f45ec50cfcc
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Fri Jan 2 12:25:51 2015 +0100
Pass --rpm-pid to depgenerators during tests
test/test_common.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/test/test_common.py b/test/test_common.py
index 3478b2d..a322ea1 100644
--- a/test/test_common.py
+++ b/test/test_common.py
@@ -143,7 +143,8 @@ def call_rpmgen(rpmgen_name, filelist_prefix, filelist, env=None,
except OSError:
pass
for line in stdin:
- ret = call_script(scriptpath, ["--cachedir", "/tmp"],
+ # FIXME this PID is a temporary hack
+ ret = call_script(scriptpath, ["--cachedir", "/tmp", "--rpm-pid", "1"],
stdin=line, extra_env=env)
try:
shutil.rmtree("/tmp/.javapackages_cache/")
9 years, 4 months
[javapackages] Fix exit status code in depgenerators
by Mikolaj Izdebski
commit 565a2722ba696296542e8a7f901538de7eeb3b3f
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Fri Jan 2 12:24:10 2015 +0100
Fix exit status code in depgenerators
python/javapackages/common/util.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/python/javapackages/common/util.py b/python/javapackages/common/util.py
index 4b065ba..f893cc4 100644
--- a/python/javapackages/common/util.py
+++ b/python/javapackages/common/util.py
@@ -54,6 +54,7 @@ def kill_parent_process(rpmconf):
os.kill(rpmconf.rpm_pid, signal.SIGTERM)
except OSError:
pass
+ sys.exit(1)
def args_to_unicode(args):
9 years, 4 months
[javapackages] Ignore errors when trying to kill rpm
by Mikolaj Izdebski
commit 0914ed90f2f3b2707f93829a1e6b2046c728f4eb
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Fri Jan 2 12:19:24 2015 +0100
Ignore errors when trying to kill rpm
python/javapackages/common/util.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/python/javapackages/common/util.py b/python/javapackages/common/util.py
index 158bee5..4b065ba 100644
--- a/python/javapackages/common/util.py
+++ b/python/javapackages/common/util.py
@@ -50,7 +50,10 @@ def kill_parent_process(rpmconf):
sys.stderr.flush()
# rpmbuild ignores non-zero exit codes, but this is bad. Make sure
# the build fails and doesn't silently ignore problems
- os.kill(rpmconf.rpm_pid, signal.SIGTERM)
+ try:
+ os.kill(rpmconf.rpm_pid, signal.SIGTERM)
+ except OSError:
+ pass
def args_to_unicode(args):
9 years, 4 months
[javapackages] Parse --rpm-pid as string and then cast to int
by Mikolaj Izdebski
commit bd83def6de6f963b1b104aa7d26a6ec8397761a3
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Fri Jan 2 12:18:53 2015 +0100
Parse --rpm-pid as string and then cast to int
python/javapackages/common/util.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/python/javapackages/common/util.py b/python/javapackages/common/util.py
index 7a9ff21..158bee5 100644
--- a/python/javapackages/common/util.py
+++ b/python/javapackages/common/util.py
@@ -89,7 +89,7 @@ def _init_rpmgen_logging():
def _parse_argv(argv):
parser = OptionParser()
parser.add_option("--cachedir", dest="cachedir")
- parser.add_option("--rpm-pid", type="int", dest="rpm_pid")
+ parser.add_option("--rpm-pid", dest="rpm_pid")
parser.add_option("--scl", dest="scl", default=None)
return parser.parse_args()
@@ -101,8 +101,10 @@ def _parse_rpmgen_args(argv):
if not options.cachedir:
raise Exception("Missing option: --cachedir")
options.cachedir = _get_cachedir(options.cachedir)
+
if not options.rpm_pid:
raise Exception("Missing option: --rpm-pid")
+ options.rpm_pid = int(options.rpm_pid)
return options
9 years, 4 months