cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Byoungro So (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-10673) overlapped <source-file> target-dir from two different plugins causes a failure.
Date Sun, 28 Feb 2016 16:31:18 GMT

     [ https://issues.apache.org/jira/browse/CB-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Byoungro So updated CB-10673:
-----------------------------
    Description: 
Cordova-android forces the target-dir of the <source-file> tag to be unique for no reason.
However, this causes an issue.
It is always possible that two different plugins could have overlapped target-dir path.
It is impossible for a plugin to know that the target-dir is overlapped with other plugins's
target dir.
So, we should relax this requirement.
For example, cordova-sqlite-storage has the following in its plugin.xml.
{code}
        <source-file src="src/android/libs/armeabi/libsqlc-native-driver.so" target-dir="libs/armeabi"/>
{code}
com.intel.security has the following in its plugin.xml.
{code}
	<source-file src="src/android/armeabi" 	target-dir="libs" />
{code}
When adding two plugins, cordova-android throws an exception.
{code}
[t6.0.1] cordova plugin add cordova-sqlite-storage@0.7.14
Fetching plugin "cordova-sqlite-storage@0.7.14" via npm
Installing "cordova-sqlite-storage" for android
Installing "cordova-sqlite-storage" for ios
[t6.0.1] cordova plugin add https://github.com/01org/AppSecurityApi.git#v1.4.1
Fetching plugin "https://github.com/01org/AppSecurityApi.git" via git clone
Repository "https://github.com/01org/AppSecurityApi.git" checked out to git ref "v1.4.1".
Installing "com.intel.security" for android
Failed to install 'com.intel.security':CordovaError: Uh oh!
"/Users/bso/cordova/test/t6.0.1/platforms/android/libs/armeabi" already exists!
    at copyNewFile (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/lib/pluginHandlers.js:212:15)
    at handlers.source-file.install (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/lib/pluginHandlers.js:34:13)
    at Object.ActionStack.process (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at Api.addPlugin (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/Api.js:205:20)
    at handleInstall (/Users/bso/cordova/bso-cordova-lib/cordova-lib/src/plugman/install.js:598:6)
    at /Users/bso/cordova/bso-cordova-lib/cordova-lib/src/plugman/install.js:396:28
    at _fulfilled (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:749:13)
    at /Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:509:49
Error: Uh oh!
"/Users/bso/cordova/test/t6.0.1/platforms/android/libs/armeabi" already exists!
{code}
I figured the same issue is present in cordova-ios and cordova-windows, too.

  was:
Cordova-android makes sure the target-dir of the <source-file> tag is unique for no
reason.
It is always possible that two different plugin could have overlapped target-dir path.
For example, cordova-sqlite-storage has the following in its plugin.xml.
{code}
        <source-file src="src/android/libs/armeabi/libsqlc-native-driver.so" target-dir="libs/armeabi"/>
{code}
com.intel.security has the following in its plugin.xml.
{code}
	<source-file src="src/android/armeabi" 	target-dir="libs" />
{code}
When adding two plugins, cordova-android throws an exception.
{code}
[t6.0.1] cordova plugin add cordova-sqlite-storage@0.7.14
Fetching plugin "cordova-sqlite-storage@0.7.14" via npm
Installing "cordova-sqlite-storage" for android
Installing "cordova-sqlite-storage" for ios
[t6.0.1] cordova plugin add https://github.com/01org/AppSecurityApi.git#v1.4.1
Fetching plugin "https://github.com/01org/AppSecurityApi.git" via git clone
Repository "https://github.com/01org/AppSecurityApi.git" checked out to git ref "v1.4.1".
Installing "com.intel.security" for android
Failed to install 'com.intel.security':CordovaError: Uh oh!
"/Users/bso/cordova/test/t6.0.1/platforms/android/libs/armeabi" already exists!
    at copyNewFile (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/lib/pluginHandlers.js:212:15)
    at handlers.source-file.install (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/lib/pluginHandlers.js:34:13)
    at Object.ActionStack.process (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at Api.addPlugin (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/Api.js:205:20)
    at handleInstall (/Users/bso/cordova/bso-cordova-lib/cordova-lib/src/plugman/install.js:598:6)
    at /Users/bso/cordova/bso-cordova-lib/cordova-lib/src/plugman/install.js:396:28
    at _fulfilled (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:749:13)
    at /Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:509:49
Error: Uh oh!
"/Users/bso/cordova/test/t6.0.1/platforms/android/libs/armeabi" already exists!
{code}



> overlapped <source-file> target-dir from two different plugins causes a failure.
> --------------------------------------------------------------------------------
>
>                 Key: CB-10673
>                 URL: https://issues.apache.org/jira/browse/CB-10673
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, iOS, Windows
>            Reporter: Byoungro So
>            Assignee: Byoungro So
>
> Cordova-android forces the target-dir of the <source-file> tag to be unique for
no reason.
> However, this causes an issue.
> It is always possible that two different plugins could have overlapped target-dir path.
> It is impossible for a plugin to know that the target-dir is overlapped with other plugins's
target dir.
> So, we should relax this requirement.
> For example, cordova-sqlite-storage has the following in its plugin.xml.
> {code}
>         <source-file src="src/android/libs/armeabi/libsqlc-native-driver.so" target-dir="libs/armeabi"/>
> {code}
> com.intel.security has the following in its plugin.xml.
> {code}
> 	<source-file src="src/android/armeabi" 	target-dir="libs" />
> {code}
> When adding two plugins, cordova-android throws an exception.
> {code}
> [t6.0.1] cordova plugin add cordova-sqlite-storage@0.7.14
> Fetching plugin "cordova-sqlite-storage@0.7.14" via npm
> Installing "cordova-sqlite-storage" for android
> Installing "cordova-sqlite-storage" for ios
> [t6.0.1] cordova plugin add https://github.com/01org/AppSecurityApi.git#v1.4.1
> Fetching plugin "https://github.com/01org/AppSecurityApi.git" via git clone
> Repository "https://github.com/01org/AppSecurityApi.git" checked out to git ref "v1.4.1".
> Installing "com.intel.security" for android
> Failed to install 'com.intel.security':CordovaError: Uh oh!
> "/Users/bso/cordova/test/t6.0.1/platforms/android/libs/armeabi" already exists!
>     at copyNewFile (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/lib/pluginHandlers.js:212:15)
>     at handlers.source-file.install (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/lib/pluginHandlers.js:34:13)
>     at Object.ActionStack.process (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
>     at Api.addPlugin (/Users/bso/cordova/test/t6.0.1/platforms/android/cordova/Api.js:205:20)
>     at handleInstall (/Users/bso/cordova/bso-cordova-lib/cordova-lib/src/plugman/install.js:598:6)
>     at /Users/bso/cordova/bso-cordova-lib/cordova-lib/src/plugman/install.js:396:28
>     at _fulfilled (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:787:54)
>     at self.promiseDispatch.done (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:816:30)
>     at Promise.promise.promiseDispatch (/Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:749:13)
>     at /Users/bso/cordova/bso-cordova-lib/cordova-lib/node_modules/q/q.js:509:49
> Error: Uh oh!
> "/Users/bso/cordova/test/t6.0.1/platforms/android/libs/armeabi" already exists!
> {code}
> I figured the same issue is present in cordova-ios and cordova-windows, too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message