Bug 21567

Summary: [PATCH] pkg_version -v confuzzled by multiple versions
Product: Base System Reporter: Peter Pentchev <roam>
Component: binAssignee: Bruce A. Mah <bmah>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Peter Pentchev 2000-09-26 19:20:01 UTC
When there are multiple versions of a package in the INDEX file,
pkg_version does not even try to check if you have one of the listed
versions (which would theoretically imply no need for upgrade).

Attached is a proposed patch to add a -m option, which checks if
the installed version is amongst the versions in the package, and if so,
reports it as "up-to-date (index has .....)".

Note: this functionality is ONLY explicitly enabled by specifying the -m
option on the command line; the default action is still to report the package
as '*' (multiple versions), so existing grep -v up-to-date scripts do not
break.

How-To-Repeat: 
Install e.g. vim or XFree86; run pkg_version -v; see it not attempt to
give any judgement on the package.

With the proposed patch, pkg_version -vm lists it as up-to-date.
Comment 1 Peter Pentchev 2000-09-27 10:00:59 UTC
Hmmm as nbm suggested in a -ports discussion, this PR only does a small
amount of the work needed on pkg_version; guess it can be closed, or maybe
left open as a reminder for all of you pkg_install people :P

G'luck,
Peter

-- 
Hey, out there - is it *you* reading me, or is it someone else?
Comment 2 Bruce A. Mah freebsd_committer freebsd_triage 2000-10-02 21:31:44 UTC
Responsible Changed
From-To: freebsd-bugs->bmah

This isn't quite the right answer, but so many people have asked 
for some sort of solution to this problem that I'll grab the 
PR as a reminder.
Comment 3 Bruce A. Mah freebsd_committer freebsd_triage 2000-10-25 22:36:54 UTC
State Changed
From-To: open->closed

I've committed a more workable solution to -CURRENT, relying 
on some other Ports Tree infrastructure enhancements by sobomax. 
Thanks for submitting your code though!