changeset 25031:f2f813a55eec

pkg: remove update of listed packages (actually do 70490bb1f59d) * scripts/pkg/pkg.m: this is what was meant to happen in 70490bb1f59d (which instead removed the yes-no question during installation of URI and went to the stable branch instead). Seems like no one has actually been using this option, it's been broken for some time, and it's not really that useful. Remove it. We are keeping the update option to update all of the packages.
author Carnë Draug <carandraug@octave.org>
date Wed, 28 Mar 2018 02:02:07 +0100
parents fdff879d8ae8
children ae487ce89992
files scripts/pkg/pkg.m
diffstat 1 files changed, 7 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pkg/pkg.m	Tue Mar 27 11:38:05 2018 -0700
+++ b/scripts/pkg/pkg.m	Wed Mar 28 02:02:07 2018 +0100
@@ -570,19 +570,15 @@
 
     case "update"
       installed_pkgs_lst = installed_packages (local_list, global_list);
+
       if (numel (files) > 0)
-         update_lst = {};
-         installed_names = {installed_pkgs_lst.name}';
-         for i = 1:numel (files)
-           idx = find (strcmp (files{i}, installed_names), 1);
-           if (isempty (idx))
-             warning ("pkg: package %s is not installed - skipping update", files{i});
-           else
-             update_lst = { update_lst, installed_pkgs_lst{idx} };
-           endif
-         endfor
-         installed_pkgs_lst = update_lst;
+        ## This was option was broken during two releases and no one
+        ## notice so we are guessing no one actually uses it.  If the
+        ## user knows the names of the packages to be installed, it
+        ## might as well call install (which is what update is doing)
+        error ("pkg: to update individual packages, use 'pkg install -forge'");
       endif
+
       for i = 1:numel (installed_pkgs_lst)
         installed_pkg_name = installed_pkgs_lst{i}.name;
         installed_pkg_version = installed_pkgs_lst{i}.version;