Blob Blame Raw
From 401ab7370d01627b4fc1a57d454276d788f18e39 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Thu, 20 Nov 2014 16:22:52 +0100
Subject: [PATCH 5/6] Improve patterns for matching OSGi manifests

---
 depgenerators/fileattrs/osgi.attr | 2 +-
 depgenerators/osgi.prov           | 2 +-
 depgenerators/osgi.req            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/depgenerators/fileattrs/osgi.attr b/depgenerators/fileattrs/osgi.attr
index ae858b5..83e8c8d 100644
--- a/depgenerators/fileattrs/osgi.attr
+++ b/depgenerators/fileattrs/osgi.attr
@@ -1,4 +1,4 @@
 %__osgi_provides	%{_rpmconfigdir}/osgi.prov
 %__osgi_requires	%{_rpmconfigdir}/osgi.req
-%__osgi_path	^(.*\\.jar$|((%{_prefix}/lib|%{_datadir})/.*/MANIFEST.MF))
+%__osgi_path	^(.*\\.jar|((%{_prefix}/lib|%{_datadir})/.*/META-INF/MANIFEST.MF))$
 
diff --git a/depgenerators/osgi.prov b/depgenerators/osgi.prov
index 53b2cb4..bd4cfd8 100755
--- a/depgenerators/osgi.prov
+++ b/depgenerators/osgi.prov
@@ -81,7 +81,7 @@ class TagBuilder:
 
     def get_osgi_provide (self, path):
         if not os.path.islink(path):
-            if path.endswith("META-INF/MANIFEST.MF"):
+            if path.endswith("/META-INF/MANIFEST.MF"):
                 manifest = open(path)
                 self.handle_manifest(manifest)
             if zipfile.is_zipfile(path):
diff --git a/depgenerators/osgi.req b/depgenerators/osgi.req
index 8d657db..1c0111c 100755
--- a/depgenerators/osgi.req
+++ b/depgenerators/osgi.req
@@ -93,7 +93,7 @@ class TagBuilder:
 
     def get_osgi_require (self, path):
         if not os.path.islink(path):
-            if path.endswith("META-INF/MANIFEST.MF"):
+            if path.endswith("/META-INF/MANIFEST.MF"):
                 manifest = open(path)
                 self.print_requires(manifest)
             if zipfile.is_zipfile(path):
-- 
1.9.3