Recent

Author Topic: VTV Package stuck in Package Management  (Read 860 times)

Nimral

  • Full Member
  • ***
  • Posts: 157
  • Keep it simple.
VTV Package stuck in Package Management
« on: April 28, 2021, 02:01:09 pm »
Hi,

I am currently trying to master the VirtualTreeView package. In doing so, I feel like making one step forward, and two steps back.

Having strange issues with the package, and not beeing able to be sure which package I do have on my machine, because I downloaded latest master from git initially, I decided to remove it from my machine and download a fresh copy from the Online Package Repository.

- Went to OPM, found the package, tried to install it, got an error that it was already installed.
- Went to Package - Install/Uninstall, checked left list ("Install"), package didn't show up. Huh?
- Checked right list ("Available for Installation"), found the package there marked with a red "x", status says Current state: selected for uninstallation, installed, RunAndDesignTime. Double huh. Looks like recently uninstalled, and IDE not rebuilt, but I swear, I haven't.
- Anyway, goto Tools - Rebuild Lazarus - Lazarus successully rebuilds, go to Package - Install/Uninstall, still same picture: the package is still pending uninstall.

- Added the package to "Install" (left), recompiled the IDE, found the package properly installed in the left list, removed it again, recompiled the IDE: same picture, package ist stuck "pending uninstall".

From here I am stuck and can't move any way: I cannot install because it is already installed, any cannot uninstall because its says it is already pending uninstallation, and even if I rebuild the IDE the package remains in it's indecisive installation state.

I thought about simply deleting it from c:\lazarus\components\virtualtreeview, next shock: the version there is stone-age (V5.4.1: (26 May 2014)), though I have re-installed Lazarus from scratch about 3 Weeks ago, while the source at git is at version V6.0 (under development - if I pull from lazarus-master) or V5.5.3: (08 Jan 2015) if I pull from latest release (Version 5.5.3 - LCL Release 2).

How do I get rid of the stuck package? Given that I somehow, through the advise you are giving me, manage to get the packet uninstalled, which version should I install, the OPM 5.5.3, the "latest release" 5.5.3 - LCL Release 2 from git) or lazarus-master from git (which looks like a 5.5.4 plus some new additions = 6.0).

Armin.
« Last Edit: April 28, 2021, 04:24:21 pm by Nimral »
Lazarus 2.0.10 on Windows 10, Raspberry Pi OS, VMWare Workstation

Zvoni

  • Hero Member
  • *****
  • Posts: 595
Re: Package stuck in Package Management
« Reply #1 on: April 28, 2021, 04:10:34 pm »
Have you looked at the dependency-tree?
I remember having similiar issues with a different package, and the reason i couldn't uninstall was, some other package was dependant on it

EDIT: Eh? Wouldn't be surprised, if it's OPM itself that is dependent on VTV (and thusly blocking uninstall)
In that case: Uninstall OPM, Uninstall VTV, recompile, check everything/folders etc. then reinstall VTV (newest?), then optional OPM to check if OPM accepts the "newest" version.
In your place i'd ask the OPM-Maintainer (GetMem?)
In Package-Graph look for VirtualTreeView and right-click on it. You should get a Menu "Show unused dependencies" (or something like that --> german Lazarus here)
Select it, and you should get a list with "unused dependencies", scroll down until you find the OPM.
On my Lazarus it shows VTV as unused, and i think you can delete that dependency.
Might be worth a try
« Last Edit: April 28, 2021, 04:21:23 pm by Zvoni »
One System to rule them all, One IDE to find them,
One Code to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
People call me crazy, because i'm jumping out of perfectly fine aircraft

Nimral

  • Full Member
  • ***
  • Posts: 157
  • Keep it simple.
Re: Package stuck in Package Management
« Reply #2 on: April 28, 2021, 04:24:01 pm »
Thanks Zvoni, reading your reply and remembering that I read somewhere else, that OPM depends on VTV, that would make sense.

I only ask myself, assuming this correct, why someone has put the VTV package in the Online Repository. If OPM indeed depends on VTV, OPM (IMHO) will never be able to install any VTV package, will it?

Armin.
Lazarus 2.0.10 on Windows 10, Raspberry Pi OS, VMWare Workstation

lucamar

  • Hero Member
  • *****
  • Posts: 4009
Re: VTV Package stuck in Package Management
« Reply #3 on: April 28, 2021, 04:35:50 pm »
IIRC, there are two distinct packages for VTV: the one used in Lazarus and the one accesible by OPM. The problem (again IIRC) was that both had the same names, same units, etc. so one was renamed to something like "LazVirtualTreeView"  and the other was kept as is, but that was in trunk (/fixes?) and the release didn't have that distinction yet, making it close to impossible to install the VTV from OPM.

All this from (somewhat hazy) memory, so I might be wrong, remembering a long ago thread or something like that, so take it with a grain of salt :-[
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

GetMem

  • Hero Member
  • *****
  • Posts: 3355
Re: VTV Package stuck in Package Management
« Reply #4 on: April 28, 2021, 04:50:25 pm »
Long story short: VTV depends on LCLExtension, OPM depends on VTV. In Lazarus trunk(will become Lazarus 2.2 soon) everything it's fixed. OPM has an "internal" VTV, so you can install other versions in paralell. If you use Lazarus 2.0.12, you have two choises:
1. Uninstall OPM and install any version of VTV you like
2. Stay with the current version
Please note that there are very few differences between the different versions of VTV's, I'm talking about the 5.3.x series. IIRC the 6.x series only works with FPC trunk, but I'm not sure. In my projects I use 5.3.3. Works very well in different platforms.
« Last Edit: April 28, 2021, 08:14:52 pm by GetMem »

wp

  • Hero Member
  • *****
  • Posts: 8357
Re: VTV Package stuck in Package Management
« Reply #5 on: April 28, 2021, 04:55:24 pm »
Yes, in trunk we renamed the VTV and all its units with a "laz" prefix, to allow users to install their own VTV.

In a release version 2.0.x you should use the standard version (components/virtualtreeview) - no need to install anything. I would not touch newer versions than 5.5.3 which is enough for learning (and for serious work - see OPM).

To get rid of multiple installations, go to "package" > "Install/uninstall packages" and uninstall the version found in the left list, as well as OPM; you should do a clean rebuild of the IDE here to remove all compiled VTV units. Then go to "Package" > "Package links" and delete all occurencies of VTV paths so that they cannot be used again. Go to "Package" > "Open Package file" and open the virtualtreeview_package in folder components/virtualtreeview, install it. Finally reinstall the OPM.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Nimral

  • Full Member
  • ***
  • Posts: 157
  • Keep it simple.
Re: VTV Package stuck in Package Management
« Reply #6 on: April 28, 2021, 07:11:21 pm »
Thanks for the brief instructions, I'll follow right away.

Armin.
Lazarus 2.0.10 on Windows 10, Raspberry Pi OS, VMWare Workstation

 

TinyPortal © 2005-2018