Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 73909 invoked from network); 24 Feb 2010 13:10:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Feb 2010 13:10:49 -0000 Received: (qmail 95698 invoked by uid 500); 24 Feb 2010 13:10:48 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 95623 invoked by uid 500); 24 Feb 2010 13:10:48 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 95611 invoked by uid 99); 24 Feb 2010 13:10:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2010 13:10:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2010 13:10:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D67EF29A0013 for ; Wed, 24 Feb 2010 05:10:27 -0800 (PST) Message-ID: <1378497019.490511267017027863.JavaMail.jira@brutus.apache.org> Date: Wed, 24 Feb 2010 13:10:27 +0000 (UTC) From: "Alasdair Nottingham (JIRA)" To: dev@felix.apache.org Subject: [jira] Commented: (FELIX-692) OBR should provide an API for resolving bundles dependencies regardless of locally installed bundles In-Reply-To: <1364698972.1219238684194.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837774#action_12837774 ] Alasdair Nottingham commented on FELIX-692: ------------------------------------------- Given that OBR is not an OSGi standard I do not understand what the issue is with changing the API. If your concern is that the API wont make it into the OSGi standard that is true for any part of the current API as well. > OBR should provide an API for resolving bundles dependencies regardless of locally installed bundles > ---------------------------------------------------------------------------------------------------- > > Key: FELIX-692 > URL: https://issues.apache.org/jira/browse/FELIX-692 > Project: Felix > Issue Type: Improvement > Components: Bundle Repository (OBR) > Reporter: Arjun Panday > Assignee: Guillaume Nodet > Priority: Minor > Fix For: bundlerepository-1.6.0 > > Attachments: bundlerepository.tgz > > > Currently the dependencies that are installed locally are stripped from the OBR Resolver response, because it is assumed that the new bundles are to be installed locally. But i cannot use the OBR to launch a separate JVM or store the result for later reference... > It would be interesting to have a pure Resolver API, distinct from the OBR's "installation process". > And/Or, as Richard Hall suggested, the OBR could provide better control over the repositories used during the resolve process (specifically the local repository). > (see thread "OBR and the referral tag" in users@felix.apache.org) > Merely as a hint and for what it's worth, here's how i slightly modified the Resolver in bundlerepository 1.0.3 to serve my purpose (avoid ignoring locally installed bundles): > @@ -308,6 +309,7 @@ public class ResolverImpl implements Resolver > */ > private List searchLocalResources(Requirement req) > { > + String systemPackages = (String) m_context.getBundle(0).getHeaders().get("Export-Package");// only match system bundle > List matchingCandidates = new ArrayList(); > Resource[] resources = m_local.getResources(); > for (int resIdx = 0; (resources != null) && (resIdx < resources.length); resIdx++) > @@ -315,7 +317,8 @@ public class ResolverImpl implements Resolver > Capability[] caps = resources[resIdx].getCapabilities(); > for (int capIdx = 0; (caps != null) && (capIdx < caps.length); capIdx++) > { > - if (req.isSatisfied(caps[capIdx])) > + if (req.isSatisfied(caps[capIdx]) > + && systemPackages.indexOf(caps[capIdx].getName()) != -1) // only match system bundle > { > matchingCandidates.add(resources[resIdx]); > } > @@ -91,7 +91,7 @@ public class LocalRepositoryImpl implements Repository > synchronized (this) > { > m_snapshotTimeStamp = m_currentTimeStamp = new Date().getTime(); > - bundles = m_context.getBundles(); > + bundles = new Bundle[]{ m_context.getBundle(0) }; // only match system bundle... m_context.getBundles(); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.