Open Bajger opened 10 months ago
It is working for me. It is because you have an outdated sources.list file. By the way, there is a missing feature to check if the official sources file changed (as for UI version)
t is because you have an outdated sources.list file.
It could be, but it didn't help even if I called PhLPharoTemplateSources checkForUpdates.
It should update list templates, right?
By the way, there is a missing feature to check if the official sources file changed (as for UI version)
Do we want to have explicit command for this? I guess it shouldn't be updated everytime I invoke CLI command. What do you think?
t is because you have an outdated sources.list file.
It could be, but it didn't help even if I called
PhLPharoTemplateSources checkForUpdates.
It should update list templates, right?
It will just check but if you had no notification and did not accept the update, nothing will happen.
Do we want to have explicit command for this? I guess it shouldn't be updated everytime I invoke CLI command. What do you think?
Not every time. With poor (or no) internet connexion, pharo launcher will be unusable. We should have a way to determine the last check. I think one time a day is already enough. A command is not mandatory if we do so.
I used this, seen UI to check updates (notification), but still image templates aren't updated.
|cmd|
PhLTemplateSourcesUpdateChecker uniqueInstance check.
cmd := PhLImageCreateCliCommand new.
cmd pharoLauncherModel: PharoLauncherCLIModel fromDefaultConfiguration.
cmd latestStableTemplate
PhLTemplateSourcesUpdateChecker>>#basicUpdateTemplateSources
is in charge of updating sources. But it uses PharoLauncherApplication. so, not so good for CI.
What should be done in CLI:
PhLTemplateSourcesUpdateChecker uniqueInstance check.
. It will fetch a sources.list.dl
file and compare it againts the sources.list
file. If they are different, a PhLSourcesFileUpdateAvailable
annoucement is announced. PhLTemplateSourcesUpdateChecker
listen to this announcement and will trigger: PhLTemplateSourcesUpdateChecker>>#updateTemplateSources:
.
updateTemplateSources: announcement
PharoLauncherApplication default shouldUpdateTemplateSources ifFalse: [ ^ self ].
self basicUpdateTemplateSources
basicUpdateTemplateSources PhLPharoTemplateSources fromFile updateSourcesFile. PharoLauncherApplication resetTemplateRepository. PharoLauncherApplication default resetTemplateRepository.
- `PharoLauncherApplication default shouldUpdateTemplateSources ifFalse: [ ^ self ].` should be updated to do not reference directly the PharoLauncherApplication. Then we could either ask the update confirmation with a spec dialog (UI) or in the console (CLI)
PharoLauncherApplication default shouldUpdateTemplateSources ifFalse: [ ^ self ]. should be updated to do not reference directly the PharoLauncherApplication.
This is because to get rid of dependency / separation of business logic and UI?
Then we could either ask the update confirmation with a spec dialog (UI) or in the console (CLI)
Do we want to have interactive confirmation (Y/N) also in CLI? Or you mean non interactive (proceed with update will be always Yes).
One other catchup: I think there is something wrong with update checker, I've worked on P11 image with loaded dev branch of PharoLauncher and it freezes after restart of image. I think it is related to template update checker. Maybe to report in separate issue?
Update: Reported additional issue: #658
Describe the bug When creating new image, without specifying template, old version of stable Pharo is used.
To Reproduce Steps to reproduce the behavior:
./pharo-launcher image create my2
Expected behavior Latest stable Pharo version should be used P11 (instead of P10).
Screenshots If applicable, add screenshots to help explain your problem.
Version information:
Expected development cost Probably it has something to do with dowloading sources template list. I tried following, but it didn't really help: