|
From: | Philip Nienhuis |
Subject: | Re: pkg / PKG_ADD / arch-dependent |
Date: | Mon, 10 Mar 2014 18:55:18 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22.1 |
Olaf Till wrote:
On Sun, Mar 09, 2014 at 09:52:50PM +0100, Philip Nienhuis wrote:<snip> But.... moving io's PKG_DEL into the arch-dependent subdir too does work out adversely: that hampers proper unloading of the io package. It seems the script subdir, containing .m-files required by PKG_DEL during unloading, is removed from Octave's search path before PKG_DEL is run. I'd expect that subdirectories should be removed from the path in reverse order. Is that the case in pkg.m and friends?Seemingly not. And even changing this would not mend problems with inline PKG_DEL directives in m-files or octfiles (ending up either in the scripts or the arch-dependent directory) which could assume that both directories are in the path. So the real fix seems to me to call all PKG_ADD directives only after all directories are in the path, and to call all PKG_DEL directives before any of the directories is removed from the path.I had once submitted such a patch: https://savannah.gnu.org/patch/?7976 but the discussion on it dried out.
The patch report is very technical - I'm not so familiar with c++ etc. So I didn't fully understand:
Was the intention to run PKG_ADD/PKG_DEL for each package in turn, or after all packages referenced in one 'pkg ....' statement have been processed? In either case there may be a few problems looming (e.g., mutually dependent packages).
The current situation, while not ideal, is still manageable, at least in case of the io package; although my fix isn't beautiful. I can't vouch for the database package ;-)
But I wonder if there does exist an overall ideal solution. Packages can be so complicated and demanding (on dependencies etc.) that in some cases individual solutions might be unavoidable. That said, even if your patch is to just fix PKG_ADD/PKG_DEL operation per package, it is probably already a firm step in the right direction.
Philip
[Prev in Thread] | Current Thread | [Next in Thread] |