divvun / divvun-manager-macos

Divvun's macOS package manager for the Páhkat repository format
GNU General Public License v3.0
1 stars 0 forks source link

DM claims no updates available, file system says otherwise #48

Open snomos opened 4 months ago

snomos commented 4 months ago

According to DM, Inari Sámi is at latest nightly build:

image

But according to zsh, that is not the case (cf second last line):

-rw-r--r--  1 root  wheel   5276913 Oct  8  2021 /Library/Services/fo.bundle/Contents/Resources/fo.zhfst
-rw-r--r--  1 root  wheel   3165554 Nov  8 16:13 /Library/Services/kl.bundle/Contents/Resources/kl.zhfst
-rw-r--r--  1 root  wheel    104212 Jan 29 15:51 /Library/Services/lut.bundle/Contents/Resources/lut.zhfst
-rw-r--r--  1 root  wheel   3757014 Feb 21  2023 /Library/Services/mhr.bundle/Contents/Resources/mhr.zhfst
-rw-r--r--  1 root  wheel    695254 May  3  2023 /Library/Services/mns.bundle/Contents/Resources/mns.zhfst
-rw-r--r--  1 root  wheel    928493 Aug 31  2023 /Library/Services/mrj.bundle/Contents/Resources/mrj.zhfst
-rw-r--r--  1 root  wheel   1499132 Sep 21  2022 /Library/Services/nno.bundle/Contents/Resources/nn-Runr.zhfst
-rw-r--r--  1 root  wheel   1515258 Sep 21  2022 /Library/Services/nno.bundle/Contents/Resources/nn.zhfst
-rw-r--r--  1 root  wheel   1390961 Jun  1  2023 /Library/Services/olo.bundle/Contents/Resources/olo.zhfst
-rw-r--r--  1 root  wheel  18941111 Jun  6  2023 /Library/Services/se.bundle/Contents/Resources/se.zhfst
-rw-r--r--  1 root  wheel   4737921 Sep 25  2023 /Library/Services/sma.bundle/Contents/Resources/sma.zhfst
-rw-r--r--  1 root  wheel  16927782 Jun  1  2023 /Library/Services/smj.bundle/Contents/Resources/smj.zhfst
-rw-r--r--  1 root  wheel  16336078 Jun  1  2023 /Library/Services/smj.bundle/Contents/Resources/smj_NO.zhfst
-rw-r--r--  1 root  wheel  16286721 Jun  1  2023 /Library/Services/smj.bundle/Contents/Resources/smj_SE.zhfst
-rw-r--r--  1 root  wheel   9990111 Jun  6  2023 /Library/Services/smn.bundle/Contents/Resources/smn.zhfst
-rw-r--r--  1 root  wheel  23269745 Sep 26  2023 /Library/Services/sms.bundle/Contents/Resources/sms.zhfst

In fact, all installed .zhfst files are from last year or older (except one from January this year), while DM claims they are all update to within the last couple of days for most of them.

So something seems seriously wrong with the automatic update system. I reinstalled DM to the latest version available in the stable branch (at divvun.no).

snomos commented 4 months ago

I also tried the newest nightly build of DM, with. the result that it could not contact the Páhkat repository, even after several restarts of DM.

dylanhand commented 4 months ago

I also tried the newest nightly build of DM, with. the result that it could not contact the Páhkat repository, even after several restarts of DM.

I've seen this issue as well. It seems intermittent and often happens after initially working upon first launch.

In case it's helpful while I'm investigating, I've found that reinstalling Divvun Manager is a reliable way of getting it to load.

snomos commented 4 months ago

I tried reinstalling, and it didn't help. The issue is not that it doesn't get contact with the repo server (that happens as well, but that is, as you say, intermittent, and can be solved after restarts or reinstallation), but that it is lying: it claims the newest version is installed, but the file system and actual behaviour of e.g. spellers tells a different story (the true story).

Lying is one thing, but failing to actually update is the major issue here (and lying is just a symptom of the other problem).

dylanhand commented 4 months ago

I tried reinstalling, and it didn't help. The issue is not that it doesn't get contact with the repo server (that happens as well, but that is, as you say, intermittent, and can be solved after restarts or reinstallation), but that it is lying: it claims the newest version is installed, but the file system and actual behaviour of e.g. spellers tells a different story (the true story).

Lying is one thing, but failing to actually update is the major issue here (and lying is just a symptom of the other problem).

Sorry I wasn't more clear. In my experience, reinstalling usually fixes the issue where DM hangs and does not load the list of packages.

It does not fix its lying that there are no updates when in fact there are.

dylanhand commented 4 months ago

@snomos have you found a reliable way to reproduce the bug where it does not connect/the UI does not refresh?

I've been messing with the app for a while now and haven't been able to reproduce the issue.

snomos commented 4 months ago

Unfortunately no. I have had reports from others earlier, but with a working system myself, and the whole issue is very strange.

What I can offer now is a Mac (my Mac) that has this issue, and a person willing to spend time in debugging this (me). So chances are a bit better to find the issue, although it won't be easy.

snomos commented 4 months ago

Could it be related to stale caches or something? Where is the pahkat cache on macOS?

dylanhand commented 4 months ago

Ok 😄

Any information you can provide will be helpful. I've seen this issue before but of course now that I'm trying to debug it, it refuses to present itself.

Not yet sure where the caches are kept. I've spent some time today going through the code to see how the pieces fit together but it's not crystal clear.

dylanhand commented 4 months ago

@snomos is this not a duplicate of #32?

What it sounds like is happening, is that the latest stable version of the package is installed, so DM is not offering to overwrite it with the nightly version.

It sounds, based on #32, that the way this is expected to work is that if a package is installed via the stable channel, switching to the nightly channel will not indicate an update is available, but instead should show that the latest version on the stable channel is installed. Is that right? Can you confirm which way you initially installed the package (stable/beta/nightly)?

Put another way, if I'm interpreting #32 correctly, my understanding is that the result you're seeing is correct in that it does not offer to update to the nightly version (assuming package was not initially installed via nightly channel), but it is incorrect in that it doesn't indicate you're running the latest stable version.

snomos commented 4 months ago

A very good point, and indeed you are probably right.

At the same time, it illustrates the problem:

Can you confirm which way you initially installed the package (stable/beta/nightly)?

No, I can't reliably, because there is no way I can tell which channel was used to install a given speller. Also the easter egg with version info does not give any clue as to whether the speller was built using nightly, beta or stable.

BUT given the 1.1.1 git tag and its date, it looks likely that my Faroese speller (which I tested right now for the purpose of this bug) was installed using the stable branch. So it looks like you are correct.

And yes, DM should only update installed packages using the same channel as when it was first installed: nightly installs are updated through the nighty channel, beta installs using the beta channel, and stable ditto.

That is, we need to fix #32 ASAP, to end this confusion. For both Windows and Mac.

dylanhand commented 4 months ago

Ok thanks for clarifying. I'll begin looking into #32.

dylanhand commented 3 months ago

Upon further inspection, there actually was a bug with this issue's description that affected nightly packages.

The bug prevented a nightly with the same version, but a more recent timestamp, to be installed.

This is fixed in the latest nightly version.

dylanhand commented 3 months ago

And for the sake of documentation, as discussed offline, Divvun Manager is working as intended. It only supports one channel at a time and does not keep track of channels on a per-package basis.

dylanhand commented 3 months ago

Upon further inspection, there actually was a bug with this issue's description that affected nightly packages.

The bug prevented a nightly with the same version, but a more recent timestamp, to be installed.

This is fixed in the latest nightly version.

This is fixed in version 2.2.1 of Divvun Manager, which is now available from https://divvun.org.

Permalink to Divvun Manager 2.2.1 installer.

@snomos would you like to test and close this issue if resolved?

snomos commented 1 month ago

It is mostly working. ls gives this output:

ls -l /Library/Services/*.bundle/Contents/Resources/*.zhfst 
-rw-r--r--  1 root  wheel     95445 Aug  9 03:55 /Library/Services/ciw.bundle/Contents/Resources/ciw.zhfst
-rw-r--r--  1 root  wheel   5339302 Aug  8 22:53 /Library/Services/fo.bundle/Contents/Resources/fo.zhfst
-rw-r--r--  1 root  wheel   3165554 Nov  8  2023 /Library/Services/kl.bundle/Contents/Resources/kl.zhfst
-rw-r--r--  1 root  wheel    126585 Aug  9 04:53 /Library/Services/lut.bundle/Contents/Resources/lut.zhfst
-rw-r--r--  1 root  wheel   3989680 Aug  9 05:54 /Library/Services/mhr.bundle/Contents/Resources/mhr.zhfst
-rw-r--r--  1 root  wheel   3729486 Aug  9 06:05 /Library/Services/mns.bundle/Contents/Resources/mns.zhfst
-rw-r--r--  1 root  wheel   1550367 Aug  9 06:53 /Library/Services/mrj.bundle/Contents/Resources/mrj.zhfst
-rw-r--r--  1 root  wheel   1499132 Sep 21  2022 /Library/Services/nno.bundle/Contents/Resources/nn-Runr.zhfst
-rw-r--r--  1 root  wheel   1515258 Sep 21  2022 /Library/Services/nno.bundle/Contents/Resources/nn.zhfst
-rw-r--r--  1 root  wheel   1372133 Aug  9 04:31 /Library/Services/olo.bundle/Contents/Resources/olo.zhfst
-rw-r--r--  1 root  wheel  18748838 Aug  9 01:01 /Library/Services/se.bundle/Contents/Resources/se.zhfst
-rw-r--r--  1 root  wheel   3024421 Jul  6 06:51 /Library/Services/sma.bundle/Contents/Resources/sma.zhfst
-rw-r--r--  1 root  wheel  15456360 Jul  7 21:33 /Library/Services/smj.bundle/Contents/Resources/smj.zhfst
-rw-r--r--  1 root  wheel  15463810 Jul  7 21:34 /Library/Services/smj.bundle/Contents/Resources/smj_NO.zhfst
-rw-r--r--  1 root  wheel  15457797 Jul  7 21:34 /Library/Services/smj.bundle/Contents/Resources/smj_SE.zhfst
-rw-r--r--  1 root  wheel  10405214 Aug  9 03:21 /Library/Services/smn.bundle/Contents/Resources/smn.zhfst
-rw-r--r--  1 root  wheel  23545864 Aug  9 03:43 /Library/Services/sms.bundle/Contents/Resources/sms.zhfst

Most languages have been updated to the latest nightly (August 8 or 9). The languages not updated are:

The DM status of these languages are:

That is:

All in all: DM is much better than earlier, but still not fully working as intended. I'll keep this open for the time being.

snomos commented 1 month ago

Update: after fixing the nno build bug, and refreshing the DM view, the status is now as follows:

I may have mixed sma and smj in the previous comment.

All in all: SMJ seems fine, for the three others there is something fishy. See also this comment in #32.