<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">El 19/9/22 a las 16:01, Mariano Montone
escribió:<br>
</div>
<blockquote type="cite"
cite="mid:e2969663-7d07-b719-bb68-ad85010459ad@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">El 19/9/22 a las 15:32, Mariano
Montone escribió:<br>
</div>
<blockquote type="cite"
cite="mid:b96dc1e8-fb6c-7fe6-fa25-0dd0b5f7aec2@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<div class="moz-cite-prefix">El 19/9/22 a las 14:24, Hilaire
Fernandes via Cuis-dev escribió:<br>
</div>
<blockquote type="cite"
cite="mid:fff05f03-3a97-cc31-471d-07f6fa4c6c73@free.fr">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p><font size="4">Hi, <br>
</font></p>
<p><font size="4">The issue occurs on my development image,
freshly installed, but involving a lot of packages. I try
to install Erudit, but it happens with other package.<br>
</font></p>
<p><font size="4">The Cuis image is #5485.</font></p>
<p>class argument is #Preference. The receiver of #parserClass
is a PreferenceSet</p>
<p>Here is an image from where you can review with the
debugger open: <a class="moz-txt-link-freetext"
href="https://www.dropbox.com/s/rdvqfxn0m5n4xxq/Bug.zip?dl=0"
moz-do-not-send="true">https://www.dropbox.com/s/rdvqfxn0m5n4xxq/Bug.zip?dl=0</a></p>
</blockquote>
<p>Looks like this could be related to Erudite package, that
received some updates. I'll have a look.</p>
</blockquote>
<p>I know what is going on. The PackageDownloader asks the
PackageInstaller to scan for the current list of packages. To
determine the current list of packages every Cuis package file
on disk is scanned. That scanning involves loading its
changesets somehow. The changeset of some of the packages
reference the Preferences class, that does not exist anymore.
That triggers an error. (Actually, it is a bit weirder than
that, since the problematic code is: (Smalltalk at: class
ifAbsent: [Object class]) parserClass), but Smalltalk at:
#Preferences gives a PreferenceSet instance! (I have no
explanation for that part ...)<br>
</p>
<p>That is the problem.</p>
<p>Some solutions: <br>
</p>
<p>- Remove those packages from disk (if you empty your download
directory there are changes that the PackageInstaller and
downloader work for you.)<br>
</p>
<p>- Update those packages.</p>
<p>- Use Feature require instead of the installer (Erudite loads
fine with Feature require btw).</p>
<p><br>
</p>
<p>I'm thinking of if something else can be done about it...</p>
<p><br>
</p>
<p> Mariano<br>
</p>
</blockquote>
<p>The solution in my opinion is to handle errors when the
PackageInstaller scans packages; print a warning and ignore the
package.<br>
</p>
<p>Like this:</p>
<p>PackageInstaller>>collectPackagesFromDirectory: aDirectory<br>
<br>
"Create a collection of PackageSpec with package files found
in aDirectory."<br>
<br>
|packageFiles|<br>
<br>
packageFiles _ aDirectory fileNamesMatching: '*.pck.st'.<br>
<br>
packageFiles do: [:packageFile | | codePackage |<br>
[codePackage _ CodePackageFile onFileEntry: (aDirectory //
packageFile).<br>
self addPackage: codePackage] <br>
on: Error<br>
do: [:e | Transcript nextPutAll: 'Warning: Error scanning
the package ', packageFile, '. Ignoring ...'; newLine]]</p>
<p><br>
</p>
<p>You can also use that. I'll submit the patch later.</p>
<p><br>
</p>
<p> Mariano<br>
</p>
</body>
</html>