Bug 218139 - ports-mgmt/portupgrade - pkgdu: Invalid next
Summary: ports-mgmt/portupgrade - pkgdu: Invalid next
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-26 13:31 UTC by Walter Schwarzenfeld
Modified: 2017-03-30 17:18 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (bdrewery)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Schwarzenfeld freebsd_triage 2017-03-26 13:31:23 UTC
pkgdu
/usr/local/sbin/pkgdu: /usr/local/sbin/pkgdu:241: Invalid next (SyntaxError)
Comment 1 Walter Schwarzenfeld freebsd_triage 2017-03-26 14:17:17 UTC
I am not very good in ruby, but this is probably the solution:
--- bin/pkgdu.orig      2017-03-26 14:01:06 UTC
+++ bin/pkgdu
@@ -234,12 +234,12 @@ def pkgs_size(pkgs)
             size /= $divider
             puts "#{size}\t#{pkgname}"
           end
+       end
+       next
         end
+       rescue => e
+         warning_message "Package PLIST error: "+e.message
       end
-    rescue => e
-      warning_message "Package PLIST error: "+e.message
-      next
-    end
   else
     pkgs.each do |pkg|
       if !$ignore_moved and \
Comment 2 Bryan Drewery freebsd_committer 2017-03-30 16:52:43 UTC
Thanks, this is kind of hilarious since it's been broken for so long and no one noticed.
Comment 3 Bryan Drewery freebsd_committer 2017-03-30 16:53:50 UTC
Although it's likely a new bug with ruby2.3.
Comment 4 commit-hook freebsd_committer 2017-03-30 17:18:35 UTC
A commit references this bug:

Author: bdrewery
Date: Thu Mar 30 17:18:11 UTC 2017
New revision: 437321
URL: https://svnweb.freebsd.org/changeset/ports/437321

Log:
  Update to 2.4.15.

    - pkgdu: Fix syntax error with Ruby 2.3 (invalid next)

  PR:		218139

Changes:
  head/ports-mgmt/portupgrade/Makefile
  head/ports-mgmt/portupgrade/distinfo
  head/ports-mgmt/portupgrade-devel/Makefile
  head/ports-mgmt/portupgrade-devel/distinfo