Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Add-ons: Fix Installation of Official Add-ons Through Drag & Drop #2481

Merged
merged 1 commit into from
Jul 19, 2017

Conversation

nikicc
Copy link
Contributor

@nikicc nikicc commented Jul 19, 2017

Issue

Installing official add-ons through drag & drop doesn't work from cleaning the add-ons names onwards (3.4.0 onwards?). The mismatch occurs when we compare cleaned addon name with the zip file name. Since the official addon name was cleaned it doesn't match the uncleaned zip filename.

Description of changes

Clean the drag & drop file name in the same manner as official addons.

Includes
  • Code changes
  • Tests
  • Documentation

Installing official addons through drag & drop doesn work from cleaning the addons names onwards. The mismatch occurs when we compare cleaned addon name with the zip file name. Since the officical addon name was cleaned it doesn't match the uncleaned zip filename.
@nikicc nikicc changed the title [FIX] Addo-ns: Fix Installation of Official Add-ons Through Drag & Drop [FIX] Add-ons: Fix Installation of Official Add-ons Through Drag & Drop Jul 19, 2017
@kernc
Copy link
Contributor

kernc commented Jul 19, 2017

```py
future.set_result((AddonManagerDialog._packages or []) + packages)
```
to
```py
future.set_result(packages + (AddonManagerDialog._packages or []))
```
~~~a few lines below, so as to sort the dropped package first, _this_ will be the one found and selected when multiple packages with the same name are on the list (i.e. a package listed from PyPi and the a more recent version of it dropped).~~~

~~~OTOH, this might not be necessary, both matching items are selected and likely both get installed, the more recent item overwriting.~~~

nvm.

@codecov-io
Copy link

Codecov Report

Merging #2481 into master will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2481      +/-   ##
==========================================
+ Coverage   74.51%   74.53%   +0.02%     
==========================================
  Files         321      321              
  Lines       56056    56056              
==========================================
+ Hits        41769    41784      +15     
+ Misses      14287    14272      -15

@lanzagar lanzagar merged commit 62e4873 into biolab:master Jul 19, 2017
@nikicc nikicc deleted the addons-drag-drop-fixup branch July 19, 2017 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants