[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57522] "pkg unload" does not care for depende
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies |
Date: |
Thu, 2 Jan 2020 17:49:14 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0 |
URL:
<https://savannah.gnu.org/bugs/?57522>
Summary: "pkg unload" does not care for dependencies
Project: GNU Octave
Submitted by: philipnienhuis
Submitted on: Thu 02 Jan 2020 11:49:12 PM CET
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Philip Nienhuis
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 5.1.0
Operating System: Any
_______________________________________________________
Details:
(see also comments #19-21 of bug #41215)
This bug is actually twofold but the underlying issue is one and the same
thing.
(1) "pkg unload" will unload any single package but not its dependencies. In
itself this isn't so harmful.
(2) "pkg unload" will happily unload any package even if it's a dependency of
one or more other loaded packages that are not called for to be unloaded. This
is harmful as it may make those other loaded packages (dependers) fail.
It is easy to see that where pkg.m's private function "load_packages.m" does
something with the "handle_deps" input argument, private function
"unload_packages.m" completely ignores it.
In my Xmas holiday I had some time to look into this. Based on this I think it
shouldn't be too hard to at least get a warning if one or more loaded packages
depend on a package-to-be-unloaded, or if a package-to-be-unloaded has
dependencies.
What basically needs to be done is either:
- start working on integrating Andrew Janke's packajoozle [1] into Octave
(that is, if packajoozle has solid dependency procedures built-in, as I
believe is the case)
and/or (maybe for the time being),
- implement two-way dependency info in the octave_packages file (see below).
The latter is superior anyway over the current situation and IMO wouldn't be a
very difficult nor a disruptive thing to do.
pkg.m now only stores dependency info at the depender's part of
octave_packages. That means that for finding out which other packages depend
on some package, each time all packages info has to be traversed. Also storing
a list of dependers with each package that is a dependency can easily be done
at install time. The resulting octave_packages file would even be
backwards-compatible (as it is just a readable .mat type file).
Admittedly this bug might not have a high priority. Users usually just load
packages to get additional functionality. There is little incentive for
unloading packages - why would one do that?
But when the patches for "pkg test" get pushed (bug #41215 and bug #41298), it
may become more desirable to properly unload packages and their dependencies.
[1] https://github.com/apjanke/octave-packajoozle
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57522>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies,
Philip Nienhuis <=
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Mike Miller, 2020/01/02
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Philip Nienhuis, 2020/01/02
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Philip Nienhuis, 2020/01/02
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Juan Pablo Carbajal, 2020/01/02
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Juan Pablo Carbajal, 2020/01/02
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Mike Miller, 2020/01/02
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Mike Miller, 2020/01/02
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Philip Nienhuis, 2020/01/03
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Juan Pablo Carbajal, 2020/01/03
- [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies, Philip Nienhuis, 2020/01/03