From owner-freebsd-bugs Sat Oct 19 7:20: 6 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A56F37B404 for ; Sat, 19 Oct 2002 07:20:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1671643EB2 for ; Sat, 19 Oct 2002 07:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9JEK1x3089211 for ; Sat, 19 Oct 2002 07:20:01 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9JEK12s089210; Sat, 19 Oct 2002 07:20:01 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B96BE37B401 for ; Sat, 19 Oct 2002 07:16:48 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7497143E65 for ; Sat, 19 Oct 2002 07:16:48 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9JEGl7R062736 for ; Sat, 19 Oct 2002 07:16:47 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g9JEGl1s062735; Sat, 19 Oct 2002 07:16:47 -0700 (PDT) Message-Id: <200210191416.g9JEGl1s062735@www.freebsd.org> Date: Sat, 19 Oct 2002 07:16:47 -0700 (PDT) From: MIchail Vidiassov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/44265: pkg_update does not preserve +REQUIRED_BY file for packages with underscore in version Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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: 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