Skip site navigation (1)Skip section navigation (2)
Date:      23 Feb 2001 12:40:50 +0300
From:      Ilya Martynov <m_ilya@agava.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/25302: /usr/sbin/pkg_update doesn't work
Message-ID:  <86pug9spnh.fsf@juil.domain>

next in thread | raw e-mail | index | archive | help

>Number:         25302
>Category:       bin
>Synopsis:       /usr/sbin/pkg_update doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 23 01:50:00 PST 2001
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86pug9spnh.fsf>