Recent

Author Topic: Online Package Manager  (Read 835942 times)

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #420 on: December 05, 2016, 07:05:21 pm »
@minesadorada
Quote
I can't understand the lack of automation here.
If GetMem is unavailable, currently the update system fails.  Am I right there?
No. You completely misunderstood the update system, but that's ok since nobody knew how it should work or what would be the optimal solution.

Quote
Why can't OPM regularly poll the http://<update_url>/<update_componentname>.json list automatically and look for version updates?  This could even be in a background thread when OPM loads (as an user-chosen option)  All that's needed is a standardised json filename for updates, and json packager provides that as a default.
A pull in every 6 sec is ok? Currently is 6000 ms. :D Though I plan to extend a little bit, say 1 minute to minimize traffic load.

@lainz
Quote
Well he tested it and says that takes time (I've readed it somewhere here in this thread If I remember it well), so there is a kind of problem here, real one, or the library for downloading is not as fast, or something else is happening :)
True. I said that once, but the problem is now solved. I save the last update value, then from time to time OPM pull the json. For example after you update the external JSON, the user won't see the changes instantaneously, it will take 1-2 min(max). I believe this is more then ok. The pull is done in a background thread, so it won't interfere with the GUI.


The basics steps:
1. I add the package to the main repository. This step is not yet automatized, I have to do it manually. This is why you guys created that zip/json("Create repository package")
2. Once the package is added to the main repository you can generate the "external json", then change the version, link to external zip, etc..whenever, however you like
3. Send me the link to the external JSON, so I can add to the package again(see: screenshot). This has to be done only once.
4. After this step everything is automatic, the OPM from time to time(1 min or so) will check the external json, is something has changed, OPM notify the user, on request download the zip, install the new package.

Hope is clear now. I believe this is how @Juha, @lainz and others envisioned from the beginning or at least something similar.
« Last Edit: December 05, 2016, 10:56:02 pm by GetMem »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #421 on: December 05, 2016, 07:20:27 pm »
Thanks. Now seems everything clear. When you consider it ready tell us so we can create the external json.

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #422 on: December 05, 2016, 07:24:11 pm »
+1 Thanks for the clarification.

One question: What do you envision are the consequences of checking the 'force update' option in the update_json file?  What are the guidelines?
« Last Edit: December 05, 2016, 07:31:13 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #423 on: December 05, 2016, 08:52:34 pm »
Quote
@minesadorada
One question: What do you envision are the consequences of checking the 'force update' option in the update_json file?  What are the guidelines?
It's useful when you change something in the source, but don't want to increase the version number yet. This is specially true for trunk, a lot of commits are done before the version number is modified. By setting ForceUpdate to true, you ensure that the user gets the latest updates, even if the version number stays the same.

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #424 on: December 05, 2016, 09:10:36 pm »
Quote
@minesadorada
One question: What do you envision are the consequences of checking the 'force update' option in the update_json file?  What are the guidelines?
It's useful when you change something in the source, but don't want to increase the version number yet. This is specially true for trunk, a lot of commits are done before the version number is modified. By setting ForceUpdate to true, you ensure that the user gets the latest updates, even if the version number stays the same.

Now I'm really puzzled.

So, If I set ForceUpdate=TRUE what does the user see?
According to your scenario, I can make a minor update (with no version number increase) and that can force the user to update.  I can make a major update, with many new features and a new version number, but no forceupdate=true, and the user can ignore it.

I just don't get it.

Surely any change to the source would trigger a version update - even if it's 0.0.n+1.0?  Maybe trunk Lazarus developers don't do that, but why should that paradigm be adopted by independent component developers by default in the OPM system?  Lazarus developers use 'svn revision#' but OPM only allows for Version Quads.

When should a package maintainer set forceupdate=true, and why? 
That is my real question, and I don't understand your previous answer sufficiently.
« Last Edit: December 05, 2016, 09:20:56 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #425 on: December 05, 2016, 10:02:23 pm »
Quote
So, If I set ForceUpdate=TRUE what does the user see?
According to your scenario, I can make a minor update (with no version number increase) and that can force the user to update.  I can make a major update, with many new features and a new version number, but no forceupdate=true, and the user can ignore it.

If you set forceupdate true but don't change the version number, the user sees nothing, as far as I understand the system.

If you do a major update with version number, and force update is false, the user will see the new version number.

Updates are not forced never I think, is just to 'force the download of the latest zip, doesn't matter what it contains'.

Quote
When should a package maintainer set forceupdate=true, and why?


I don't know. If I will use the master.zip of github it will gives you always the latest sources, doesn't matter what the external.json says!

So it's a bad idea to use master.zip of github as I understand it now. Or I must always ensure that it will work, or always increase the last number in the release builds, causing the user to download every day my package  ::)

Force updates will download per user request, OPM can't see if we made changes or not in the zip. Notifications will not be triggered only by setting forceupdate to true.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #426 on: December 05, 2016, 10:25:50 pm »
Perhaps ForceUpdate is the wrong word. I mean you cannot force anything, in the end the user decides if he/she want to update or not. However if you want to notify the user that a new version is available, without actually increasing the version number, you should set ForceUpdate to true. From the users point of view there is no difference between ForceUpdate = true(same version number) or an increased version number, they will see the same "alert" message, namely that a new version is available for download/install. Force update is for the package maintainers, I explained in my previous post why I consider it useful. If you don't like the idea, no problem, we can come up with something better.

However we need a system that makes possible to trigger an update message, without increasing the version number. I' m open to suggestions.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #427 on: December 05, 2016, 10:30:46 pm »
Ok now I get it.  I was thinking it wrong.

For example you download now the latest zip right? Then force update is still true. So the dialog keeps saying that there's a new version available?

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #428 on: December 05, 2016, 10:39:30 pm »
Quote
For example you download now the latest zip right? Then force update is still true. So the dialog keeps saying that there's a new version available?
Yes. I believe this is specially useful for your master.zip. You don't have to change the version number, just leave ForceUpdate(ForceNotify) to true. Perhaps we can combine with a date? So the OPM will only notify the user when the date also changes?
« Last Edit: December 05, 2016, 10:42:19 pm by GetMem »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #429 on: December 05, 2016, 10:43:36 pm »
Oh I see now the utility.

Well can be a date time. Since can be several updates in a day? Or only one per day. As you think is best. Maybe only once per day is the best so user don't loose too much time updating again and again in the same day.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #430 on: December 05, 2016, 11:00:39 pm »
Quote
Well can be a date time.
Sure, no problem. Datetime is perfectly fine. Let's wait and see what other people has to say about this. The collective brain power is always better the the individual one.  8-)

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #431 on: December 05, 2016, 11:05:14 pm »
Sure!  8)

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #432 on: December 06, 2016, 10:23:08 am »
Couple of small bugfixes for the json Editor.  To v0.1.15.0
Please update from svn

There's an update file for Cryptini here that you can use for testing:
https://sourceforge.net/projects/lazautoupdate/files/otherpackages/update_cryptini.json

P.S. Just updated OPM from trunk, and tried updating OPM to 'V4.8.7.4' but no luck (see attached).  Work-in-progress, so nothing to worry about?
2nd screenshot was after clicking OK.  It froze at that point.
« Last Edit: December 06, 2016, 10:38:47 am by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #433 on: December 06, 2016, 10:36:06 am »
Quote
P.S. Just updated OPM from trunk, and tried updating OPM to 'V4.8.7.4' but no luck (see attached).  Work-in-progress, so nothing to worry about?
2nd screenshot was after clicking OK.  It froze at that point.
It's not ready yet...

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #434 on: December 06, 2016, 10:39:54 am »
Understood.  I was too eager to see it!
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

 

TinyPortal © 2005-2018