Testing the Automatic Script Updater

Jakob Kummerow jakob.kummerow at googlemail.com
Tue Nov 3 22:58:43 CET 2009


> There's a version file at
> http://amarok.kde.org/scriptupdates/lyrics_lyricwiki/version
>
> which is a URL I got from the debug output of Amarok, so I've verified
> it's correct.

Yeah, everything looks good on the server.

> However, the job fails with an error right near the top of ::phase2 (I
> put in some debugging to verify this, which I've committed in
> Gitorious). I'm not sure why it'd be failing -- but it does.

Well - it Works For Me™ :-)

amarok: BEGIN: void ScriptUpdater::phase2(KJob*)
amarok:   [ScriptUpdater] "lyrics_lyricwiki" : online version:  ".3
"
amarok:   [ScriptUpdater] "lyrics_lyricwiki" : newer version found,
starting update :-)
amarok: END__: void ScriptUpdater::phase2(KJob*) - Took 0.00028s
amarok: [ScriptUpdater] "lyrics_lyricwiki" : Signature matches.
Performing update now.
amarok: [ScriptUpdater] "lyrics_lyricwiki" : Updating finished successfully :-)
amarok: [ScriptUpdater] "lyrics_lyricwiki" : Event loop terminated, quitting.
amarok: BEGIN: void ScriptManager::updaterFinished(QString)
amarok:   BEGIN: bool ScriptManager::loadScript(const QString&)
amarok:     [ScriptManager] script info: "Lyricwiki"   ".3"   "Lyrics"
  "Amarok2.0"
amarok:   END__: bool ScriptManager::loadScript(const QString&) - Took 0.00025s
amarok: END__: void ScriptManager::updaterFinished(QString) - Took 0.00031s

That's with an Amarok pulled straight from git, with your additional
debugging output being the latest commit in the history.

> The other question I had was -- where are these updated scripts going to
> live? Are they going to be installed in a user's amarok data directory
> until the new versions are included in a new release and installed with
> the rest of Amarok?

Exactly. It's the only reasonable place to put the updates, because
we'd need root access in order to replace the original copy, and that
would require prompting the user for a password, and we don't want
that. I think.
This also means that if several users share a computer, and one of
them disables the auto updater for himself, he will in fact be stuck
with the originally built-in scripts.

One little bug I've just noticed is that the "scripts" folder in the
user's amarok data directory must already exist, otherwise extracting
the archive fails silently. I'll fix that right now.


Jakob


More information about the Amarok-devel mailing list