Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2011 23:56:16 -0700
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        Andrey Chernov <ache@FreeBSD.ORG>
Cc:        Stanislav Sedov <stas@FreeBSD.ORG>, swills@FreeBSD.ORG, cvs-ports@FreeBSD.ORG, cvs-all@FreeBSD.ORG, ports-committers@FreeBSD.ORG
Subject:   Re: cvs commit: ports/ports-mgmt/portupgrade Makefile distinfo
Message-ID:  <20110822235616.161b70cc.stas@FreeBSD.org>
In-Reply-To: <20110823043910.GA85351@vniz.net>
References:  <201108230325.p7N3Piiu016891@repoman.freebsd.org> <20110823043910.GA85351@vniz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Mon__22_Aug_2011_23_56_16_-0700_8gZ+uL_/lFoENQN_
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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

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

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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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 @@
=20
 PORTNAME=3D	portupgrade
 PORTVERSION=3D	2.4.9.2
-PORTREVISION=3D	0
+PORTREVISION=3D	1
 PORTEPOCH=3D	2
 CATEGORIES=3D	ports-mgmt
 MASTER_SITES=3D	ftp://ftp.SpringDaemons.com/soft/
Index: files/patch-lib_pkgdb.rb
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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] =3D=3D ?/ && pkgs.split.find { |pkg| deleted_pkgs.qinclude?(pk=
g) }
+ 	}.each do |path, pkgs|
+-	  path =3D File.realpath(path)
++	  path =3D File.expand_path(path)
+=20
+ 	  pkgs =3D pkgs.split - deleted_pkgs
+=20
+@@ -466,7 +466,7 @@ class PkgDB
+ 	  end
+=20
+ 	  pkginfo.files.each do |path|
+-	    path =3D File.realpath(path)
++	    path =3D File.expand_path(path)
+=20
+ 	    if @db.key?(path)
+ 	      pkgs =3D @db[path].split
+@@ -558,7 +558,7 @@ class PkgDB
+   end
+=20
+   def which(path, m =3D false)
+-    path =3D File.realpath(path)
++    path =3D File.expand_path(path)
+=20
+     open_db
+=20
Index: files/patch-lib_pkgmisc.rb
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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
+=20
+-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 !=3D "" then
+     return


--=20
Stanislav Sedov
ST4096-RIPE

()  ascii ribbon campaign - against html e-mail=20
/\  www.asciiribbon.org   - against proprietary attachments

--Signature=_Mon__22_Aug_2011_23_56_16_-0700_8gZ+uL_/lFoENQN_
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----

iQIcBAEBAgAGBQJOU08VAAoJEL8lojEJL9nwAREP/iP+r3okUCrrAVrxczl/m0RK
WtgTq1P2Zc7YBXf2JeXd2kKNg8DaV+DgiNIWiRb190kV8rBFp5NFKpKH4UhoewBx
DIDZavSBPoejerp0RETsmrMK1Ihj/QezC000z/crPXA0+KoZCtMFhdWIegi1aTk1
wSYWtZJ1Uwif26eeH5F6jTVqChy46FfQyr3jFY1KMBsWu2Xi2kMsAmVoNVTC6HCY
jerfzNk7tiv3uhuNeuq6Hxo4T8Zl/RqwN7gywUn/1mtR767o+297EivtOx9qCXJk
6yzmGL8ygE1pUN2HoiGX0DrUkrudeAP/nfzZU28Rms7de6V957xFJOCIT81NG0Aa
sdtMlgw7ATt6O0XRk7jJMHNa3h74Dz2+w148EoL9/RAVHiBZbhM22xYg5wiFUDR5
ZgviIO0b3wDC+9iQaLW2kIIMwznQChu1nO9Z2Dd/vImoMGoDRgidUILUN0FkHN19
9T38pmjCxw58PM7LWwQeTCWuCFCIT5OebYuTwR/YfBOPr6Fnc1PHwwJ6JQgaKDEe
/RDVUM/NNKNZSBYVawmrSargaIYhNOWbujpNDar/znvJDcNhpYd/k7WeygWrg4iR
tNw7TZlwJatBjyGKIqkkpCkaMVylxlvqeH0LQU7gw5LNVCIvu2cN7Nt/kErJPl6c
aAFESJjlro9pxhmteIxn
=WSKs
-----END PGP SIGNATURE-----

--Signature=_Mon__22_Aug_2011_23_56_16_-0700_8gZ+uL_/lFoENQN_--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110822235616.161b70cc.stas>