[Cuis-dev] Package Installer duplicates
Barry Perryman
barry.perryman at gmail.com
Mon Feb 19 14:13:28 PST 2024
Hi All,
I’ve had another look at this and I feel I have a better solution. You can see in the first image the duplicate packages listed and in the second after updating the list with the attached changes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Package_Installer_with_dupes.png
Type: image/png
Size: 179577 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240219/23fa0294/attachment-0002.png>
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Package_Installer_no_dupes.png
Type: image/png
Size: 149498 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240219/23fa0294/attachment-0003.png>
-------------- next part --------------
The change updates placesToLookForPackagesDo: to only scan the packageDirectory if it isn’t a subdirectory of the projectBaseDirectory.
Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6230-CuisCore-BarryPerryman-2024Feb19-22h01m-BAP.001.cs.st
Type: application/octet-stream
Size: 650 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240219/23fa0294/attachment-0001.obj>
-------------- next part --------------
> On 4 Feb 2024, at 22:00, Barry Perryman <barry.perryman at gmail.com> wrote:
>
> Hi All,
>
> When I open up the package installer and allow it to scan for packages the resulting list has a few duplicates in it - confirmed by looking at the details.
>
> I’ve put together something, attached, that kind of fixes the problem but I’m also pretty sure it’s sub-optimal.
>
> 1. Added a test for equality to CodePackageFile
> 2. Update the PackageInstaller>>addPackage to verify that the package hasn’t been seen before before adding it to the collection.
>
> Barry
>
> <PreventPackageInstallerDuplicates-BAP.001.cs.st>
>
>
More information about the Cuis-dev
mailing list