Rewrite pkg_preinst to properly handle ROOT, EPREFIX, and whitespace.
authorMike Gilbert <floppym@gentoo.org>
Tue, 25 Oct 2011 00:35:35 +0000 (00:35 +0000)
committerMike Gilbert <floppym@gentoo.org>
Tue, 25 Oct 2011 00:35:35 +0000 (00:35 +0000)
Package-Manager: portage-2.2.0_alpha71/cvs/Linux x86_64

dev-lang/v8/ChangeLog
dev-lang/v8/Manifest
dev-lang/v8/v8-3.6.6.5.ebuild
dev-lang/v8/v8-9999.ebuild

index 4a527e1c4ca342b2fe6e59fea554c31f2058dc7b..0d790ce085b3df9328e3b851afc4857f15a051ae 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for dev-lang/v8
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/ChangeLog,v 1.93 2011/10/22 11:53:36 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/ChangeLog,v 1.94 2011/10/25 00:35:35 floppym Exp $
+
+  25 Oct 2011; Mike Gilbert <floppym@gentoo.org> v8-3.6.6.5.ebuild,
+  v8-9999.ebuild:
+  Rewrite pkg_preinst to properly handle ROOT, EPREFIX, and whitespace.
 
 *v8-3.5.10.22 (22 Oct 2011)
 
index 6e60cae0c8f966627fc1a49adf5e6c314afff891..b3c4409de4c4951dac8488b5b292716b3123ed68 100644 (file)
@@ -1,5 +1,5 @@
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA256
 
 AUX v8-no-O3-r0.patch 422 RMD160 37467564f5ea6ff519cf86b7209a534424abbba3 SHA1 edbf6d9afc5ea6fdd0e9c0bf06d65caa488914c6 SHA256 c38a393a23adff83a799cb137f8a8e5092f87a62db109d7ce41becd6dec781f5
 AUX v8-no-werror-r0.patch 573 RMD160 17791cdee16894b37e937f23146aff52bc3d4775 SHA1 fa814bfc6c64570e0e69a184f1c36c359b63eb2d SHA256 8968e9b4f362d3e059675c6bb9b6be0d104ac478a62c50a8f7304f47d514e782
@@ -10,14 +10,15 @@ DIST v8-3.6.6.5.tar.bz2 9621910 RMD160 b704bdfc7ea535210a2c8881becff6f81e0c6da3
 EBUILD v8-3.4.14.28.ebuild 2072 RMD160 f53e40da494c27cab9f93f203bf8724da77c9899 SHA1 d1a0a5604c2e33ba244ad0560169906a324b1e88 SHA256 0af984740f48b5717143d6eecc61d77b7579edcf9794a15972d0a75bc5dbfb27
 EBUILD v8-3.5.10.22.ebuild 2126 RMD160 d182c1bb4ed20eaf39edf5327fdebc30e62cf9f7 SHA1 1fa9013166c78adf11ca8d55870c8629e12849b8 SHA256 11d4154e6f3be5573c39be397a1ada54653a109079d96b3164c05b9066e2c859
 EBUILD v8-3.6.6.3.ebuild 2201 RMD160 a3b3b274823ab5ea114f69b8537ae07ba293debc SHA1 b791e2241c621ffd93105b6b9e0c799fbafc0a9e SHA256 86decb1d856582a50e501bf69f47ed0185e31b24511833edcaa260163f42006c
-EBUILD v8-3.6.6.5.ebuild 2728 RMD160 63a71ca2b40a3b192ed3bbf44271e752cf002948 SHA1 8a0d74dd50746ad903f197e7b6a88624b3bd98d5 SHA256 68af4bc6ef3693c1adeb3237a5a7bb1a59b21efabe252374c0176af1837d58e1
-EBUILD v8-9999.ebuild 2625 RMD160 dbef90f0460ae453c31614bc389d4b2517679c1c SHA1 46d5a0d53eeae2c5dfd37dafb9dd297176dbc2fd SHA256 446c192ae69c10bc82363d1a1bab6ba03023881f29f31b928365ddb01b56b1df
-MISC ChangeLog 15757 RMD160 8e0ed22d34c2f8ea5d55d0f278b90258c810f514 SHA1 8cb0cb080849fed195fdb9fa529766357f22b8e8 SHA256 9763b03e6c01f4b7c388027d4041ff0032d9e3ee2d832c161d8b17a80041713a
+EBUILD v8-3.6.6.5.ebuild 2771 RMD160 a6dfde94fadd54a83e3441f399eef309bb005409 SHA1 f555c8d1fd3b3ca7e9ea24d9ada4b3f2ab562887 SHA256 8e44ec0d5ba54db59da4787239e2806c0d8a5d1fa99e6d44ac9b91e9a6fcc64a
+EBUILD v8-9999.ebuild 2668 RMD160 c07b054a09d8472d96652ecc050c2b64ed99ff61 SHA1 4ac57d82a2b42989137a2630f28cc308894c720e SHA256 9386fa695cae87f60082684eedb8bb5ab3fa40eddaea95a80304bfd0dd6a2747
+MISC ChangeLog 15913 RMD160 ca62ab308d2c3487b1941c78b635bdd23a0bb4c7 SHA1 11ccb6da4a66eb89665747150e06b02d7565b3cf SHA256 288aba19753d7fdf840d489f0373fd2e431c6707bf025d36957ceec735444a88
 MISC metadata.xml 162 RMD160 3485b95578a49782c3188a0f963f90c688287fe1 SHA1 46226eeaf4948209a093253f92010abea501daef SHA256 8a3ecdcf518f45ec4843398f9896c9b4d1c867ff2cf2851cf40b06f756f111e8
+MISC v8-9999.ebuild.orig 2625 RMD160 dbef90f0460ae453c31614bc389d4b2517679c1c SHA1 46d5a0d53eeae2c5dfd37dafb9dd297176dbc2fd SHA256 446c192ae69c10bc82363d1a1bab6ba03023881f29f31b928365ddb01b56b1df
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iEYEAREKAAYFAk6irsIACgkQuUQtlDBCeQJgmACghbS3KBjepr7kyA8I2BmG7wBC
-iWcAnitZbTr+eoI1j9ag+GktooH4Qo3t
-=OmgE
+iF4EAREIAAYFAk6mBGEACgkQC77qH+pIQ6S+UwD/fCEi/OXK7bYJmB/Jlyx0kFW+
+4u61zUGRLZM8u15+7pcBAJWawnbQhfnaSe5jspv4INSktWVh/fsHWTW4JTp96ZLA
+=t11a
 -----END PGP SIGNATURE-----
index 8a9431ae64f999499492bf9d3be43d1a565a1211..72572dd1f6082a7f48b3e274e690adc7f5b9f41c 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.6.6.5.ebuild,v 1.2 2011/10/22 11:44:36 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-3.6.6.5.ebuild,v 1.3 2011/10/25 00:35:35 floppym Exp $
 
 EAPI="3"
 
@@ -94,21 +94,27 @@ src_install() {
 }
 
 pkg_preinst() {
-       local preserved_candidates="$(find /usr/$(get_libdir) -maxdepth 1 -name libv8-\*$(get_libname))"
-       preserved_libs=""
-       for candidate in ${preserved_candidates}; do
-               if [[ -f "${D}/usr/$(get_libdir)/`basename ${candidate}`" ]]; then
-                       continue
+       preserved_libs=()
+       local baselib
+
+       eshopts_push -s nullglob
+
+       for candidate in "${EROOT}usr/$(get_libdir)"/libv8-*$(get_libname); do
+               baselib=${candidate##*/}
+               if [[ ${baselib} != libv8-${soname_version}$(get_libname) ]]; then
+                       preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
                fi
-               preserved_libs+=" ${candidate}"
        done
-       if [[ "${preserved_libs}" != "" ]]; then
-               preserve_old_lib ${preserved_libs}
+
+       eshopts_pop
+
+       if [[ ${#preserved_libs[@]} -gt 0 ]]; then
+               preserve_old_lib "${preserved_libs[@]}"
        fi
 }
 
 pkg_postinst() {
-       if [[ "${preserved_libs}" != "" ]]; then
-               preserve_old_lib_notify ${preserved_libs}
+       if [[ ${#preserved_libs[@]} -gt 0 ]]; then
+               preserve_old_lib_notify "${preserved_libs[@]}"
        fi
 }
index 85c8c87433e5dcba60bdf6f99709b03e9607f397..9e39cd17c446e29cecf921403de307d80f54ef43 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-9999.ebuild,v 1.17 2011/10/22 11:44:36 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/v8/v8-9999.ebuild,v 1.18 2011/10/25 00:35:35 floppym Exp $
 
 EAPI="3"
 
@@ -95,21 +95,27 @@ src_install() {
 }
 
 pkg_preinst() {
-       local preserved_candidates="$(find /usr/$(get_libdir) -maxdepth 1 -name libv8-\*$(get_libname))"
-       preserved_libs=""
-       for candidate in ${preserved_candidates}; do
-               if [[ -f "${D}/usr/$(get_libdir)/`basename ${candidate}`" ]]; then
-                       continue
+       preserved_libs=()
+       local baselib
+
+       eshopts_push -s nullglob
+
+       for candidate in "${EROOT}usr/$(get_libdir)"/libv8-*$(get_libname); do
+               baselib=${candidate##*/}
+               if [[ ${baselib} != libv8-${soname_version}$(get_libname) ]]; then
+                       preserved_libs+=( "${EPREFIX}/usr/$(get_libdir)/${baselib}" )
                fi
-               preserved_libs+=" ${candidate}"
        done
-       if [[ "${preserved_libs}" != "" ]]; then
-               preserve_old_lib ${preserved_libs}
+
+       eshopts_pop
+
+       if [[ ${#preserved_libs[@]} -gt 0 ]]; then
+               preserve_old_lib "${preserved_libs[@]}"
        fi
 }
 
 pkg_postinst() {
-       if [[ "${preserved_libs}" != "" ]]; then
-               preserve_old_lib_notify ${preserved_libs}
+       if [[ ${#preserved_libs[@]} -gt 0 ]]; then
+               preserve_old_lib_notify "${preserved_libs[@]}"
        fi
 }