Issues with KStars data downloads
Hy Murveit
murveit at gmail.com
Sat Mar 15 08:42:39 GMT 2025
Ben Cooksley got me part of the way to an answer.
The problem was that kstars was keeping a cache in
~/.cache/kstars/knewstuff/...
On Mac, the equivalent directory is ~/Library/Caches/kstars/knewstuff/...
Once I removed those directories, then the "Data->Download New Data" menus
worked fine for my new catalogs on both Mac and Linux.
The next question is, how can we get users to clear that cache when we
update new stuff?
If anyone has tried the ImagingPlanner tool, then they won't get the latest
catalog but rather will be stuck with the old cached versions.
Perhaps I need to re-name each version of my catalog?
Hy
On Fri, Mar 14, 2025 at 10:47 PM Hy Murveit <murveit at gmail.com> wrote:
> I wanted to document some issues I've been having with our data downloads
> (the "Data -> Download New Data" menu) in hopes someone has insight in how
> to fix it or who to contact to help. This has been an ongoing issue for
> several months now, with previous updates to this data.
>
> The issue is that though I've uploaded a new data catalog for the Imaging
> Planner (version 2) I, and presumably some of you, but presumably not all
> of you) still see Version 1 in the download menu.
>
> Here's a screenshot
>
> [image: Screenshot 2025-03-14 at 10.29.07 PM.png]
>
> Please note in the screenshot that the description says "Catalog 1 for
> the KStars ImagingPlanner tool".
>
> Though KStars displays that, when I chase down all the web links using
> curl I do get the right data. This is shown below.
>
> As an explanation to the below, here's how things work.
>
> - We use the KNewStuff3 library to manage all this downloading. It is
> configured as described in the following bullets. I don't know when that
> got implemented, though it's been working for a long time. There are more
> recent versions of that library, but they probably depend on moving to Qt6.
> - We store a kstars.knsrc "KNewStuff file" in data/kstars.knsrc that
> tells KNewStuff where to look for a "providers file",
> - This providers file gives links to "providers download files",
> - and those files show the titles, descriptions, and payload urls for
> the actual data.
>
> All that looks configured fine to me when chasing the urls using curl. See
> details below.
>
> Hy
>
> *The kstars.knsrc file says the providers can be found
> at https://cdn.kde.org/edu/kstars/providers.xml
> <https://cdn.kde.org/edu/kstars/providers.xml>*
> > cat ~/Projects/kstars/kstars/data/kstars.knsrc
> [KNewStuff3]
> ProvidersUrl=https://cdn.kde.org/edu/kstars/providers.xml
> TargetDir=kstars
> Uncompress=true
>
> *Accessing providers.xml shows one of the two providers
> at https://cdn.kde.org/edu/kstars/main.xml
> <https://cdn.kde.org/edu/kstars/main.xml>*
> > curl -O https://cdn.kde.org/edu/kstars/providers.xml
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 100 607 100 607 0 0 3668 0 --:--:-- --:--:-- --:--:--
> 3678
> > cat providers.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE knewstuffproviders SYSTEM "knewstuffproviders.dtd">
> <knewstuffproviders>
> <provider downloadurl="https://cdn.kde.org/edu/kstars/main.xml"
> nouploadurl="https://edu.kde.org/contrib/"
> icon="http://edu.kde.org/pics/projects/cr32-app-kstars.png">
> <title>KStars Data</title>
> </provider>
> <provider downloadurl="https://cdn.kde.org/edu/kstars/dso.xml"
> nouploadurl="https://edu.kde.org/contrib/"
> icon="http://edu.kde.org/pics/projects/cr32-app-kstars.png">
> <title>KStars Data</title>
> </provider>
> </knewstuffproviders>
>
> *That main.xml contains the right "Catalog 2" description and payload url*
> > curl -O https://cdn.kde.org/edu/kstars/main.xml
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 100 6236 100 6236 0 0 25844 0 --:--:-- --:--:-- --:--:--
> 25875
> > cat main.xml
> <knewstuff>
> ...
> <stuff>
> <name>ImagingPlanner Catalog1</name>
> <type>ImagingPlanner</type>
> <author email="kstars-devel at kde.org">Hy Murveit</author>
> <licence>Free noncommercial ShareAlike use with credit. Creative Commons
> license. Credit for individual images in .csv files.</licence>
> <summary lang="en">Catalog 2 for the KStars ImagingPlanner tool.</summary>
> <version>2.0</version>
> <release>1</release>
> <releasedate>2025-03-12</releasedate>
> <downloadsize1>9300</downloadsize1>
> <preview lang="en">
> https://www.indilib.org/jdownloads/knewstuff/imagingplanner-screenshot.jpg
> </preview>
> <payload lang="en">
> https://cdn.kde.org/edu/kstars/ImagingPlanner-catalog-2.0.tar.gz</payload>
> <rating>5</rating>
> <downloads>0</downloads>
> </stuff>
> ...
> </knewstuff>
>
> *So why does kstars not display the right description? I've tried clearing
> the cache in *
> *~/.local/share/knewstuff3/*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20250315/c52e65b3/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2025-03-14 at 10.29.07 PM.png
Type: image/png
Size: 695173 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20250315/c52e65b3/attachment-0001.png>
More information about the Kstars-devel
mailing list