cvs commit: ports/ports-mgmt/portupgrade Makefile distinfo

Stanislav Sedov stas at FreeBSD.org
Tue Aug 23 06:56:01 UTC 2011


On Tue, 23 Aug 2011 08:39:10 +0400
Andrey Chernov <ache at FreeBSD.ORG> mentioned:

> On Tue, Aug 23, 2011 at 03:25:44AM +0000, Stanislav Sedov wrote:
> > stas        2011-08-23 03:25:44 UTC
> > 
> >   FreeBSD ports repository
> > 
> >   Modified files:
> >     ports-mgmt/portupgrade Makefile distinfo 
> >   Log:
> >   - Update to 2.4.9.2.
> >     This version is a bugfix release.
> 
> It still rebuilds whole pkg db on each deinstall. Yet another example (in 
> the upgrade process):
> 

Hi!

Can you, please, try the patch attached?  Thanks!
I'm not entirely sure, but this might happen because of exception
being delivered from File.realpath.

Thanks a lot!
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/ports-mgmt/portupgrade/Makefile,v
retrieving revision 1.264
diff -u -r1.264 Makefile
--- Makefile	23 Aug 2011 03:25:44 -0000	1.264
+++ Makefile	23 Aug 2011 06:53:36 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	portupgrade
 PORTVERSION=	2.4.9.2
-PORTREVISION=	0
+PORTREVISION=	1
 PORTEPOCH=	2
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	ftp://ftp.SpringDaemons.com/soft/
Index: files/patch-lib_pkgdb.rb
===================================================================
RCS file: files/patch-lib_pkgdb.rb
diff -N files/patch-lib_pkgdb.rb
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-lib_pkgdb.rb	23 Aug 2011 06:53:36 -0000
@@ -0,0 +1,31 @@
+diff --git a/lib/pkgdb.rb b/lib/pkgdb.rb
+index 819309b..23e4203 100644
+--- lib/pkgdb.rb
++++ lib/pkgdb.rb
+@@ -431,7 +431,7 @@ class PkgDB
+ 	@db.select { |path, pkgs|
+ 	  path[0] == ?/ && pkgs.split.find { |pkg| deleted_pkgs.qinclude?(pkg) }
+ 	}.each do |path, pkgs|
+-	  path = File.realpath(path)
++	  path = File.expand_path(path)
+ 
+ 	  pkgs = pkgs.split - deleted_pkgs
+ 
+@@ -466,7 +466,7 @@ class PkgDB
+ 	  end
+ 
+ 	  pkginfo.files.each do |path|
+-	    path = File.realpath(path)
++	    path = File.expand_path(path)
+ 
+ 	    if @db.key?(path)
+ 	      pkgs = @db[path].split
+@@ -558,7 +558,7 @@ class PkgDB
+   end
+ 
+   def which(path, m = false)
+-    path = File.realpath(path)
++    path = File.expand_path(path)
+ 
+     open_db
+ 
Index: files/patch-lib_pkgmisc.rb
===================================================================
RCS file: files/patch-lib_pkgmisc.rb
diff -N files/patch-lib_pkgmisc.rb
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-lib_pkgmisc.rb	23 Aug 2011 06:53:36 -0000
@@ -0,0 +1,19 @@
+diff --git a/lib/pkgmisc.rb b/lib/pkgmisc.rb
+index 225408a..83ea9da 100644
+--- lib/pkgmisc.rb
++++ lib/pkgmisc.rb
+@@ -94,14 +94,6 @@ def shelljoin(*args)
+   }.join(' ')
+ end
+ 
+-class File
+-  if not File.respond_to?('realpath') then
+-    def File.realpath(path)
+-      return File.expand_path(path)
+-    end
+-  end
+-end
+-
+ def init_tmpdir
+   if ! $tmpdir.nil? && $tmpdir != "" then
+     return


-- 
Stanislav Sedov
ST4096-RIPE

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-ports/attachments/20110823/a7005ea2/attachment.pgp


More information about the cvs-ports mailing list