Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BCE5102F7 for ; Wed, 9 Apr 2014 00:05:05 +0000 (UTC) Received: (qmail 54237 invoked by uid 500); 9 Apr 2014 00:02:51 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 53670 invoked by uid 500); 9 Apr 2014 00:01:43 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 50386 invoked by uid 99); 8 Apr 2014 23:59:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Apr 2014 23:59:15 +0000 Date: Tue, 8 Apr 2014 23:59:15 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-6414) Cordova plugman will ignore config_munge features for config.xml if two are listed in plugin.xml 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/CB-6414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13963640#comment-13963640 ] ASF GitHub Bot commented on CB-6414: ------------------------------------ Github user kamrik commented on the pull request: https://github.com/apache/cordova-plugman/pull/72#issuecomment-39915727 Looks like the root of the problem is in config_keeper. The files there are identified by the "fake path" [see note], so when the same file is referenced as "config.xml" and "res/xml/config.xml", config keeper considers them to be two different files and changes for one of them get overwritten by the changes to the other. I think it would be better to solve the problem in config_keeper rather than here, otherwise we might hit it again later with another file that might get referenced as two different names. Maybe we could even go a level higher and avoid referring to the same file by two different names when generating the munge. Anyway, if you decide to go with the current solution, please add a commend about what it does. Otherwise it is very cryptic. [note] Fake path is constructed as project_root/file_name. It is used because deducing the full real path requires globbing which is very slow (tens of milliseconds in some cases). The assumption was that the same file will alway be referred to with the same file_name in the munges. This assumption is broken in this case. > Cordova plugman will ignore config_munge features for config.xml if two are listed in plugin.xml > ------------------------------------------------------------------------------------------------ > > Key: CB-6414 > URL: https://issues.apache.org/jira/browse/CB-6414 > Project: Apache Cordova > Issue Type: Bug > Components: Plugman > Affects Versions: 3.4.0 > Environment: Android > Reporter: Josh Bavari > Assignee: Josh Bavari > Priority: Minor > Original Estimate: 2h > Remaining Estimate: 2h > > When using a phonegap plugin like the Facebook Connect plugin, there are two series of listed config transforms, as such: > The element, > > > > > > > > As well as the transform for Android: > > > > > > Which after running 'cordova prepare android': > "config_munge": { > "res/xml/config.xml": { > "/*": { > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1 > } > }, > "AndroidManifest.xml": { > "/*": { > "": 5, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 2, > "": 1, > "": 1, > "": 1, > "": 1 > }, > "application": { > "": 1, > "": 1 > } > }, > "res/values/facebookconnect.xml": { > "/*": { > "448": 1, > "RaiseMore": 1 > } > }, > "config.xml": { > "/*": { > "": 1, > "": 1, > "": 1, > "": 1, > "": 1, > "": 1 > } > } > }, > Which then leads to the final config.xml that only has the config munge from the facebook plugin: > > > > > > > > > > > > > > > HelloCordova > > A sample Apache Cordova application that responds to the deviceready event. > > > Apache Cordova Team > > > > > -- This message was sent by Atlassian JIRA (v6.2#6252)