Apache Cordova
  1. Apache Cordova
  2. CB-4992

CLI prematurely removes plugin dependency when two plugins share a dependency

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: CLI
    • Labels:
      None

      Description

      cordova create foo com.google.foo foo
      cd foo
      cordova platform add android
      cordova plugin add org.apache.cordova.media-capture
      cordova plugin add org.apache.cordova.file-transfer
      cordova plugin rm org.apache.cordova.media-capture
      

      now:

      $ cordova plugin ls
      [ 'org.apache.cordova.file-transfer' ]
      

      and:

      cordova plugin rm org.apache.cordova.file-transfer
      { [Error: ENOENT, no such file or directory '/Users/agrieve/git/cordova/cordova-app-harness/foo/plugins/org.apache.cordova.file/plugin.xml']
        errno: 34,
        code: 'ENOENT',
        path: '/Users/agrieve/git/cordova/cordova-app-harness/foo/plugins/org.apache.cordova.file/plugin.xml',
        syscall: 'open' }
      

        Issue Links

          Activity

          Hide
          ASF subversion and git services added a comment -

          Commit 0596e47f870a13d8658ebb27f01f70fffcec5e23 in branch refs/heads/master from Braden Shepherdson
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugman.git;h=0596e47 ]

          Overhaul dependency uninstallation

          This fixes several long-standing bugs with plugman deleting
          dependencies. The new rules are to uninstall all of the target plugin's
          dependencies, provided they are:

          • Not installed at the top level.
          • Not depended on by any other plugins.

          Similarly, plugin directories are only deleted when no plugin depends on
          them, and they are not top-level, on any platform.

          Fixes CB-5056, CB-5060, CB-4992, and CB-4189.

          Show
          ASF subversion and git services added a comment - Commit 0596e47f870a13d8658ebb27f01f70fffcec5e23 in branch refs/heads/master from Braden Shepherdson [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugman.git;h=0596e47 ] Overhaul dependency uninstallation This fixes several long-standing bugs with plugman deleting dependencies. The new rules are to uninstall all of the target plugin's dependencies, provided they are: Not installed at the top level. Not depended on by any other plugins. Similarly, plugin directories are only deleted when no plugin depends on them, and they are not top-level, on any platform. Fixes CB-5056 , CB-5060 , CB-4992 , and CB-4189 .
          Hide
          Vladimir Riha added a comment -

          How can I recover from this state? It also affects build process, it returns the same message.

          Show
          Vladimir Riha added a comment - How can I recover from this state? It also affects build process, it returns the same message.
          Hide
          Shazron Abdullah added a comment -

          I thought we had reference counting for this sort of thing - there was something similar for iOS: CB-4373

          Show
          Shazron Abdullah added a comment - I thought we had reference counting for this sort of thing - there was something similar for iOS: CB-4373

            People

            • Assignee:
              Braden Shepherdson
              Reporter:
              Andrew Grieve
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development