PackageManager bug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

PackageManager bug

Louis Sumberg-2
I have some packages with the version numbers in the filename, e.g.
    AppA V1 and AppA V1.1.
I have some other packages dependent on App A, e.g.,
    AppA Tests V1 and AppA Tests V1.1.

I ran into problems reinstalling the packages, when
PackageManager>>loadPrereq::::: is invoked.  Parameter prereqPathString
contains a filename, with the extension already removed.  The first line in
the method,
    prereqName := File splitStemFrom: prereqPathString.
forms the prerequisite package's name.  However, if there's a period in the
filename, then #splitStemFrom: will think there's an extension and truncate
the name.  Since the file name is then derived from the prerequisite package
name, the package manager will look for the wrong file (which may or may not
exist).  I believe the correct line should be
    prereqName := File splitFilenameFrom: prereqPathString.
This just strips the filename from the path, which seems correct.  At least
for me it now works *s*.

-- Louis


Reply | Threaded
Open this post in threaded view
|

Re: PackageManager bug

Bill Schwab
Louis, Blair,

> I have some packages with the version numbers in the filename, e.g.
>     AppA V1 and AppA V1.1.
> I have some other packages dependent on App A, e.g.,
>     AppA Tests V1 and AppA Tests V1.1.
>
> I ran into problems reinstalling the packages, when
> PackageManager>>loadPrereq::::: is invoked.

On an irresponsibly quick scan of your post, this sounds like a problem I
had that turned out to be caused by the prerequisites of a given package at
the time it was saved not being the same when it was later loaded.  I forget
the details, but, at one point I thought it had something to do with a
partial match on the file name.  It turned out to be caused by a stale cache
of prerequisite package names.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: PackageManager bug

Ian Bartholomew-12
In reply to this post by Louis Sumberg-2
Louis,

FWIW, error #518 was about the same problem but in the Folder>>name method.
The fix for that was the same as your suggestion, to change the selector
from #splitStemFrom to #splitFilenameFrom ..

Regards
    Ian


Reply | Threaded
Open this post in threaded view
|

Re: PackageManager bug

Louis Sumberg-2
Ian and Bill,

> FWIW, error #518 was about the same problem but in the Folder>>name
method.
> The fix for that was the same as your suggestion, to change the selector
> from #splitStemFrom to #splitFilenameFrom ..

Thanks.  I guess this manifestation (#518 redux?) appears when the package
with the period in it appears as a prerequisite.  Well, at least I got the,
um, opportunity to trace through some of the workings of PackageManager.
And it's fun (a perverse thrill?) to find and fix something *s*.

-- Louis


Reply | Threaded
Open this post in threaded view
|

Re: PackageManager bug

Blair McGlashan
In reply to this post by Louis Sumberg-2
"Louis Sumberg" <[hidden email]> wrote in message
news:acq0o5$5b7$[hidden email]...
> I have some packages with the version numbers in the filename, e.g.
>     AppA V1 and AppA V1.1.
> I have some other packages dependent on App A, e.g.,
>     AppA Tests V1 and AppA Tests V1.1.
>
> I ran into problems reinstalling the packages, when
> PackageManager>>loadPrereq::::: is invoked.  Parameter prereqPathString
> contains a filename, with the extension already removed.  The first line
in
> the method,
>     prereqName := File splitStemFrom: prereqPathString.
> forms the prerequisite package's name.  However, if there's a period in
the
> filename, then #splitStemFrom: will think there's an extension and
truncate
> the name.  Since the file name is then derived from the prerequisite
package
> name, the package manager will look for the wrong file (which may or may
not
> exist).  I believe the correct line should be
>     prereqName := File splitFilenameFrom: prereqPathString.
> This just strips the filename from the path, which seems correct.  At
least
> for me it now works *s*.

Thanks Louis (and Ian). Recorded as #959 for correction in the next patch
(PL2).

Regards

Blair