Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Oct 2002 07:16:47 -0700 (PDT)
From:      MIchail Vidiassov <master@iaas.msu.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/44265: pkg_update does not preserve +REQUIRED_BY file for packages with underscore in version
Message-ID:  <200210191416.g9JEGl1s062735@www.freebsd.org>

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

>Number:         44265
>Category:       misc
>Synopsis:       pkg_update does not preserve +REQUIRED_BY file for packages with underscore in version
>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:   Sat Oct 19 07:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     MIchail Vidiassov
>Release:        FreeBSD 4.7-PRERELEASE
>Organization:
IAAS of MSU
>Environment:
FreeBSD serv.iaas.msu.ru 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #7: Tue Sep 10 21
:52:54 MSD 2002     root@serv.iaas.msu.ru:/disk0g/src/sys/compile/MYKERNEL  i386
>Description:
pkg_update incorrectly determines the new version from the package name.
It does not expect package version to contain anything but digits and dots.
>How-To-Repeat:
<pkg_update wrapper-1.0_2.tgz
>Fix:
sub get_version($) {
        my ($pkg) = @_;
        $pkg =~ /(.+)-([0-9\.]+)/;
                       ^^^^^^ the pattern needs to be changed
        if (! $2) {
                return($pkg, "");
        } else {
                return ($1, $2);
        }
}

To fix just the +REQUIRED_BY problem the followin patch may help
($pkgname and $new_version are made from $newpkg -> why do we need to
 cut $newpkg in parts just to join the parts back again?)
--- pkg_update.orig     Fri Oct 18 22:32:47 2002
+++ pkg_update  Fri Oct 18 22:57:56 2002
@@ -215,7 +215,7 @@
                }
        }
 } else {
-       put_requires($pkgname . "-" . $new_version, \%requires);
+       put_requires($newpkg, \%requires);
 }

 exit;
>Release-Note:
>Audit-Trail:
>Unformatted:
 >Updating wrapper packages to version 1.0
                                       ^^^^ note the incorrect version
 >pkg_delete: package 'wrapper-1.0_2' is required by these other packages
 >and may not be deinstalled (but I'll delete it anyway):
 >XFree86-4.2.0_1,1
 >Can't open /var/db/pkg/wrapper-1.0/+REQUIRED_BY, No such file or directory
                                 ^^^ again
 

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?200210191416.g9JEGl1s062735>