You are here: Foswiki>Tasks Web>Item14542 (27 Nov 2017, GeorgeClark)Edit Attach

Item14542: pseudo-install.pl seems to mistakenly remove ZonePlugin's data

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: PseudoInstall
Branches:
Reported By: WillLe
Waiting For:
Last Change By: GeorgeClark
After pseudo-installing various things into my local repo, at one point I reset the whole lot with
./pseudo-install.pl -uninstall all
But then I was left with the core pub's and 3 deleted files of ZonePlugin:

Processing ZonePlugin
Removed data/System/VarADDTOZONE.txt
Removed data/System/VarRENDERZONE.txt
Removed lib/Foswiki/Configure/Checkers/MergeHeadAndScriptZones.pm

I cannot uninstall the core pub's even with
./pseudo-install.pl -uninstall core
But that's not the problem. The problem is that the 3 removed files are not the same as files in ZonePlugin, thus cannot be reinstalled with
./pseudo-install.pl ZonePlugin
The only way to get back those files is to have a git reset!

If I only pseudo-uninstall default, then the ZonePlugin's data are untouched. But after pseudo-installing many plugins outside of "default" set, how can I scrub them off without removing the ZonePlugin's data?

-- WillLe - 26 Nov 2017

ZonePlugin is deprecated, It's not been needed since Zones became standard in Foswiki 1.1.

I'm not sure why Pseudo-install should touch that plugin at all. On a system with the Plugins API >= 2.1, it's not needed. That's any version newer than Foswiki 1.0.10

-- GeorgeClark - 26 Nov 2017

This comment is really unrelated to what's clearly a bug. but...

I almost never use the uninstall functions of pseudo-install that I can recall. My normal development environment is set up so I regularly git clean -fdx. All my local files and webs are kept in a private extension LocalDataContrib. And I use alternate Usersweb and Sandbox webs. So my "reset" back to a known good configuration is
cd /var/www/foswiki/distro
git clean -fdx
cd core
./pseudo-install developer
./pseudo-install LocalDataContrib
sh init2config.sh   (uses tools/configure to bootstrap and customize LocalSite.cfg)
By keeping all my registered users, test topics, etc. in alternate webs, it avoids accidentally committing test data into the repository.

-- GeorgeClark - 26 Nov 2017

Yikes. "all" modules used for install and un-install uses JsonReport to find every possible extension name and attempts to uninstall them. As ZonePlugin still exists for the unlikely event that someone is using Foswiki 1.0.x, it gets picked up.

-- GeorgeClark - 26 Nov 2017

GeorgeClark, thank you for your explanation! So I don't have to worry about the missing files related to ZonePlugin anymore, do I?!

-- WillLe - 27 Nov 2017

Actually, I think you do. ZonePlugin was used to "patch in" some Foswiki 1.1 files that were not available in Foswiki 1.0. It should never be installed or removed on a Foswiki 1.1+ system. I think the bug here is that uninstall all should not make any attempt to remove extensions that are not actually installed.

In my opinion the whole concept of installing "all" extensions, or removing them, is completely broken. There are too many that would be in complete conflict with others, and with recent core changes. So my recommended fix for this would be to remove the "all" functionality. We don't really record anywhere what exactly is installed.

-- GeorgeClark - 27 Nov 2017
 

ItemTemplate edit

Summary pseudo-install.pl seems to mistakenly remove ZonePlugin's data
ReportedBy WillLe
Codebase 2.1.4, trunk
SVN Range
AppliesTo Engine
Component PseudoInstall
Priority Normal
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r4 - 27 Nov 2017, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy