Skip to content

install an app if directory is still there. #14711

Closed

Description

@karlitschek

When upgrading to a new owncloud version via the packages you can end up with the situation that an old app is still siting in the apps directory. This is deactivated correctly but a new and compatible apps can´t be installed from the app store because the old directory is still in the apps directory.
See here for the error:
https://www.bitblokes.de/2015/03/das-upgrade-auf-owncloud-8-0-1-hat-echt-nicht-alle-latten-am-zaun

If we detect during installation of an app that there is already a directory with the same name than we have to create an "legacy" directory (if it is not already there) and move the old directory into it.

Activity

  1. added this to the milestone on Mar 5, 2015
  2. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    I guess @georgehrke isn't around ?

  3. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    @nickvergessen said he'll have a look. I'll support him where needed. (none of us know anything about that part)

  4. georgehrke commented on Mar 5, 2015

    @georgehrke
    Contributor

    I guess @georgehrke isn't around ?

    I'm around, will check.

  5. self-assigned this
    on Mar 5, 2015
  6. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    Great, thanks.

    What should the "legacy" folder look like ? Is it just a backup folder ?
    Should all apps be moved there ? What if someone installs the "encryption" app from the app store (if that is every possible at some point), should it also replace and rename the shipped encryption app ?

  7. georgehrke commented on Mar 5, 2015

    @georgehrke
    Contributor

    If we detect during installation of an app that there is already a directory with the same name than we have to create an "legacy" directory (if it is not already there) and move the old directory into it.

    In some installations (installed via packages) the preinstalled apps are in a read-only directory and we can't move them. What should we do in this case?

  8. karlitschek commented on Mar 5, 2015

    @karlitschek
    ContributorAuthor

    i would call it legacy or backup or apps_backup. should be outside the apps directory of course. the current idea is to do this only for collisions aka if the directory is there when a new app should be installed.
    does this make sens?

  9. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    I believe that the ones from the packages would automatically delete those apps too (like it did for me for the RPM upgrade). This is mostly about people upgrading with tarballs and who "forget" to manually delete the apps. Not 100% sure though.
    Also, such people using tarballs might have locked the apps directory too.

  10. georgehrke commented on Mar 5, 2015

    @georgehrke
    Contributor

    does this make sens?

    yes, I see what you mean.

  11. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    @karlitschek you mentionned "package" in the first post, did you mean "OBS package" or tarball ?

  12. jnfrmarks commented on Mar 5, 2015

    @jnfrmarks

    @PVince81

    Does the server delivery method matter in this case? If I install via tarball, copy over my 7.x app, can't I run into the same situation?

  13. karlitschek commented on Mar 5, 2015

    @karlitschek
    ContributorAuthor

    @PVince81 good idea that the linux packages should delete this old apps too. I had the same idea. But this doesn´t work because of 1. possible not enough permissions and 2. we might remove too many apps. So I suggest to do it on demand when we have a collision but not earlier

  14. 13 remaining items

  15. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    Okay, so if there are no packages:

    If you upgrade from 7.0.4 to 8.0.1 with RPM: the RPM should kill the old apps/calendar and apps/contacts folders.

    If you upgrade from 8.0.0 to 8.0.1 with RPM: the OLD apps/calendar and apps/contacts will STILL be there because the RPM doesn't care (they were not bundled). So you'll have the old version and need to reenable + update.

    Good... so that's our scenario.

  16. added a commit that references this issue on Mar 5, 2015
  17. LukasReschke commented on Mar 5, 2015

    @LukasReschke
    Contributor

    Another patch for that: #14719 – all fame to @PVince81 and @nickvergessen…

    And we really have to stop this crap where we add yet more static code to already existing code… – The time we wasted on such an issue!!!!!!

  18. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    Just now I remember that @DeepDiver1975 put a fix on master with a similar title: 39d8406#diff-34e065ae305e501c5b8d33de1300f2a1R150

    But in that PR it seems to just not display the broken app entries at all ?

  19. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    Looks like this exact same issue was already known here: #13945 (which is the one of @DeepDiver1975's PR)

  20. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    So, here is a summary: the core issue is that when upgrading from 8.0.0 to 8.0.1 with calendar/contact apps enabled, something goes wrong with the ocsid and the apps cannot be enabled from the recommended page, which says "app cannot be installed, folder already exists". This is because the apps were not recognized.

    Three different fixes have been proposed:

    I vote for @LukasReschke's fix #14719 as it seems to address the core issue properly instead of just working it around.

    @DeepDiver1975 @nickvergessen @georgehrke @karlitschek what do you think ?

  21. LukasReschke commented on Mar 5, 2015

    @LukasReschke
    Contributor

    @DeepDiver1975's fix on master does not seem to work for all cases as far I can tell. Apps like "Imprint" are still shown wrongly in the "Tool" section and throw those errors (to verify that behaviour you need to change the ownCloud version back to 8 in version.php)

  22. LukasReschke commented on Mar 5, 2015

    @LukasReschke
    Contributor

    If my patch gets merged in 8 I'll create a PR for master as well.

  23. karlitschek commented on Mar 5, 2015

    @karlitschek
    ContributorAuthor

    agreed. Thanks a lot guys.

  24. PVince81 commented on Mar 5, 2015

    @PVince81
    Contributor

    @LukasReschke provided a follow up patch, I hope you didn't miss it: #14721

  25. LukasReschke commented on Mar 5, 2015

    @LukasReschke
    Contributor

    Master port is at #14722

  26. locked as resolved and limited conversation to collaborators on Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions