From m_ilya@agava.com  Fri Feb 23 01:41:01 2001
Return-Path: <m_ilya@agava.com>
Received: from relay2.agava.net.ru (2.oivt.mipt.ru [193.125.142.2])
	by hub.freebsd.org (Postfix) with ESMTP id 5795637B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Feb 2001 01:40:56 -0800 (PST)
	(envelope-from m_ilya@agava.com)
Received: from gw.office.agava.ru (2.oivt.mipt.ru [193.125.142.2])
	by relay2.agava.net.ru (Postfix) with ESMTP id 5318C4379B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Feb 2001 12:40:52 +0300 (MSK)
Received: from juil.domain (juil.domain [192.168.1.50])
	by gw.office.agava.ru (Postfix) with ESMTP id 14ABA5EA2
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Feb 2001 12:40:52 +0300 (MSK)
Received: by juil.domain (Postfix, from userid 1001)
	id 3397357; Fri, 23 Feb 2001 12:40:52 +0300 (MSK)
Message-Id: <86pug9spnh.fsf@juil.domain>
Date: 23 Feb 2001 12:40:50 +0300
From: Ilya Martynov <m_ilya@agava.com>
Sender: ilya@juil.domain
Reply-To: ilya@martynov.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: /usr/sbin/pkg_update doesn't work

>Number:         25302
>Category:       bin
>Synopsis:       /usr/sbin/pkg_update doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    paul
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 23 01:50:00 PST 2001
>Closed-Date:    Thu Mar 15 20:41:59 PST 2001
>Last-Modified:  Thu Mar 15 20:42:46 PST 2001
>Originator:     Ilya Martynov
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
AGAVA Software
>Environment:

Recently updated with cvsup FreeBSD STABLE-4

>Description:

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.

>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.

>Fix:

Here tirvial patch:

*** /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) {



-- 
Ilya Martynov
AGAVA Software Company, http://www.agava.com
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->paul 
Responsible-Changed-By: kris 
Responsible-Changed-When: Fri Feb 23 23:51:17 PST 2001 
Responsible-Changed-Why:  
paul wrote pkg_update 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25302 
State-Changed-From-To: open->closed 
State-Changed-By: paul 
State-Changed-When: Thu Mar 15 20:41:59 PST 2001 
State-Changed-Why:  
Fixed with supplied patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25302 
>Unformatted:
