fix for FELIX-1379


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@795214 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/common/core/src/org/apache/felix/sigil/repository/AbstractBundleRepository.java b/sigil/common/core/src/org/apache/felix/sigil/repository/AbstractBundleRepository.java
index a4ec531..fcb6903 100644
--- a/sigil/common/core/src/org/apache/felix/sigil/repository/AbstractBundleRepository.java
+++ b/sigil/common/core/src/org/apache/felix/sigil/repository/AbstractBundleRepository.java
@@ -236,24 +236,30 @@
 					info.setDescription( attrs.getValue( "Bundle-Description" ) );
 					info.setVendor( attrs.getValue( "Bundle-Vendor" ) );
 
-					String importStr = attrs.getValue( "Import-Package" );
-					if ( importStr != null ) {
-						addImports( info, importStr );
+					String str = attrs.getValue( "Import-Package" );
+					if ( str != null ) {
+						addImports( info, str );
 					}
-					String exportStr = attrs.getValue( "Export-Package" );
-					if ( exportStr != null ) {
-						addExports( info, exportStr );
+					
+					str = attrs.getValue( "Export-Package" );
+					if ( str != null ) {
+						addExports( info, str );
 					}
 
-					String reqStr = attrs.getValue( "Require-Bundle" );
-					if ( reqStr != null ) {
-						addRequires( info, reqStr );
+					str = attrs.getValue( "Require-Bundle" );
+					if ( str != null ) {
+						addRequires( info, str );
 					}
 
-					String cpStr = attrs.getValue( "Bundle-Classpath" );
+					str = attrs.getValue( "Bundle-Classpath" );
 
-					if ( cpStr != null ) {
-						addClasspath( info, cpStr );
+					if ( str != null ) {
+						addClasspath( info, str );
+					}
+					
+					str = attrs.getValue( "Fragment-Host" );
+					if ( str != null ) {
+						addHost(info, str);
 					}
 				}
 				catch (RuntimeException e) {
@@ -377,4 +383,22 @@
 			info.addRequiredBundle(req);
 		}
 	}
-}
+	
+	/**
+	 * @param info
+	 * @param str
+	 */
+	private void addHost(IBundleModelElement info, String str) {
+		String[] parts = str.split( ";" );
+		IRequiredBundle req = ModelElementFactory.getInstance().newModelElement(IRequiredBundle.class);
+		req.setSymbolicName( parts[0].trim() );
+		
+		if ( parts.length > 1 ) {
+			String part = parts[1].toLowerCase().trim();
+			if ( part.startsWith( "bundle-version=" ) ) {
+				req.setVersions( VersionRange.parseVersionRange(part.substring("bundle-version=".length())));
+			}
+		}
+		info.setFragmentHost(req);
+	}
+}
\ No newline at end of file