Bug 25302

Summary: /usr/sbin/pkg_update doesn't work
Product: Base System Reporter: m_ilya <m_ilya>
Component: binAssignee: Paul Richards <paul>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   

Description m_ilya 2001-02-23 09:50:00 UTC
Perl script pkg_upgrade (tool for upgrading installed packages) relies
on Perl language features which was introduced in Perl 5.6. Since
STABLE-4 has previous version of Perl this script simply doesn't work.

Fix: Here tirvial patch:



-- 
Ilya Martynov
AGAVA Software Company, http://www.agava.com--lVJsctCN7L3WJLH9DPbWS10fbsjNYYoPG12g9wH03gTVIe1R
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

*** /usr/sbin/pkg_update	Fri Feb 23 02:05:15 2001
--- pkg_update	Fri Feb 23 12:10:49 2001
***************
*** 1,4 ****
! #!/usr/bin/perl
  
  # Copyright (c) 2000
  #  Paul Richards. All rights reserved.
--- 1,4 ----
! #!/usr/bin/perl -w
  
  # Copyright (c) 2000
  #  Paul Richards. All rights reserved.
***************
*** 29,35 ****
  # $FreeBSD: src/usr.sbin/pkg_install/update/pkg_update.pl,v 1.4 2001/01/14 02:05:02 paul Exp $
  #/
  
- use warnings;
  use strict;
  
  use File::Basename;
--- 29,34 ----
***************
*** 117,123 ****
  my $pkg = "";
  my $update_pkg = "";
  
! our($opt_a, $opt_c, $opt_v, $opt_r, $opt_n);
  getopts('acnvr:');
  
  if ($opt_a && $opt_c) {
--- 116,122 ----
  my $pkg = "";
  my $update_pkg = "";
  
! use vars qw($opt_a $opt_c $opt_v $opt_r $opt_n);
  getopts('acnvr:');
  
  if ($opt_a && $opt_c) {
How-To-Repeat: 
$ perl -c /usr/sbin/pkg_update
Can't locate warnings.pm in @INC (@INC contains: /usr/home/ilya/perl-lib /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at /usr/sbin/pkg_update line 32.
BEGIN failed--compilation aborted at /usr/sbin/pkg_update line 32.
Comment 1 Kris Kennaway freebsd_committer freebsd_triage 2001-02-24 07:51:17 UTC
Responsible Changed
From-To: freebsd-bugs->paul

paul wrote pkg_update
Comment 2 Paul Richards freebsd_committer freebsd_triage 2001-03-16 04:41:59 UTC
State Changed
From-To: open->closed

Fixed with supplied patch.