ports/62990: portupgrade fails to use package even with -PP when package name changes
Leland Wang
llwang at infor.org
Wed Feb 18 03:50:29 UTC 2004
>Number: 62990
>Category: ports
>Synopsis: portupgrade fails to use package even with -PP when package name changes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Feb 17 19:50:28 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Leland Wang
>Release: FreeBSD 4.9-RELEASE-p1 i386
>Organization:
NTU CSIE
>Environment:
System: FreeBSD muse.csie.ntu.edu.tw 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #3: Sun Feb 1 23:56:10 CST 2004 root at muse.csie.ntu.edu.tw:/home/admin/usr/obj/home/admin/usr/src/sys/MUSE i386
>Description:
When a port's name changes to a alphabetically smaller one, portupgrade
fails to use package with -P or -PP options. This is because it compares
oldpkg and newpkg directly rather than oldpkg.version and newpkg.version.
I am not sure if a similiar condition will occur in the case like
upgrading 4.9 to 4.10.
>How-To-Repeat:
In the recent mozilla-firebird -> firefox change, get a firefox package
and do portupgrade -PP mozilla-firebird.
>Fix:
--- portupgrade.orig Wed Feb 18 11:37:11 2004
+++ portupgrade Wed Feb 18 11:36:42 2004
@@ -941,22 +941,22 @@
have_package = false
newpkg = newpkgname = nil
- if (oldpkg < portpkg || $force) && $use_packages
+ if (oldpkg.version < portpkg.version || $force) && $use_packages
progress_message "Checking the availability of the latest package of '#{origin}'"
newpkg, pkgfile = find_pkg(origin)
- if !newpkg || newpkg < oldpkg || newpkg < portpkg
+ if !newpkg || newpkg.version < oldpkg.version || newpkg.version < portpkg.version
if fetch_pkg(origin, logfile)
newpkg, pkgfile = find_pkg(origin)
end
- if !newpkg || newpkg < portpkg
+ if !newpkg || newpkg.version < portpkg.version
warning_message "Could not fetch the latest version '#{portpkg.version}'"
end
- if newpkg && newpkg < portpkg
- if oldpkg < newpkg && $use_packages_only
+ if newpkg && newpkg.version < portpkg.version
+ if oldpkg.version < newpkg.version && $use_packages_only
progress_message "Putting up with the version '#{newpkg.version}'"
else
newpkg = nil
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list