35
$\begingroup$

Edit From the author of this question

This question is obsolete
Since 2016 there is a lot of new stuff concerning Paclets.
They are now documented.
End of the Edit

It turns out that some silent updating may be done in our computers with paclets. See for example here. How are we aware that something has been changed ? Can we track updating/versions of paclets ?

One can inspect the dates of the files in the Paclets directory, but in the case of the example above, the date of the file was anterior to the release of the paclet (a few days). I couldn't say if something new had been downloaded, but in fact it was the case because the mentioned bug had disappeared.

Also, do paclets from non-official paclet sites also auto-update? Is it possible to adjust the updating frequency, or disable updating? Is it possible to do it separately for each site?

$\endgroup$
11
  • 8
    $\begingroup$ Personally I am very interested in being alerted about any silent updates that may change functionality (e.g. fix bugs). I am less interested in data paclets and even less interested in documentation changes. $\endgroup$
    – Szabolcs
    Commented Aug 31, 2016 at 12:27
  • 7
    $\begingroup$ This "feature" is potentially disastrous for any kind of serious scientific research, as it can render reproducibility impossible. $\endgroup$
    – Karsten7
    Commented Sep 3, 2016 at 13:15
  • 1
    $\begingroup$ @Karsten 7. Idem for industry, don't forget it ! , though, personally, I'm a hobbyist. $\endgroup$
    – andre314
    Commented Sep 3, 2016 at 14:20
  • 1
    $\begingroup$ FWIW, there's PacletManager`Package`$managerData, e.g., "LastWolframAutoUpdate" /. PacletManager`Package`$managerData, "LastUpdatedSiteDate" /. PacletManager`Package`$managerData. I thought I got this and other info from this site, but I can't find it. Maybe it was on Community. Or in Chat. One could use it to poll the paclet manager, I suppose, but there doesn't seem to be much info about what's in the updates. $\endgroup$
    – Michael E2
    Commented Sep 3, 2016 at 15:16
  • 1
    $\begingroup$ Related: community.wolfram.com/groups/-/m/t/974137 $\endgroup$
    – Szabolcs
    Commented Dec 4, 2016 at 20:21

1 Answer 1

20
+500
$\begingroup$

This posting is not a complete answer. Rather, it is a spelunking report concerning the kernel initialization sequence in version 11.0.1 as it relates to automatic paclet updating.

In summary, every three days the system initialization sequence will automatically update paclets that are loaded from $PacletSite. $PacletSite is normally http://pacletserver.wolfram.com, although malicious software could change that.

The automatic updating will not occur if the kernel is started with either the -nopaclet or -layoutpaclets command line arguments, but these arguments have other consequences as well. We can also $AllowInternet = False, but this has wider consequences too.

Other paclet sites are not updated by this mechanism. However, there is nothing stopping a loaded paclet from installing its own mechanism. Furthermore, the system sometimes updates other paclets on-demand during normal operation -- usually, but not always, data paclets. This latter behaviour will need to be the subject of a future spelunking report.

System Initialization Details

For those who wish to follow along, define the following function:

opensys[args__] :=
  {$InstallationDirectory, "SystemFiles", args} // FileNameJoin // NotebookOpen

System initialization begins in the file:

opensys["Kernel", "SystemResources", $SystemID, "sysinit.m"];

As part of the start-up, PacletManager`Package`preparePacletManager[] is invoked. The definition for this function is in:

opensys["Autoload", "PacletManager", "Kernel", "Manager.m"];

It calls PacletManager`Package`initializePacletManager from the same file. If the kernel is started up with an option -nopaclet or -layoutpaclets on the command line, then it sets the variable PacletManager`Package`$pmMode to be "ReadOnly", or "Normal" otherwise. Later, it calls PacletManager`Package`initializeSites which can be found in this file:

opensys["Autoload", "PacletManager", "Kernel", "Services.m"];

If the mode is not read-only, then it calls PacletManager`Services`Private`doWeeklyUpdate from the same file. This will check the paclet information accessible from PacletManager`Services`Private`getPacletSiteData[]. It extracts the paclet information for the site contained in $PacletSite, whose value is normally:

$PacletSite
(* "http://pacletserver.wolfram.com" *)

If the last successful update of that site is older than three days, then PacletSiteUpdate is called upon that site.

Nowhere along this tour do we find evidence of any fine-grained control mechanisms for this update activity. We can use of aforementioned command line arguments, or set $AllowInternet to be False, but these have wider consequences.

$\endgroup$
1
  • $\begingroup$ @Szabolcs Thanks for the bounty despite my response being skeletal (apologies). Such are the perils of acclamation... :) $\endgroup$
    – WReach
    Commented Dec 8, 2016 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.