Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4ADB69C17 for ; Mon, 15 Dec 2014 13:22:37 +0000 (UTC) Received: (qmail 8630 invoked by uid 500); 15 Dec 2014 13:22:37 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 8555 invoked by uid 500); 15 Dec 2014 13:22:37 -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 8539 invoked by uid 99); 15 Dec 2014 13:22:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2014 13:22:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of heavy@ungoverned.org designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-ig0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2014 13:22:08 +0000 Received: by mail-ig0-f180.google.com with SMTP id h15so5023415igd.13 for ; Mon, 15 Dec 2014 05:20:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=a9KSQG3bjoZC9oq2XdjpQtskuj6opJ9OSVEMGSZtdeM=; b=Hi+TZ67AC1SZcwEWmqP6p3DMJcjuigJtnb3I7v1RDb+DLa7ZY4GX2d2P/jTvE7qVpY TD/kVacVRNe2aijFE71Xpx/hsSf/7XzywZ7yVHQ4OQLlf0yvOSHaJ8ePzM7yvTNZwHot KI3NzbNT0MAN2Cg2cXrImSj0u7zuWbEu96hNvEk0ckRn2fvwS1LYPwZ/eehCNgpamzN8 K2b0W35ux0ky0mTArT3JNV2N0cEXiSV/kvJI5oNcVNa36a3IJSzGj6/jisXUPXixUn/k /xIzl0NhcnoEBiFGQa+jeyxEjgDlRztHEPi4aY1HZ8Ctv5KQNQ7wCnWFdu1XO4EWJmN2 C8vA== X-Gm-Message-State: ALoCoQm738Nw+5WQawBDnglc523XNDhupWr1HlYC524a1kL+sL2ZKcz33+fcXCJB45rS+k0hP/WL X-Received: by 10.50.67.18 with SMTP id j18mr17547126igt.26.1418649637796; Mon, 15 Dec 2014 05:20:37 -0800 (PST) Received: from retina.local ([12.43.212.162]) by mx.google.com with ESMTPSA id p198sm4694970iop.36.2014.12.15.05.20.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Dec 2014 05:20:37 -0800 (PST) Message-ID: <548EE024.2050003@ungoverned.org> Date: Mon, 15 Dec 2014 08:20:36 -0500 From: "Richard S. Hall" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: dev@felix.apache.org Subject: Re: Native Selection Filters matching in Native Namespace References: <548E628D.7020205@apache.org> In-Reply-To: <548E628D.7020205@apache.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 12/14/14 23:24 , Bob Paulin wrote: > Per the R6 Spec selection filters should be able to match launching > properties (p 75). This works fine within the matching the is > currently happening within R4LibraryClause.match() method. However > since we're now deriving a Require-Capability (p 73 - 74) the matching > actually occurs again within the CapabilitySet.match() method against > the derived filter. > > For example. On a Windows system with a x86_64 processor with a run > property of > org.osgi.test.cases.framework.div.tb16="xyz" > > The following filter should pass: > > (&(osgi.native.osname~=win32)(osgi.native.processor~=x86_64)(org.osgi.test.cases.framework.div.tb16=xyz)) > > > The issue is within the CapabilitySet class we only match against > attributes within the osgi.native namespace so the launching > properties are not included so it fails to match the native code > requirement. Sorry, but I guess I am confused. There is really no such thing as "within the osgi.native" namespace. Capabilities/Requirements have a namespace, which must match before matching of filters/attributes occurs. The attributes that can occur within a namespace is open ended. Perhaps that is all you meant. If we have a generated capability and a generated requirement, I'd expect both to have the osgi.native namespace. Is this not the case? As far as launching properties, if they are intended to be part of the capability, shouldn't they just be added to the generated native capability and then everything would be fine, no? -> richard > So I'm curious what we should do here. A few things come to mind: > > 1) Add the launch properties to the native namespace > 2) Remove the selection-filter prior to passing it along to the > CapabilitySet > 3) Generate the native capacity set but blacklist it from matching > (since we've already done it within the R4LibraryClause.match()) > > Let me know if you have comments or other suggested approaches. I'm > thinking #3 may be best since additional matching to resolve the > bundle might not be needed but I might be missing something. Thanks! > > - Bob