octave-bug-tracker
[Top][All Lists]
Advanced

[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: Juan Pablo Carbajal
Subject: [Octave-bug-tracker] [bug #57522] "pkg unload" does not care for dependencies
Date: Fri, 3 Jan 2020 03:55:28 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Follow-up Comment #9, bug #57522 (project octave):

@Philip: if nodeps works with load then it is undocumented

  '-nodeps'
               The package manager will disable dependency checking.
               With this option it is possible to install a package even
               when it depends on another package which is not installed
               on the system.  *Use this option with care.*


and


 'load'
          Add named packages to the path.  After loading a package it is
          possible to use the functions provided by the package.  For
          example,

               pkg load image

          adds the 'image' package to the path.


in contrast with


                                                                              
                                                                              
       
     'uninstall'
          Uninstall named packages.  For example,

               pkg uninstall image

          removes the 'image' package from the system.  If another
          installed package depends on the 'image' package an error will
          be issued.  The package can be uninstalled anyway by using the
          '-nodeps' option.


The problem with pkg.m is not functionality, it is horrible code and
maintainability and extensibility issues, in short, bad design (I dare say, no
desing at all), which is expected on a function(s) that was devloped on the
go.

The dependecy dag (no cycles allowed) support logic on the packages
dependency. Things like "what should be loaded first?" "what's the
shortestpath from package A to package B?" (meaning what's the easiest way to
dependecy connect the two packages), "which is the most dependable package?",
etc. and one could further depnd the dag to explore function dependecy (as in
"which function of package B is used by functions on package A"). Is a very
useful data structure that can speed up and organize many tasks. for example,
with a dep dag the code for correctly loading dependencies would be like 3
lines (and not the mess that is now), i.e. just traverse the dag from leafs to
root.

@Mike: why not allowing to do that? wouldn't be useful for development to
actually do this? Maybe one needs and extra flag '-force' to do crazy stuff.





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57522>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]