Date: Fri, 4 Jan 2002 11:30:02 -0800 (PST) From: "Akinori MUSHA" <knu@iDaemons.org> To: freebsd-ports@FreeBSD.org Subject: Re: ports/33520: "bsdpan" files confuse portversion utility Message-ID: <200201041930.g04JU2S32871@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/33520; it has been noted by GNATS. From: "Akinori MUSHA" <knu@iDaemons.org> To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: Re: ports/33520: "bsdpan" files confuse portversion utility Date: Sat, 05 Jan 2002 04:20:05 +0900 At Thu, 3 Jan 2002 17:04:30 -0500 (EST), Vivek Khera wrote: > the ports' perl 5.6.1 installs with BSDPAN as default. whenever > modules are installed via the "CPAN" utility, they create bsdpan-XXX > "ports" on the fly. The pkgdb -F and portversion utilities complain > about missin origin of these files. However, there is no origin since > they are not really ports in the traditional sense. portversion > outputs something like this: > > bsdpan-Digest-MD5-2.16 # error - origin not recorded; run pkgdb -F > > and running pkgdb -F does no good since there is no origin ;-( Both portversion(1) and pkgdb(1) should properly treat bsdpan-* packages if you have 'bsdpan-*' in your HOLD_PKGS variable as listed by default: knu@archon[2]% grep -C2 bsdpan /usr/local/etc/pkgtools.conf.sample # e.g.: # HOLD_PKGS = [ # 'bsdpan-*', # 'x11/XFree86*', # ] HOLD_PKGS = [ 'bsdpan-*', ] knu@archon[2]% portversion -v bsdpan-Net-IRC-0.72 bsdpan-Net-IRC-0.72 # [held] error - origin not recorded; run pkgdb -F knu@archon[2]% sudo pkgdb -F Password: (..snip..) Checking the origin of bsdpan-Net-IRC-0.72 Missing origin. -> Ignored. (the package is held; specify -f to force) (..snip..) (Note the occurrences of the word "held") But yes, portupgrade(1) may not handle packages without origins quite correctly; it complains about a package's missing its origin before checking if the package is "held". (It doesn't really matter since the upgrade stops in any case) The following patch makes portupgrade(1) properly look up HOLD_PKGS before checking the origin for each package. Apply it now if you can't wait until the next release comes up. Index: portupgrade =================================================================== RCS file: /home/cvs/pkgtools/bin/portupgrade,v retrieving revision 1.162 retrieving revision 1.163 diff -u -r1.162 -r1.163 --- portupgrade 2 Jan 2002 23:39:40 -0000 1.162 +++ portupgrade 3 Jan 2002 23:01:58 -0000 1.163 @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -RCS_ID = %q$Idaemons: /home/cvs/pkgtools/bin/portupgrade,v 1.162 2002/01/02 23:39:40 knu Exp $ +RCS_ID = %q$Idaemons: /home/cvs/pkgtools/bin/portupgrade,v 1.163 2002/01/03 23:01:58 knu Exp $ RCS_REVISION = RCS_ID.split[2] MYNAME = File.basename($0) @@ -805,13 +805,7 @@ oldpkgname = oldpkg.fullname origin ||= oldpkg.origin - if origin.nil? - warning_message "The origin of '#{oldpkgname}' is unknown." - warning_message "Specify one with -o option, or run 'pkgdb -F' to fix it." - raise OriginMissingError - end - - if config_held?(origin) + if origin && config_held?(origin) warning_message "The port '#{origin}' is held by user." if $force @@ -820,6 +814,21 @@ progress_message "Skipping '#{origin}' (specify -f to force)" return false end + elsif config_held?(oldpkgname) + warning_message "The package '#{oldpkgname}' is held by user." + + if $force + progress_message "Forced by user" + else + progress_message "Skipping '#{oldpkgname}' (specify -f to force)" + return false + end + end + + if origin.nil? + warning_message "The origin of '#{oldpkgname}' is unknown." + warning_message "Specify one with -o option, or run 'pkgdb -F' to fix it." + raise OriginMissingError end logfile = f.path -- / /__ __ Akinori.org / MUSHA.org / ) ) ) ) / FreeBSD.org / Ruby-lang.org Akinori MUSHA aka / (_ / ( (__( @ iDaemons.org / and.or.jp "Somewhere out of a memory.. of lighted streets on quiet nights.." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201041930.g04JU2S32871>