On Dec 3, 2009, at 9:59 AM, mdipierro wrote: > I think this may be overkill. I think for each app we should upgrade > all or nothing.
I don't think I'm getting the idea across. I'm not proposing per-file upgrades. We would upgrade all or nothing, per application. The checksums determine simply whether the developer has changed an application, and we use that information to prevent an automatic upgrade (of that application) and instead give the user an upgrade option. > > I like the idea of detecting which files have changed but we do not > need checksums. We just need to compare the files in the w2p with the > actual files in the folder (is there? has changed?). Such a function > would be useful for many reasons. In particular for installing plugins > since they they may overwrite existing application files. If you mean the old w2p file, sure, that would work too. But we'd have to preserve the old w2p file for that to work; right now it gets overwritten, yes? And of course it does no good to compare to the new w2p file: it's a nop to say that I'll upgrade a file only if doing so doesn't change the file. > > Massimo > > On Dec 3, 11:50 am, Jonathan Lundell <jlund...@pobox.com> wrote: >> On Dec 3, 2009, at 9:39 AM, Thadeus Burgess wrote: >> >>> create checksums of the important files on app creation (web2py_ajax.html, >>> admin files, etc.etc). >> >>> Check these checksums upon upgrade, if they differ, the app has been >>> altered. >> >> Yes, that's the signature file I was suggesting. >> >> I think you'd want to do it for every file that would be replaced, but are >> there "unimportant" files? >> >> >> >>> -Thadeus >> >>> On Thu, Dec 3, 2009 at 11:34 AM, Jonathan Lundell <jlund...@pobox.com> >>> wrote: >>> On Dec 3, 2009, at 9:28 AM, mdipierro wrote: >> >>>> why? We only need to check if the app version is less then the current >>>> web2py version and eventually display a link that gives the admin the >>>> option to install the latest version of the app. >> >>>> Are you thinking of something different? >> >>> Yes, I'm thinking of detecting whether the apps have been modified by the >>> user. >> >>> A reasonable default policy would be to automatically upgrade (on an app by >>> app basis) apps that have not been modified since installation or the last >>> upgrade. >> >>>> On Dec 3, 11:23 am, Jonathan Lundell <jlund...@pobox.com> wrote: >>>>> On Dec 3, 2009, at 9:18 AM, mdipierro wrote: >> >>>>>> It could be even simpler like keep a copy of the VERSION file into >>>>>> each of the basic apps. >> >>>>> What would be in the file? It'd have to be more than the version number >>>>> and timestamp. >> >>>>>> On Dec 3, 11:12 am, Jonathan Lundell <jlund...@pobox.com> wrote: >>>>>>> On Dec 3, 2009, at 9:06 AM, salingrosso wrote: >> >>>>>>>> We can make it a link of the side-bar that is alway there to remind us >>>>>>>> that we have an option to upgrade apps if we have not done so. It >>>>>>>> would be non-intrusive. The actual popup to point us to the link would >>>>>>>> appear only once. >> >>>>>>>> I think this is the best solution. >> >>>>>>> If the standard apps had a supplementary signature file with, say, MD5 >>>>>>> hashes of all the sources, we could detect whether there had been >>>>>>> modifications and act accordingly. >> >>>>>>> Note also that the current scheme (--upgrade) is all or nothing, but >>>>>>> it's not likely that a developer would be modifying all three of the >>>>>>> standard apps. >> >>>>>>> (Me, I use my upgrade script that automatically snapshots the old >>>>>>> version before overwriting it.) >> >> > > -- > > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.