public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-03-22  3:07 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-03-22  3:07 UTC (permalink / raw
  To: gentoo-commits

commit:     c1cc547ec1e48a967d9f65cab29ffc4e89053a39
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 22 03:05:36 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 03:05:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=c1cc547e

Fixing lib references. ${EROOT}/usr/lib(64)?/postgresql-${SLOT}/lib(64)?/

---
 postgresql.eselect |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 7805d34..06896c9 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -1,4 +1,4 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id: $
 
@@ -7,7 +7,7 @@ inherit config multilib output package-manager path-manipulation
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
 SVN_DATE='$Date: $'
-VERSION="1.0.3"
+VERSION="1.0.4"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"
@@ -166,13 +166,13 @@ do_set() {
 
 	# Link modules to /usr/lib{,lib32,lib64}/
 	for x in ${LIB_LIST} ; do
-		if [ -d ${B_PATH}/${x}/postgresql-${SLOT}/lib ] ; then
+		if [ -d ${B_PATH}/${x}/postgresql-${SLOT}/${x} ] ; then
 			# 'linker' function doesn't work for linking directories.
 			# Default lib path
-			ln -s ${B_PATH}/${x}/postgresql-${SLOT}/lib ${B_PATH}/${x}/postgresql
+			ln -s ${B_PATH}/${x}/postgresql-${SLOT}/${x} ${B_PATH}/${x}/postgresql
 			echo ${B_PATH}/${x}/postgresql >> ${E_PATH}/active.links
 			# Linker works for files
-			linker "${B_PATH}/${x}/postgresql-${SLOT}/lib/lib*.{a,so}" "${B_PATH}/${x}"
+			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}/lib*.{a,dylib,so}" "${B_PATH}/${x}"
 		fi
 	done
 
@@ -279,7 +279,7 @@ do_update() {
 	while [ $[--index] -gt -1 ] ; do
 		echo -e "\n\033[1mGenerating symbolic links for ${slots[$index]} applications...\033[0m"
 		for x in ${LIB_LIST} ; do
-			local lib_path="${B_PATH}/${x}/postgresql-${slots[$index]}/lib/"
+			local lib_path="${B_PATH}/${x}/postgresql-${slots[$index]}/${x}/"
 			[ -d ${lib_path} ] && ldpath+=":${lib_path}"
 		done
 		local share_path="${B_PATH}/share/postgresql-${slots[$index]}/"



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-03-24 22:41 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-03-24 22:41 UTC (permalink / raw
  To: gentoo-commits

commit:     83e0fd3da11bd35153079de7b00b5556888235a9
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 22 23:47:58 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 23:47:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=83e0fd3d

Localize variables.

---
 postgresql.eselect |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 06896c9..39ea024 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -138,14 +138,14 @@ do_set() {
 
 	printf "\tGenerating new links..."
 	# Sources and targets for header files
-	sources=(
+	local sources=(
 		${B_PATH}/include/postgresql-${SLOT}
 		${B_PATH}/include/postgresql-${SLOT}/libpq-fe.h
 		${B_PATH}/include/postgresql-${SLOT}/pg_config_manual.h
 		${B_PATH}/include/postgresql-${SLOT}/libpq
 		${B_PATH}/include/postgresql-${SLOT}/postgres_ext.h
 	)
-	targets=(
+	local targets=(
 		${B_PATH}/include/postgresql
 		${B_PATH}/include/libpq-fe.h
 		${B_PATH}/include/pg_config_manual.h
@@ -234,7 +234,7 @@ do_update() {
 	if [ ${index} -eq 0 ] ; then
 		write_warning_msg "No slots found!"
 		write_warning_msg "Removing files (Control-C to abort) in..."
-		i=6
+		local i=6
 		while [ $[i--] -gt 0 ] ; do
 			printf " $i"
 			sleep 1



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-03-26  2:13 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-03-26  2:13 UTC (permalink / raw
  To: gentoo-commits

commit:     819c30395590a683b3e9d1e4fc5134fe2fbd7bf6
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 26 02:11:35 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sat Mar 26 02:11:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=819c3039

Changed behavior of update(). It'll now both pick and set the default as being
active automatically. When a default is set already, it merely does a reset and
refreshes all of the links.

---
 postgresql.eselect |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 39ea024..8e4a63a 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -253,13 +253,9 @@ do_update() {
 	if [[ ${slots[@]} =~ ${ACTIVE_SLOT} ]] ; then
 		do_reset
 	else
-		# Default to the highest slot available.
 		# best_version doesn't work here as pkg_postrm runs before the world
 		# file is updated, thereby returning a false positive.
 		do_set ${slots[$index-1]}
-
-		# Remove active file because it isn't set by a user.
-		rm -f ${E_PATH}/active
 	fi
 
 	# Clean out the cruft



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-03-27 13:28 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-03-27 13:28 UTC (permalink / raw
  To: gentoo-commits

commit:     6de301e7951636e194ef95dbe90b9a0f9afdb459
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 27 13:27:48 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sun Mar 27 13:27:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=6de301e7

Cleaned up output and localized variables.

---
 postgresql.eselect |   47 +++++++++++++++++++++++++++--------------------
 1 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 8e4a63a..9a7e0c5 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -83,8 +83,10 @@ do_list() {
 	if $(is_output_mode brief) ; then
 		echo $(get_slots)
 	else
+		local slot
 		for slot in $(get_slots) ; do
 			local postgres_ebuilds=""
+			local src
 			for src in ${E_PATH}/slots/${slot}/{server,service,base,docs} ; do
 				[ -r ${src} ] && source ${src}
 			done
@@ -129,14 +131,14 @@ do_set() {
 		die -q "Not a valid slot."
 	fi
 
-	echo -e "\033[1mSetting ${SLOT} as the default installation...\033[0m"
+	echo "Setting ${SLOT} as the default installation..."
 
 	# Remove the active links to start a fresh list
-	printf "\tRemoving old links..."
+	echo -ne "\tRemoving old links..."
 	unlinker ${E_PATH}/active.links
-	echo "Done!"
+	echo "done."
 
-	printf "\tGenerating new links..."
+	echo -ne "\tGenerating new links..."
 	# Sources and targets for header files
 	local sources=(
 		${B_PATH}/include/postgresql-${SLOT}
@@ -153,6 +155,7 @@ do_set() {
 		${B_PATH}/include/postgres_ext.h
 	)
 	# The linker function cannot accomadate this special purpose.
+	local i
 	for (( i=0; $i < ${#sources[@]}; i++ )) ; do
 		# Remove target before creating the symlink
 		rm -f ${targets[$i]}
@@ -165,6 +168,7 @@ do_set() {
 	done
 
 	# Link modules to /usr/lib{,lib32,lib64}/
+	local x
 	for x in ${LIB_LIST} ; do
 		if [ -d ${B_PATH}/${x}/postgresql-${SLOT}/${x} ] ; then
 			# 'linker' function doesn't work for linking directories.
@@ -184,8 +188,8 @@ do_set() {
 	echo ${B_PATH}/share/postgresql >> ${E_PATH}/active.links
 
 	echo ${SLOT} > ${E_PATH}/active
-	echo "Done!"
-	echo -e "\033[1mSetting default successful!\033[0m"
+	echo "done."
+	echo -e "\033[1mSetting ${SLOT} as default was successful!\033[0m"
 }
 
 ### Unset Action ###
@@ -196,10 +200,10 @@ describe_unset() {
 do_unset() {
 	local SLOT=$1
 	if [ "${SLOT}" = "${ACTIVE_SLOT}" ] ; then
-		echo -e "\033[1mUnsetting ${SLOT} as the default installation...\033[0m"
+		echo -n "Unsetting ${SLOT} as the default installation..."
 		unlinker ${E_PATH}/active.links
 		rm -f ${E_PATH}/active
-		echo -e "\033[1mDone!\033[0m"
+		echo "done."
 	else
 		echo "Inactive slot selected. No work to do."
 	fi
@@ -211,7 +215,7 @@ describe_reset() {
 }
 
 do_reset() {
-	[ "${ACTIVE_SLOT}" = "(none)" ] && die -q "No active slot to reset. Set a slot."
+	[ "${ACTIVE_SLOT}" = "(none)" ] && die -q "No active slot to reset."
 	do_unset ${ACTIVE_SLOT}
 	do_set ${ACTIVE_SLOT}
 }
@@ -236,7 +240,7 @@ do_update() {
 		write_warning_msg "Removing files (Control-C to abort) in..."
 		local i=6
 		while [ $[i--] -gt 0 ] ; do
-			printf " $i"
+			echo -n " $i"
 			sleep 1
 		done
 		for sym_links in ${E_PATH}/active.links* ; do
@@ -258,34 +262,37 @@ do_update() {
 		do_set ${slots[$index-1]}
 	fi
 
-	# Clean out the cruft
-	printf "Removing old links..."
+	echo -en "\nCleaning out old links before refreshing..."
+	local sym_links
 	for sym_links in ${E_PATH}/active.links?* ; do
 		unlinker ${sym_links}
 	done
-	echo "Done!"
+	echo "done."
 
 	# Update paths to libs and docs
 	local ldpath
+	local x
 	for x in ${LIB_LIST} ; do
-		ldpath+="${B_PATH}/${x}/postgresql:"
+		[ -h ${B_PATH}/${x}/postgresql ] && ldpath+="${B_PATH}/${x}/postgresql:"
 	done
 	ldpath="${ldpath%:}"
 	local manpath="${B_PATH}/share/postgresql/"
 	while [ $[--index] -gt -1 ] ; do
-		echo -e "\n\033[1mGenerating symbolic links for ${slots[$index]} applications...\033[0m"
+		local curslot="${slots[$index]}"
+		echo -n "Refreshing symbolic links for ${curslot} applications (like /usr/bin/psql${curslot//.})..."
 		for x in ${LIB_LIST} ; do
-			local lib_path="${B_PATH}/${x}/postgresql-${slots[$index]}/${x}/"
+			local lib_path="${B_PATH}/${x}/postgresql-${curslot}/${x}/"
 			[ -d ${lib_path} ] && ldpath+=":${lib_path}"
 		done
-		local share_path="${B_PATH}/share/postgresql-${slots[$index]}/"
+		local share_path="${B_PATH}/share/postgresql-${curslot}/"
 		[ -d ${share_path} ] && manpath+=":${share_path}"
-		linker "${B_PATH}/${LIBDIR}/postgresql-${slots[$index]}/bin/*" "${B_PATH}/bin" "${slots[$index]//.}"
-		echo -e "\033[1mDone!\033[0m"
+		linker "${B_PATH}/${LIBDIR}/postgresql-${curslot}/bin/*" "${B_PATH}/bin" "${curslot//.}"
+		echo "done."
 	done
 
-	# Remove bad environment files that have been generated by the ebuilds
+	# Remove environment files that have been generated by the ebuilds
 	rm -f ${ENV_FILE}-*
+
 	store_config ${ENV_FILE} LDPATH "${ldpath}"
 	store_config ${ENV_FILE} MANPATH "${manpath}"
 	do_action env update &> /dev/null



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-03-29 19:34 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-03-29 19:34 UTC (permalink / raw
  To: gentoo-commits

commit:     be71bd07a5df16be4dba219376d4fedcda876cbe
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 29 19:34:18 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Tue Mar 29 19:34:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=be71bd07

Bit harder to trick get_slots().

---
 postgresql.eselect |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 211dbc5..7b7501b 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -81,7 +81,9 @@ unlinker() {
 ### Get Slots Function ###
 # Find all available slots in the preferred lib_dir() and return them.
 get_slots() {
-	echo $(ls -dv ${B_PATH}/$(lib_dir)/postgresql-* 2> /dev/null | sed -re 's#^.+-##')
+	echo $(find "${B_PATH}/$(lib_dir)" -maxdepth 1 -type d \
+		-regex '.*postgresql-[0-9]+\.[0-9]+' -printf '%f\n' | \
+		sed -re 's#^.+-##' | sort -n)
 }
 
 ### List Action ###



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-03-29 19:34 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-03-29 19:34 UTC (permalink / raw
  To: gentoo-commits

commit:     954bb1574c657e05084c7d3f58f6d5eae1ba2244
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 29 17:52:15 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Tue Mar 29 17:52:15 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=954bb157

Switched from 'ls' to 'find'. Addressed issues from
http://archives.gentoo.org/gentoo-dev/msg_5825580bbfa5b8b2f6dab9faa880ddd3.xml

---
 postgresql.eselect |  124 +++++++++++++++++++++++++++++++---------------------
 1 files changed, 74 insertions(+), 50 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 9a7e0c5..211dbc5 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -2,48 +2,59 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: $
 
-inherit config multilib output package-manager path-manipulation
+inherit config multilib
 
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
 SVN_DATE='$Date: $'
-VERSION="1.0.4"
+VERSION="1.0.5"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"
 E_PATH="${EROOT%/}/etc/eselect/postgresql"
 ENV_FILE="${EROOT%/}/etc/env.d/50postgresql"
-if [ -r ${E_PATH}/active -a -n ${E_PATH}/active ] ; then
-	ACTIVE_SLOT=$(<${E_PATH}/active)
-else
-	ACTIVE_SLOT="(none)"
-fi
-LIB_LIST=$(list_libdirs)
-if [[ ${LIB_LIST} =~ .*lib64.* && "$(ls -d ${B_PATH}/lib64/postgresql-*/lib)" != "" ]] ; then
-	LIBDIR="lib64"
-elif [[ ${LIB_LIST} =~ .*lib32.* && "$(ls -d ${B_PATH}/lib32/postgresql-*/lib)" != "" ]] ; then
-	LIBDIR="lib32"
-else
-	LIBDIR="lib"
-fi
+
+active_slot() {
+	if [[ -r ${E_PATH}/active && -n ${E_PATH}/active ]] ; then
+		echo $( <${E_PATH}/active )
+	else
+		echo "(none)"
+	fi
+}
+
+lib_dir() {
+	local lib_list=$(list_libdirs)
+	if [[ ${lib_list} =~ .*lib64.* && \
+		"$(ls -d ${B_PATH}/lib64/postgresql-*/lib)" != "" ]] ; then
+		echo "lib64"
+	elif [[ ${lib_list} =~ .*lib32.* && \
+		"$(ls -d ${B_PATH}/lib32/postgresql-*/lib)" != "" ]] ; then
+		echo "lib32"
+	else
+		echo "lib"
+	fi
+}
 
 ### Linker Function ###
 # Takes three arguments:
-#   - Full source path (e.g. /usr/lib/postgresql-9.0/lib/lib*.{a,so})
+#   - Full source path (e.g. /usr/lib/postgresql-9.0/lib)
+#   _ Pattern to search for
 #   - Full target directory path (e.g. /usr/bin)
 #   - Suffix (Optional) (e.g 84 to make /usr/bin/psql84)
 linker() {
 	local source_dir=$1
-	local target_dir=$2
-	local suffix=$3
+	local pattern=$2
+	local target_dir=$3
+	local suffix=$4
 	local link_source
 
-	for link_source in $(eval ls ${source_dir} 2> /dev/null) ; do
+	for link_source in $(find ${source_dir} -maxdepth 1 ${pattern}) ; do
 		local link_target="${target_dir%/}/$(basename ${link_source})${suffix}"
 
 		# For good measure, remove target before creating the symlink
-		[ -h ${link_target} ] && rm -f ${link_target}
-		[ -e ${link_target} ] && die -q "The target '${link_target}' still exists and could not be removed!"
+		[[ -h ${link_target} ]] && rm -f ${link_target}
+		[[ -e ${link_target} ]] && \
+			die -q "The target '${link_target}' still exists and could not be removed!"
 
 		ln -s ${link_source} ${link_target} || die -q "Unable to create link!"
 		echo ${link_target} >> ${E_PATH}/active.links${suffix}
@@ -59,7 +70,8 @@ unlinker() {
 		local active_links=($(<${active_link_file}))
 		for (( i=0; $i < ${#active_links[@]}; i++ )) ; do
 			[ -h ${active_links[$i]} ] && rm -f ${active_links[$i]}
-			[ -e ${active_links[$i]} ] && die -q "The target '${active_links[$i]}' still exists and could not be removed!"
+			[ -e ${active_links[$i]} ] && \
+				die -q "The target '${active_links[$i]}' still exists and could not be removed!"
 		done
 
 		rm -f ${active_link_file}
@@ -67,9 +79,9 @@ unlinker() {
 }
 
 ### Get Slots Function ###
-# Find all available slots in the preferred LIBDIR and return them.
+# Find all available slots in the preferred lib_dir() and return them.
 get_slots() {
-	echo $(ls -dv ${B_PATH}/${LIBDIR}/postgresql-* 2> /dev/null | sed -re 's#^.+-##')
+	echo $(ls -dv ${B_PATH}/$(lib_dir)/postgresql-* 2> /dev/null | sed -re 's#^.+-##')
 }
 
 ### List Action ###
@@ -92,8 +104,10 @@ do_list() {
 			done
 
 			case "${slot}" in
-				"${ACTIVE_SLOT}" ) write_kv_list_entry "$(highlight_marker ${slot})" "${postgres_ebuilds//postgresql-/}";;
-				*                ) write_kv_list_entry "${slot}" "${postgres_ebuilds//postgresql-/}";;
+				"$(active_slot)" ) write_kv_list_entry \
+					"$(highlight_marker ${slot})" "${postgres_ebuilds//postgresql-/}";;
+				*                ) write_kv_list_entry \
+					"${slot}" "${postgres_ebuilds//postgresql-/}";;
 			esac
 		done
 
@@ -107,7 +121,7 @@ describe_show() {
 }
 
 do_show() {
-	echo ${ACTIVE_SLOT}
+	echo $(active_slot)
 }
 
 ### Show Service Action ###
@@ -127,7 +141,7 @@ describe_set() {
 
 do_set() {
 	local SLOT=$1
-	if [ ! -d ${B_PATH}/${LIBDIR}/postgresql-${SLOT} ] ; then
+	if [ ! -d ${B_PATH}/$(lib_dir)/postgresql-${SLOT} ] ; then
 		die -q "Not a valid slot."
 	fi
 
@@ -161,7 +175,8 @@ do_set() {
 		rm -f ${targets[$i]}
 
 		# Check if link_target still exists
-		[ -e ${targets[$i]} ] && die -q "The target '${targets[$i]}' exists and could not be removed!"
+		[[ -e ${targets[$i]} ]] && \
+			die -q "The target '${targets[$i]}' exists and could not be removed!"
 
 		ln -s ${sources[$i]} ${targets[$i]} || die -q "Unable to create link!"
 		echo ${targets[$i]} >> ${E_PATH}/active.links
@@ -169,19 +184,21 @@ do_set() {
 
 	# Link modules to /usr/lib{,lib32,lib64}/
 	local x
-	for x in ${LIB_LIST} ; do
-		if [ -d ${B_PATH}/${x}/postgresql-${SLOT}/${x} ] ; then
+	for x in $(list_libdirs) ; do
+		if [[ -d ${B_PATH}/${x}/postgresql-${SLOT}/${x} ]] ; then
 			# 'linker' function doesn't work for linking directories.
 			# Default lib path
 			ln -s ${B_PATH}/${x}/postgresql-${SLOT}/${x} ${B_PATH}/${x}/postgresql
 			echo ${B_PATH}/${x}/postgresql >> ${E_PATH}/active.links
 			# Linker works for files
-			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}/lib*.{a,dylib,so}" "${B_PATH}/${x}"
+			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}" \
+				"-name lib*[a|dylib|so]" "${B_PATH}/${x}"
 		fi
 	done
 
 	# Link binaries to /usr/bin/
-	linker "${B_PATH}/${LIBDIR}/postgresql-${SLOT}/bin/*" "${B_PATH}/bin"
+	linker "${B_PATH}/$(lib_dir)/postgresql-${SLOT}/bin/" \
+		"-xtype f" "${B_PATH}/bin"
 
 	# Default share path
 	ln -s ${B_PATH}/share/postgresql-${SLOT} ${B_PATH}/share/postgresql
@@ -189,7 +206,7 @@ do_set() {
 
 	echo ${SLOT} > ${E_PATH}/active
 	echo "done."
-	echo -e "\033[1mSetting ${SLOT} as default was successful!\033[0m"
+	echo "Setting ${SLOT} as default was successful!"
 }
 
 ### Unset Action ###
@@ -199,7 +216,7 @@ describe_unset() {
 
 do_unset() {
 	local SLOT=$1
-	if [ "${SLOT}" = "${ACTIVE_SLOT}" ] ; then
+	if [[ "${SLOT}" = "$(active_slot)" ]] ; then
 		echo -n "Unsetting ${SLOT} as the default installation..."
 		unlinker ${E_PATH}/active.links
 		rm -f ${E_PATH}/active
@@ -215,9 +232,10 @@ describe_reset() {
 }
 
 do_reset() {
-	[ "${ACTIVE_SLOT}" = "(none)" ] && die -q "No active slot to reset."
-	do_unset ${ACTIVE_SLOT}
-	do_set ${ACTIVE_SLOT}
+	local SLOT=$(active_slot)
+	[[ "${SLOT}" = "(none)" ]] && die -q "No active slot to reset."
+	do_unset ${SLOT}
+	do_set ${SLOT}
 }
 
 ### Update Action ###
@@ -226,20 +244,23 @@ describe_update() {
 }
 
 do_update() {
+	local slot=$(active_slot)
 	# Check for files managed by postgresql.eselect before 1.0
-	[ -h /etc/eselect/postgresql/active ] && ACTIVE_SLOT="$(basename $(canonicalise /etc/eselect/postgesql/active))"
+	[[ -h /etc/eselect/postgresql/active ]] && \
+		slot="$(basename $(canonicalise /etc/eselect/postgesql/active))"
 	# Remove service file outright.
-	[ -h /etc/eselect/postgresql/service ] && rm -f /etc/eselect/postgresql/service
+	[[ -h /etc/eselect/postgresql/service ]] && \
+		rm -f /etc/eselect/postgresql/service
 
 	local slots=($(get_slots))
 	local index=${#slots[@]}
 
 	# In case all slots have been unmerged
-	if [ ${index} -eq 0 ] ; then
+	if [[ ${index} -eq 0 ]] ; then
 		write_warning_msg "No slots found!"
 		write_warning_msg "Removing files (Control-C to abort) in..."
 		local i=6
-		while [ $[i--] -gt 0 ] ; do
+		while [[ $[i--] -gt 0 ]] ; do
 			echo -n " $i"
 			sleep 1
 		done
@@ -254,7 +275,7 @@ do_update() {
 	fi
 
 	# Reset, otherwise set the highest slot available.
-	if [[ ${slots[@]} =~ ${ACTIVE_SLOT} ]] ; then
+	if [[ ${slots[@]} =~ ${slot} ]] ; then
 		do_reset
 	else
 		# best_version doesn't work here as pkg_postrm runs before the world
@@ -272,21 +293,24 @@ do_update() {
 	# Update paths to libs and docs
 	local ldpath
 	local x
-	for x in ${LIB_LIST} ; do
-		[ -h ${B_PATH}/${x}/postgresql ] && ldpath+="${B_PATH}/${x}/postgresql:"
+	for x in $(list_libdirs) ; do
+		[[ -h ${B_PATH}/${x}/postgresql ]] && \
+			ldpath+="${B_PATH}/${x}/postgresql:"
 	done
 	ldpath="${ldpath%:}"
 	local manpath="${B_PATH}/share/postgresql/"
-	while [ $[--index] -gt -1 ] ; do
+	while [[ $[--index] -gt -1 ]] ; do
 		local curslot="${slots[$index]}"
-		echo -n "Refreshing symbolic links for ${curslot} applications (like /usr/bin/psql${curslot//.})..."
+		echo -n "Refreshing symbolic links for ${curslot} applications (like "
+		echo -n "/usr/bin/psql${curslot//.})..."
 		for x in ${LIB_LIST} ; do
 			local lib_path="${B_PATH}/${x}/postgresql-${curslot}/${x}/"
-			[ -d ${lib_path} ] && ldpath+=":${lib_path}"
+			[[ -d ${lib_path} ]] && ldpath+=":${lib_path}"
 		done
 		local share_path="${B_PATH}/share/postgresql-${curslot}/"
-		[ -d ${share_path} ] && manpath+=":${share_path}"
-		linker "${B_PATH}/${LIBDIR}/postgresql-${curslot}/bin/*" "${B_PATH}/bin" "${curslot//.}"
+		[[ -d ${share_path} ]] && manpath+=":${share_path}"
+		linker "${B_PATH}/$(lib_dir)/postgresql-${curslot}/bin/" \
+			"-xtype f" "${B_PATH}/bin" "${curslot//.}"
 		echo "done."
 	done
 



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-01 11:14 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-01 11:14 UTC (permalink / raw
  To: gentoo-commits

commit:     3649a7c33c1da8e0d70a4ad436472ad502e6be5f
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 31 21:42:05 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Thu Mar 31 21:42:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=3649a7c3

Variable quoting for paths.

---
 postgresql.eselect |  102 ++++++++++++++++++++++++++--------------------------
 1 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 7b7501b..36fedb8 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -15,8 +15,8 @@ E_PATH="${EROOT%/}/etc/eselect/postgresql"
 ENV_FILE="${EROOT%/}/etc/env.d/50postgresql"
 
 active_slot() {
-	if [[ -r ${E_PATH}/active && -n ${E_PATH}/active ]] ; then
-		echo $( <${E_PATH}/active )
+	if [[ -r "${E_PATH}"/active && -n "${E_PATH}"/active ]] ; then
+		echo $( <"${E_PATH}"/active )
 	else
 		echo "(none)"
 	fi
@@ -48,16 +48,16 @@ linker() {
 	local suffix=$4
 	local link_source
 
-	for link_source in $(find ${source_dir} -maxdepth 1 ${pattern}) ; do
+	for link_source in $(find "${source_dir}" -maxdepth 1 ${pattern}) ; do
 		local link_target="${target_dir%/}/$(basename ${link_source})${suffix}"
 
 		# For good measure, remove target before creating the symlink
-		[[ -h ${link_target} ]] && rm -f ${link_target}
-		[[ -e ${link_target} ]] && \
+		[[ -h "${link_target}" ]] && rm -f "${link_target}"
+		[[ -e "${link_target}" ]] && \
 			die -q "The target '${link_target}' still exists and could not be removed!"
 
-		ln -s ${link_source} ${link_target} || die -q "Unable to create link!"
-		echo ${link_target} >> ${E_PATH}/active.links${suffix}
+		ln -s "${link_source}" "${link_target}" || die -q "Unable to create link!"
+		echo "${link_target}" >> "${E_PATH}"/active.links${suffix}
 	done
 }
 
@@ -66,15 +66,15 @@ linker() {
 #   - Full path to active links file (e.g. /etc/eselect/postgresql/active.links)
 unlinker() {
 	local active_link_file=$1
-	if [ -r ${active_link_file} ] ; then
-		local active_links=($(<${active_link_file}))
+	if [ -r "${active_link_file}" ] ; then
+		local active_links=($(<"${active_link_file}"))
 		for (( i=0; $i < ${#active_links[@]}; i++ )) ; do
-			[ -h ${active_links[$i]} ] && rm -f ${active_links[$i]}
-			[ -e ${active_links[$i]} ] && \
+			[ -h "${active_links[$i]}" ] && rm -f "${active_links[$i]}"
+			[ -e "${active_links[$i]}" ] && \
 				die -q "The target '${active_links[$i]}' still exists and could not be removed!"
 		done
 
-		rm -f ${active_link_file}
+		rm -f "${active_link_file}"
 	fi
 }
 
@@ -101,8 +101,8 @@ do_list() {
 		for slot in $(get_slots) ; do
 			local postgres_ebuilds=""
 			local src
-			for src in ${E_PATH}/slots/${slot}/{server,service,base,docs} ; do
-				[ -r ${src} ] && source ${src}
+			for src in "${E_PATH}"/slots/${slot}/{server,service,base,docs} ; do
+				[ -r "${src}" ] && source "${src}"
 			done
 
 			case "${slot}" in
@@ -143,7 +143,7 @@ describe_set() {
 
 do_set() {
 	local SLOT=$1
-	if [ ! -d ${B_PATH}/$(lib_dir)/postgresql-${SLOT} ] ; then
+	if [ ! -d "${B_PATH}"/$(lib_dir)/postgresql-${SLOT} ] ; then
 		die -q "Not a valid slot."
 	fi
 
@@ -157,41 +157,41 @@ do_set() {
 	echo -ne "\tGenerating new links..."
 	# Sources and targets for header files
 	local sources=(
-		${B_PATH}/include/postgresql-${SLOT}
-		${B_PATH}/include/postgresql-${SLOT}/libpq-fe.h
-		${B_PATH}/include/postgresql-${SLOT}/pg_config_manual.h
-		${B_PATH}/include/postgresql-${SLOT}/libpq
-		${B_PATH}/include/postgresql-${SLOT}/postgres_ext.h
+		"${B_PATH}"/include/postgresql-${SLOT}
+		"${B_PATH}"/include/postgresql-${SLOT}/libpq-fe.h
+		"${B_PATH}"/include/postgresql-${SLOT}/pg_config_manual.h
+		"${B_PATH}"/include/postgresql-${SLOT}/libpq
+		"${B_PATH}"/include/postgresql-${SLOT}/postgres_ext.h
 	)
 	local targets=(
-		${B_PATH}/include/postgresql
-		${B_PATH}/include/libpq-fe.h
-		${B_PATH}/include/pg_config_manual.h
-		${B_PATH}/include/libpq
-		${B_PATH}/include/postgres_ext.h
+		"${B_PATH}"/include/postgresql
+		"${B_PATH}"/include/libpq-fe.h
+		"${B_PATH}"/include/pg_config_manual.h
+		"${B_PATH}"/include/libpq
+		"${B_PATH}"/include/postgres_ext.h
 	)
 	# The linker function cannot accomadate this special purpose.
 	local i
 	for (( i=0; $i < ${#sources[@]}; i++ )) ; do
 		# Remove target before creating the symlink
-		rm -f ${targets[$i]}
+		[[ -h "${targets[$i]}" ]] && rm -f "${targets[$i]}"
 
 		# Check if link_target still exists
-		[[ -e ${targets[$i]} ]] && \
+		[[ -e "${targets[$i]}" ]] && \
 			die -q "The target '${targets[$i]}' exists and could not be removed!"
 
-		ln -s ${sources[$i]} ${targets[$i]} || die -q "Unable to create link!"
-		echo ${targets[$i]} >> ${E_PATH}/active.links
+		ln -s "${sources[$i]}" "${targets[$i]}" || die -q "Unable to create link!"
+		echo "${targets[$i]}" >> "${E_PATH}"/active.links
 	done
 
 	# Link modules to /usr/lib{,lib32,lib64}/
 	local x
 	for x in $(list_libdirs) ; do
-		if [[ -d ${B_PATH}/${x}/postgresql-${SLOT}/${x} ]] ; then
+		if [[ -d "${B_PATH}/${x}/postgresql-${SLOT}/${x}" ]] ; then
 			# 'linker' function doesn't work for linking directories.
 			# Default lib path
-			ln -s ${B_PATH}/${x}/postgresql-${SLOT}/${x} ${B_PATH}/${x}/postgresql
-			echo ${B_PATH}/${x}/postgresql >> ${E_PATH}/active.links
+			ln -s "${B_PATH}/${x}/postgresql-${SLOT}/${x}" "${B_PATH}/${x}/postgresql"
+			echo "${B_PATH}/${x}/postgresql" >> "${E_PATH}"/active.links
 			# Linker works for files
 			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}" \
 				"-name lib*[a|dylib|so]" "${B_PATH}/${x}"
@@ -203,10 +203,10 @@ do_set() {
 		"-xtype f" "${B_PATH}/bin"
 
 	# Default share path
-	ln -s ${B_PATH}/share/postgresql-${SLOT} ${B_PATH}/share/postgresql
-	echo ${B_PATH}/share/postgresql >> ${E_PATH}/active.links
+	ln -s "${B_PATH}/share/postgresql-${SLOT}" "${B_PATH}/share/postgresql"
+	echo "${B_PATH}/share/postgresql" >> "${E_PATH}/active.links"
 
-	echo ${SLOT} > ${E_PATH}/active
+	echo ${SLOT} > "${E_PATH}/active"
 	echo "done."
 	echo "Setting ${SLOT} as default was successful!"
 }
@@ -220,8 +220,8 @@ do_unset() {
 	local SLOT=$1
 	if [[ "${SLOT}" = "$(active_slot)" ]] ; then
 		echo -n "Unsetting ${SLOT} as the default installation..."
-		unlinker ${E_PATH}/active.links
-		rm -f ${E_PATH}/active
+		unlinker "${E_PATH}/active.links"
+		rm -f "${E_PATH}/active"
 		echo "done."
 	else
 		echo "Inactive slot selected. No work to do."
@@ -248,11 +248,10 @@ describe_update() {
 do_update() {
 	local slot=$(active_slot)
 	# Check for files managed by postgresql.eselect before 1.0
-	[[ -h /etc/eselect/postgresql/active ]] && \
-		slot="$(basename $(canonicalise /etc/eselect/postgesql/active))"
+	[[ -h "${E_PATH}active" ]] && \
+		slot="$(basename $(canonicalise ${E_PATH/active))"
 	# Remove service file outright.
-	[[ -h /etc/eselect/postgresql/service ]] && \
-		rm -f /etc/eselect/postgresql/service
+	[[ -h "${E_PATH}/service" ]] && rm -f "${E_PATH}/service"
 
 	local slots=($(get_slots))
 	local index=${#slots[@]}
@@ -266,11 +265,12 @@ do_update() {
 			echo -n " $i"
 			sleep 1
 		done
-		for sym_links in ${E_PATH}/active.links* ; do
-			unlinker ${sym_links}
+		local sym_links
+		for sym_links in "${E_PATH}"/active.links* ; do
+			unlinker "${sym_links}"
 		done
-		rm -f ${E_PATH}/active
-		rm -f ${ENV_FILE}
+		rm -f "${E_PATH}/active"
+		rm -f "${ENV_FILE}"
 		do_action env update &> /dev/null
 		echo "Done!"
 		return 0
@@ -287,8 +287,8 @@ do_update() {
 
 	echo -en "\nCleaning out old links before refreshing..."
 	local sym_links
-	for sym_links in ${E_PATH}/active.links?* ; do
-		unlinker ${sym_links}
+	for sym_links in "${E_PATH}"/active.links?* ; do
+		unlinker "${sym_links}"
 	done
 	echo "done."
 
@@ -296,7 +296,7 @@ do_update() {
 	local ldpath
 	local x
 	for x in $(list_libdirs) ; do
-		[[ -h ${B_PATH}/${x}/postgresql ]] && \
+		[[ -h "${B_PATH}"/${x}/postgresql ]] && \
 			ldpath+="${B_PATH}/${x}/postgresql:"
 	done
 	ldpath="${ldpath%:}"
@@ -317,9 +317,9 @@ do_update() {
 	done
 
 	# Remove environment files that have been generated by the ebuilds
-	rm -f ${ENV_FILE}-*
+	rm -f "${ENV_FILE}"-*
 
-	store_config ${ENV_FILE} LDPATH "${ldpath}"
-	store_config ${ENV_FILE} MANPATH "${manpath}"
+	store_config "${ENV_FILE}" LDPATH "${ldpath}"
+	store_config "${ENV_FILE}" MANPATH "${manpath}"
 	do_action env update &> /dev/null
 }



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-01 11:43 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-01 11:43 UTC (permalink / raw
  To: gentoo-commits

commit:     bf609c9da1041c05189728470477a4b602213241
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  1 11:41:36 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Fri Apr  1 11:41:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=bf609c9d

Path quoting complete, and remove the path quoting inside [[ ]].
[[ ]] used instead of [ ] everywhere.

---
 postgresql.eselect |   44 +++++++++++++++++++++++---------------------
 1 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 36fedb8..84e1167 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -15,7 +15,7 @@ E_PATH="${EROOT%/}/etc/eselect/postgresql"
 ENV_FILE="${EROOT%/}/etc/env.d/50postgresql"
 
 active_slot() {
-	if [[ -r "${E_PATH}"/active && -n "${E_PATH}"/active ]] ; then
+	if [[ -r ${E_PATH}/active && -n ${E_PATH}/active ]] ; then
 		echo $( <"${E_PATH}"/active )
 	else
 		echo "(none)"
@@ -25,10 +25,10 @@ active_slot() {
 lib_dir() {
 	local lib_list=$(list_libdirs)
 	if [[ ${lib_list} =~ .*lib64.* && \
-		"$(ls -d ${B_PATH}/lib64/postgresql-*/lib)" != "" ]] ; then
+		$(ls -d ${B_PATH}/lib64/postgresql-*/lib) != "" ]] ; then
 		echo "lib64"
 	elif [[ ${lib_list} =~ .*lib32.* && \
-		"$(ls -d ${B_PATH}/lib32/postgresql-*/lib)" != "" ]] ; then
+		$(ls -d ${B_PATH}/lib32/postgresql-*/lib) != "" ]] ; then
 		echo "lib32"
 	else
 		echo "lib"
@@ -52,8 +52,8 @@ linker() {
 		local link_target="${target_dir%/}/$(basename ${link_source})${suffix}"
 
 		# For good measure, remove target before creating the symlink
-		[[ -h "${link_target}" ]] && rm -f "${link_target}"
-		[[ -e "${link_target}" ]] && \
+		[[ -h ${link_target} ]] && rm -f "${link_target}"
+		[[ -e ${link_target} ]] && \
 			die -q "The target '${link_target}' still exists and could not be removed!"
 
 		ln -s "${link_source}" "${link_target}" || die -q "Unable to create link!"
@@ -66,11 +66,11 @@ linker() {
 #   - Full path to active links file (e.g. /etc/eselect/postgresql/active.links)
 unlinker() {
 	local active_link_file=$1
-	if [ -r "${active_link_file}" ] ; then
+	if [[ -r ${active_link_file} ]] ; then
 		local active_links=($(<"${active_link_file}"))
 		for (( i=0; $i < ${#active_links[@]}; i++ )) ; do
-			[ -h "${active_links[$i]}" ] && rm -f "${active_links[$i]}"
-			[ -e "${active_links[$i]}" ] && \
+			[[ -h ${active_links[$i]} ]] && rm -f "${active_links[$i]}"
+			[[ -e ${active_links[$i]} ]] && \
 				die -q "The target '${active_links[$i]}' still exists and could not be removed!"
 		done
 
@@ -102,7 +102,7 @@ do_list() {
 			local postgres_ebuilds=""
 			local src
 			for src in "${E_PATH}"/slots/${slot}/{server,service,base,docs} ; do
-				[ -r "${src}" ] && source "${src}"
+				[[ -r ${src} ]] && source "${src}"
 			done
 
 			case "${slot}" in
@@ -113,7 +113,7 @@ do_list() {
 			esac
 		done
 
-		[ -z "${postgres_ebuilds}" ] && write_warning_msg "No slots available."
+		[[ -z "${postgres_ebuilds}" ]] && write_warning_msg "No slots available."
 	fi
 }
 
@@ -143,7 +143,7 @@ describe_set() {
 
 do_set() {
 	local SLOT=$1
-	if [ ! -d "${B_PATH}"/$(lib_dir)/postgresql-${SLOT} ] ; then
+	if [[ ! -d ${B_PATH}/$(lib_dir)/postgresql-${SLOT} ]] ; then
 		die -q "Not a valid slot."
 	fi
 
@@ -174,10 +174,10 @@ do_set() {
 	local i
 	for (( i=0; $i < ${#sources[@]}; i++ )) ; do
 		# Remove target before creating the symlink
-		[[ -h "${targets[$i]}" ]] && rm -f "${targets[$i]}"
+		[[ -h ${targets[$i]} ]] && rm -f "${targets[$i]}"
 
 		# Check if link_target still exists
-		[[ -e "${targets[$i]}" ]] && \
+		[[ -e ${targets[$i]} ]] && \
 			die -q "The target '${targets[$i]}' exists and could not be removed!"
 
 		ln -s "${sources[$i]}" "${targets[$i]}" || die -q "Unable to create link!"
@@ -187,7 +187,7 @@ do_set() {
 	# Link modules to /usr/lib{,lib32,lib64}/
 	local x
 	for x in $(list_libdirs) ; do
-		if [[ -d "${B_PATH}/${x}/postgresql-${SLOT}/${x}" ]] ; then
+		if [[ -d ${B_PATH}/${x}/postgresql-${SLOT}/${x} ]] ; then
 			# 'linker' function doesn't work for linking directories.
 			# Default lib path
 			ln -s "${B_PATH}/${x}/postgresql-${SLOT}/${x}" "${B_PATH}/${x}/postgresql"
@@ -218,7 +218,7 @@ describe_unset() {
 
 do_unset() {
 	local SLOT=$1
-	if [[ "${SLOT}" = "$(active_slot)" ]] ; then
+	if [[ ${SLOT} = $(active_slot) ]] ; then
 		echo -n "Unsetting ${SLOT} as the default installation..."
 		unlinker "${E_PATH}/active.links"
 		rm -f "${E_PATH}/active"
@@ -235,7 +235,7 @@ describe_reset() {
 
 do_reset() {
 	local SLOT=$(active_slot)
-	[[ "${SLOT}" = "(none)" ]] && die -q "No active slot to reset."
+	[[ ${SLOT} = "(none)" ]] && die -q "No active slot to reset."
 	do_unset ${SLOT}
 	do_set ${SLOT}
 }
@@ -248,10 +248,12 @@ describe_update() {
 do_update() {
 	local slot=$(active_slot)
 	# Check for files managed by postgresql.eselect before 1.0
-	[[ -h "${E_PATH}active" ]] && \
-		slot="$(basename $(canonicalise ${E_PATH/active))"
+	if [[ -h ${E_PATH}/active ]] ; then
+		slot="$(basename $(canonicalise ${E_PATH}/active)))"
+		rm -f "${E_PATH}/active"
+	fi
 	# Remove service file outright.
-	[[ -h "${E_PATH}/service" ]] && rm -f "${E_PATH}/service"
+	[[ -h ${E_PATH}/service ]] && rm -f "${E_PATH}/service"
 
 	local slots=($(get_slots))
 	local index=${#slots[@]}
@@ -296,7 +298,7 @@ do_update() {
 	local ldpath
 	local x
 	for x in $(list_libdirs) ; do
-		[[ -h "${B_PATH}"/${x}/postgresql ]] && \
+		[[ -h ${B_PATH}/${x}/postgresql ]] && \
 			ldpath+="${B_PATH}/${x}/postgresql:"
 	done
 	ldpath="${ldpath%:}"
@@ -305,7 +307,7 @@ do_update() {
 		local curslot="${slots[$index]}"
 		echo -n "Refreshing symbolic links for ${curslot} applications (like "
 		echo -n "/usr/bin/psql${curslot//.})..."
-		for x in ${LIB_LIST} ; do
+		for x in $(list_libdirs) ; do
 			local lib_path="${B_PATH}/${x}/postgresql-${curslot}/${x}/"
 			[[ -d ${lib_path} ]] && ldpath+=":${lib_path}"
 		done



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-01 11:49 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-01 11:49 UTC (permalink / raw
  To: gentoo-commits

commit:     0bb7d06bb13db7b063004bba9bdc8cac53ebb3df
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  1 11:48:17 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Fri Apr  1 11:48:17 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=0bb7d06b

Fixed bitness test so that a false positive doesn't happen.
Remove another set of quotes within [[ ]].

---
 postgresql.eselect |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 84e1167..07b5383 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -25,10 +25,10 @@ active_slot() {
 lib_dir() {
 	local lib_list=$(list_libdirs)
 	if [[ ${lib_list} =~ .*lib64.* && \
-		$(ls -d ${B_PATH}/lib64/postgresql-*/lib) != "" ]] ; then
+		-n $(ls -d ${B_PATH}/lib64/postgresql-*/lib 2> /dev/null) ]] ; then
 		echo "lib64"
 	elif [[ ${lib_list} =~ .*lib32.* && \
-		$(ls -d ${B_PATH}/lib32/postgresql-*/lib) != "" ]] ; then
+		-n $(ls -d ${B_PATH}/lib32/postgresql-*/lib 2> /dev/null) ]] ; then
 		echo "lib32"
 	else
 		echo "lib"
@@ -113,7 +113,7 @@ do_list() {
 			esac
 		done
 
-		[[ -z "${postgres_ebuilds}" ]] && write_warning_msg "No slots available."
+		[[ -z ${postgres_ebuilds} ]] && write_warning_msg "No slots available."
 	fi
 }
 



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-01 11:51 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-01 11:51 UTC (permalink / raw
  To: gentoo-commits

commit:     bbb80be449b55d79003ab6692a6e28e579a3ecf7
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  1 11:51:10 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Fri Apr  1 11:51:10 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=bbb80be4

Fixed path so that it looks for something that'll actually exist.

---
 postgresql.eselect |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 07b5383..e4cc599 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -25,10 +25,10 @@ active_slot() {
 lib_dir() {
 	local lib_list=$(list_libdirs)
 	if [[ ${lib_list} =~ .*lib64.* && \
-		-n $(ls -d ${B_PATH}/lib64/postgresql-*/lib 2> /dev/null) ]] ; then
+		-n $(ls -d ${B_PATH}/lib64/postgresql-*/lib64 2> /dev/null) ]] ; then
 		echo "lib64"
 	elif [[ ${lib_list} =~ .*lib32.* && \
-		-n $(ls -d ${B_PATH}/lib32/postgresql-*/lib 2> /dev/null) ]] ; then
+		-n $(ls -d ${B_PATH}/lib32/postgresql-*/lib32 2> /dev/null) ]] ; then
 		echo "lib32"
 	else
 		echo "lib"



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-02 11:24 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-02 11:24 UTC (permalink / raw
  To: gentoo-commits

commit:     12c9b1948d79dac76e1f1a5148de1c2260838673
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  2 11:17:29 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sat Apr  2 11:17:29 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=12c9b194

Links all lib* files and symlinks in /usr/lib(64)?/postgresql${SLOT}/lib(64)?
Unset now calls do_update() as per bug #360467.
do_update() simply calls do_set() rather than do_reset() to avoid loops, and a
reset wasn't really necessary anyway.
Added '-mindepth 1' to 'find' in linker() so that only the contents are returned
and not the directory itself.
Fixed comments regarding linker().

---
 postgresql.eselect |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index e4cc599..21eb803 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -7,7 +7,7 @@ inherit config multilib
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
 SVN_DATE='$Date: $'
-VERSION="1.0.5"
+VERSION="1.0.6"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"
@@ -36,9 +36,9 @@ lib_dir() {
 }
 
 ### Linker Function ###
-# Takes three arguments:
+# Takes four arguments:
 #   - Full source path (e.g. /usr/lib/postgresql-9.0/lib)
-#   _ Pattern to search for
+#   - Pattern to search for
 #   - Full target directory path (e.g. /usr/bin)
 #   - Suffix (Optional) (e.g 84 to make /usr/bin/psql84)
 linker() {
@@ -48,7 +48,7 @@ linker() {
 	local suffix=$4
 	local link_source
 
-	for link_source in $(find "${source_dir}" -maxdepth 1 ${pattern}) ; do
+	for link_source in $(find "${source_dir}" -maxdepth 1 -mindepth 1 ${pattern}) ; do
 		local link_target="${target_dir%/}/$(basename ${link_source})${suffix}"
 
 		# For good measure, remove target before creating the symlink
@@ -194,12 +194,12 @@ do_set() {
 			echo "${B_PATH}/${x}/postgresql" >> "${E_PATH}"/active.links
 			# Linker works for files
 			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}" \
-				"-name lib*[a|dylib|so]" "${B_PATH}/${x}"
+				"-name lib*" "${B_PATH}/${x}"
 		fi
 	done
 
 	# Link binaries to /usr/bin/
-	linker "${B_PATH}/$(lib_dir)/postgresql-${SLOT}/bin/" \
+	linker "${B_PATH}/$(lib_dir)/postgresql-${SLOT}/bin" \
 		"-xtype f" "${B_PATH}/bin"
 
 	# Default share path
@@ -223,6 +223,8 @@ do_unset() {
 		unlinker "${E_PATH}/active.links"
 		rm -f "${E_PATH}/active"
 		echo "done."
+		echo "Setting a new slot as the default."
+		do_update
 	else
 		echo "Inactive slot selected. No work to do."
 	fi
@@ -280,7 +282,7 @@ do_update() {
 
 	# Reset, otherwise set the highest slot available.
 	if [[ ${slots[@]} =~ ${slot} ]] ; then
-		do_reset
+		do_set ${slot}
 	else
 		# best_version doesn't work here as pkg_postrm runs before the world
 		# file is updated, thereby returning a false positive.
@@ -313,7 +315,7 @@ do_update() {
 		done
 		local share_path="${B_PATH}/share/postgresql-${curslot}/"
 		[[ -d ${share_path} ]] && manpath+=":${share_path}"
-		linker "${B_PATH}/$(lib_dir)/postgresql-${curslot}/bin/" \
+		linker "${B_PATH}/$(lib_dir)/postgresql-${curslot}/bin" \
 			"-xtype f" "${B_PATH}/bin" "${curslot//.}"
 		echo "done."
 	done



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-14 11:52 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-14 11:52 UTC (permalink / raw
  To: gentoo-commits

commit:     9cd9a356832fdcb61f7ca1cedd9cedfbe9ef0911
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  3 16:08:18 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sun Apr  3 16:08:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=9cd9a356

Specific to the module.

---
 README |   28 ++++++++++++----------------
 1 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/README b/README
index 91a55f0..2966651 100644
--- a/README
+++ b/README
@@ -1,22 +1,18 @@
-This repository is split into three primary branches.
+Eselect Module
+--------------------------------------------------------------------------------
+The 'eselect' branch contains the actual script for library and binary
+management.
 
-Patches
--------------------------------------------------------------------------------
-The 'patches' branch is further split to match the major versions
-versions (a.k.a., slots). Pay attention to the tags as the signify the highest
-version they work with.
 
-Those files are then manually rolled into a tarball and hosted at
-'http://d.g.o/~titanofold/'.
+Tags are in the format: eselect-vx.x.x
 
+Version numbers are rather arbitrary, but should follow each being a single
+digit, except the major number which can stretch to infinity.
 
-Init Scripts
--------------------------------------------------------------------------------
-The 'initscripts' branch contains the initscripts. These scripts have been
-written to condense the number of files that are necessary for maintenance.
+    1.2.3 -> 1.2.4 -> ... -> 10.2.9 -> 10.3.0
 
+Releases are manually tarballed as:
 
-Eselect Module
--------------------------------------------------------------------------------
-The 'eselect' branch contains the actual script for library and binary
-management.
+    tar cjf eselect-postgresql-x.x.x.tbz2
+
+And uploaded to d.g.o:public_html. This location may change.



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-19  0:45 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-19  0:45 UTC (permalink / raw
  To: gentoo-commits

commit:     f38e2507cd15b0610fc80812ed0edbca79764654
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 00:45:11 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 00:45:11 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=f38e2507

Fixed MAN page search paths.

---
 postgresql.eselect |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 21eb803..0cc2fdf 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -304,7 +304,7 @@ do_update() {
 			ldpath+="${B_PATH}/${x}/postgresql:"
 	done
 	ldpath="${ldpath%:}"
-	local manpath="${B_PATH}/share/postgresql/"
+	local manpath="${B_PATH}/share/postgresql/man/"
 	while [[ $[--index] -gt -1 ]] ; do
 		local curslot="${slots[$index]}"
 		echo -n "Refreshing symbolic links for ${curslot} applications (like "
@@ -313,8 +313,8 @@ do_update() {
 			local lib_path="${B_PATH}/${x}/postgresql-${curslot}/${x}/"
 			[[ -d ${lib_path} ]] && ldpath+=":${lib_path}"
 		done
-		local share_path="${B_PATH}/share/postgresql-${curslot}/"
-		[[ -d ${share_path} ]] && manpath+=":${share_path}"
+		local tmp_manpath="${B_PATH}/share/postgresql-${curslot}/man/"
+		[[ -d ${tmp_manpath} ]] && manpath+=":${tmp_manpath}"
 		linker "${B_PATH}/$(lib_dir)/postgresql-${curslot}/bin" \
 			"-xtype f" "${B_PATH}/bin" "${curslot//.}"
 		echo "done."



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-21 23:27 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-21 23:27 UTC (permalink / raw
  To: gentoo-commits

commit:     fd225580a93532d8c2b6a8ed048b7624660ce4ab
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 21 10:56:06 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 10:56:06 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=fd225580

'-printf' is GNU extension of the find utility. Additionally, the regex that was
passed was an Emacs regex, which is also a GNU extension of the find utility.

---
 postgresql.eselect |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 0cc2fdf..d42fda9 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -7,7 +7,7 @@ inherit config multilib
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
 SVN_DATE='$Date: $'
-VERSION="1.0.6"
+VERSION="1.0.8"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"
@@ -82,8 +82,8 @@ unlinker() {
 # Find all available slots in the preferred lib_dir() and return them.
 get_slots() {
 	echo $(find "${B_PATH}/$(lib_dir)" -maxdepth 1 -type d \
-		-regex '.*postgresql-[0-9]+\.[0-9]+' -printf '%f\n' | \
-		sed -re 's#^.+-##' | sort -n)
+		-regex '.*postgresql-[0-9]+\.[0-9]+' | \
+		sed -re 's#.*([0-9]+\.[0-9]+)$#\1#' | sort -n)
 }
 
 ### List Action ###
@@ -184,7 +184,7 @@ do_set() {
 		echo "${targets[$i]}" >> "${E_PATH}"/active.links
 	done
 
-	# Link modules to /usr/lib{,lib32,lib64}/
+	# Link modules to /usr/lib{,32,64}/
 	local x
 	for x in $(list_libdirs) ; do
 		if [[ -d ${B_PATH}/${x}/postgresql-${SLOT}/${x} ]] ; then



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-21 23:30 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-21 23:30 UTC (permalink / raw
  To: gentoo-commits

commit:     b787eaa07f179e97f29176efcce0c601b2292c9e
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 21 23:30:36 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 23:30:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=b787eaa0

This time with the proper regex.

---
 postgresql.eselect |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index d42fda9..8dfe284 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -82,7 +82,7 @@ unlinker() {
 # Find all available slots in the preferred lib_dir() and return them.
 get_slots() {
 	echo $(find "${B_PATH}/$(lib_dir)" -maxdepth 1 -type d \
-		-regex '.*postgresql-[0-9]+\.[0-9]+' | \
+		-regex '.*postgresql-[0-9][0-9]*\.[0-9][0-9]*' | \
 		sed -re 's#.*([0-9]+\.[0-9]+)$#\1#' | sort -n)
 }
 



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-22 10:08 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-22 10:08 UTC (permalink / raw
  To: gentoo-commits

commit:     b21473d4a4983c74bee04f883f7c199cf01b3aef
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 10:06:51 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 10:06:51 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=b21473d4

Fixes bug 364257

---
 postgresql.eselect |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 8dfe284..55c970d 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -47,8 +47,13 @@ linker() {
 	local target_dir=$3
 	local suffix=$4
 	local link_source
+	local findings
+	
+	set -f
+	findings=$(find "${source_dir}" -maxdepth 1 -mindepth 1 ${pattern})
+	set +f
 
-	for link_source in $(find "${source_dir}" -maxdepth 1 -mindepth 1 ${pattern}) ; do
+	for link_source in ${findings} ; do
 		local link_target="${target_dir%/}/$(basename ${link_source})${suffix}"
 
 		# For good measure, remove target before creating the symlink
@@ -194,7 +199,7 @@ do_set() {
 			echo "${B_PATH}/${x}/postgresql" >> "${E_PATH}"/active.links
 			# Linker works for files
 			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}" \
-				"-name lib*" "${B_PATH}/${x}"
+				'-name lib*' "${B_PATH}/${x}"
 		fi
 	done
 



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-22 10:27 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-22 10:27 UTC (permalink / raw
  To: gentoo-commits

commit:     eea8cc6dd7e40a07d00f601a885c2ab726096381
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 10:27:21 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 10:27:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=eea8cc6d

Comment hint

---
 postgresql.eselect |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 55c970d..11216cd 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -48,7 +48,8 @@ linker() {
 	local suffix=$4
 	local link_source
 	local findings
-	
+
+	# Prevent passed patterns from being globbed
 	set -f
 	findings=$(find "${source_dir}" -maxdepth 1 -mindepth 1 ${pattern})
 	set +f



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-22 10:45 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-22 10:45 UTC (permalink / raw
  To: gentoo-commits

commit:     e3c49406e163d87f91676f62f68d9218e21b07df
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 10:45:10 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 10:45:10 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=e3c49406

Better comment as to why 'set -f' is there.

---
 postgresql.eselect |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 11216cd..8454284 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -50,6 +50,9 @@ linker() {
 	local findings
 
 	# Prevent passed patterns from being globbed
+	# If this module is run in /usr, '-name lib*' ends up globbing 'lib*',
+	# passing to 'find' the pattern '-name lib lib32 lib64' and find interprets
+	# those as path arguments causing failure.
 	set -f
 	findings=$(find "${source_dir}" -maxdepth 1 -mindepth 1 ${pattern})
 	set +f



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-24 13:18 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-24 13:18 UTC (permalink / raw
  To: gentoo-commits

commit:     c21d32b81fbf34d7aa47558dd24e8d04e6a72562
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 24 13:15:28 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sun Apr 24 13:15:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=c21d32b8

Replaced '-xtype' with '-type' and added '-L' to the 'find' command.

---
 postgresql.eselect |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 8454284..ecbe766 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -7,7 +7,7 @@ inherit config multilib
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
 SVN_DATE='$Date: $'
-VERSION="1.0.8"
+VERSION="1.0.9"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"
@@ -54,7 +54,7 @@ linker() {
 	# passing to 'find' the pattern '-name lib lib32 lib64' and find interprets
 	# those as path arguments causing failure.
 	set -f
-	findings=$(find "${source_dir}" -maxdepth 1 -mindepth 1 ${pattern})
+	findings=$(find -L "${source_dir}" -maxdepth 1 -mindepth 1 ${pattern})
 	set +f
 
 	for link_source in ${findings} ; do
@@ -209,7 +209,7 @@ do_set() {
 
 	# Link binaries to /usr/bin/
 	linker "${B_PATH}/$(lib_dir)/postgresql-${SLOT}/bin" \
-		"-xtype f" "${B_PATH}/bin"
+		"-type f" "${B_PATH}/bin"
 
 	# Default share path
 	ln -s "${B_PATH}/share/postgresql-${SLOT}" "${B_PATH}/share/postgresql"
@@ -325,7 +325,7 @@ do_update() {
 		local tmp_manpath="${B_PATH}/share/postgresql-${curslot}/man/"
 		[[ -d ${tmp_manpath} ]] && manpath+=":${tmp_manpath}"
 		linker "${B_PATH}/$(lib_dir)/postgresql-${curslot}/bin" \
-			"-xtype f" "${B_PATH}/bin" "${curslot//.}"
+			"-type f" "${B_PATH}/bin" "${curslot//.}"
 		echo "done."
 	done
 



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-26 21:46 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-26 21:46 UTC (permalink / raw
  To: gentoo-commits

commit:     c3f0774562030462c13873fb4a1c7ffccb2c4416
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 11:09:03 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 11:09:03 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=c3f07745

Put double quotes back around '-name' to be consistent with the rest of the
module.
Add trailing slash to source path just to be safe.

---
 postgresql.eselect |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index ecbe766..7ebbfde 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -7,7 +7,7 @@ inherit config multilib
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
 SVN_DATE='$Date: $'
-VERSION="1.0.9"
+VERSION="1.0.10"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"
@@ -202,13 +202,13 @@ do_set() {
 			ln -s "${B_PATH}/${x}/postgresql-${SLOT}/${x}" "${B_PATH}/${x}/postgresql"
 			echo "${B_PATH}/${x}/postgresql" >> "${E_PATH}"/active.links
 			# Linker works for files
-			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}" \
-				'-name lib*' "${B_PATH}/${x}"
+			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}/" \
+				"-name lib*" "${B_PATH}/${x}"
 		fi
 	done
 
 	# Link binaries to /usr/bin/
-	linker "${B_PATH}/$(lib_dir)/postgresql-${SLOT}/bin" \
+	linker "${B_PATH}/$(lib_dir)/postgresql-${SLOT}/bin/" \
 		"-type f" "${B_PATH}/bin"
 
 	# Default share path
@@ -324,7 +324,7 @@ do_update() {
 		done
 		local tmp_manpath="${B_PATH}/share/postgresql-${curslot}/man/"
 		[[ -d ${tmp_manpath} ]] && manpath+=":${tmp_manpath}"
-		linker "${B_PATH}/$(lib_dir)/postgresql-${curslot}/bin" \
+		linker "${B_PATH}/$(lib_dir)/postgresql-${curslot}/bin/" \
 			"-type f" "${B_PATH}/bin" "${curslot//.}"
 		echo "done."
 	done



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2011-04-26 21:46 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2011-04-26 21:46 UTC (permalink / raw
  To: gentoo-commits

commit:     7f5e7383defb3be8d3a0f0a4278edac585951ec5
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 11:37:42 2011 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 11:37:42 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=7f5e7383

Missed a trailing slash.

---
 postgresql.eselect |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 7ebbfde..1e2e623 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -90,7 +90,7 @@ unlinker() {
 ### Get Slots Function ###
 # Find all available slots in the preferred lib_dir() and return them.
 get_slots() {
-	echo $(find "${B_PATH}/$(lib_dir)" -maxdepth 1 -type d \
+	echo $(find "${B_PATH}/$(lib_dir)/" -maxdepth 1 -type d \
 		-regex '.*postgresql-[0-9][0-9]*\.[0-9][0-9]*' | \
 		sed -re 's#.*([0-9]+\.[0-9]+)$#\1#' | sort -n)
 }



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2012-02-22 11:43 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2012-02-22 11:43 UTC (permalink / raw
  To: gentoo-commits

commit:     6309ad6967e7127c562f293697d4649b89ac57aa
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 22 11:38:37 2012 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 11:38:37 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=6309ad69

Removed SVN_DATE.

---
 postgresql.eselect |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 1e2e623..6b1591e 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -6,8 +6,7 @@ inherit config multilib
 
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
-SVN_DATE='$Date: $'
-VERSION="1.0.10"
+VERSION="1.0.11"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"



^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2013-02-03 13:35 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2013-02-03 13:35 UTC (permalink / raw
  To: gentoo-commits

commit:     fa27c26198160cad1f0debf752ba3a6e1b003dad
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 20 23:39:42 2013 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sun Jan 20 23:39:42 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=fa27c261

Use relative paths instead of absolute paths. Fix bug 321114.

---
 postgresql.eselect |   37 +++++++++++++++++++++++++------------
 1 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 6b1591e..7e97ed8 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -47,6 +47,7 @@ linker() {
 	local suffix=$4
 	local link_source
 	local findings
+	local rel_source
 
 	# Prevent passed patterns from being globbed
 	# If this module is run in /usr, '-name lib*' ends up globbing 'lib*',
@@ -64,8 +65,11 @@ linker() {
 		[[ -e ${link_target} ]] && \
 			die -q "The target '${link_target}' still exists and could not be removed!"
 
-		ln -s "${link_source}" "${link_target}" || die -q "Unable to create link!"
-		echo "${link_target}" >> "${E_PATH}"/active.links${suffix}
+		# Create relative links so that they work both here and inside the new
+		# root if $ROOT is not "/".
+		rel_source=$(relative_name "${link_source}" "${target_dir}")
+		ln -s "${rel_source}" "${link_target}" || die -q "Unable to create link!"
+		echo "${link_target##${ROOT%/}/}" >> "${E_PATH}"/active.links${suffix}
 	done
 }
 
@@ -77,8 +81,9 @@ unlinker() {
 	if [[ -r ${active_link_file} ]] ; then
 		local active_links=($(<"${active_link_file}"))
 		for (( i=0; $i < ${#active_links[@]}; i++ )) ; do
-			[[ -h ${active_links[$i]} ]] && rm -f "${active_links[$i]}"
-			[[ -e ${active_links[$i]} ]] && \
+			[[ -h "${ROOT%/}/${active_links[$i]}" ]] && \
+				rm -f "${ROOT%/}/${active_links[$i]}"
+			[[ -e "${ROOT%/}/${active_links[$i]}" ]] && \
 				die -q "The target '${active_links[$i]}' still exists and could not be removed!"
 		done
 
@@ -178,7 +183,9 @@ do_set() {
 		"${B_PATH}"/include/libpq
 		"${B_PATH}"/include/postgres_ext.h
 	)
+
 	# The linker function cannot accomadate this special purpose.
+	local rel_source
 	local i
 	for (( i=0; $i < ${#sources[@]}; i++ )) ; do
 		# Remove target before creating the symlink
@@ -188,8 +195,12 @@ do_set() {
 		[[ -e ${targets[$i]} ]] && \
 			die -q "The target '${targets[$i]}' exists and could not be removed!"
 
-		ln -s "${sources[$i]}" "${targets[$i]}" || die -q "Unable to create link!"
-		echo "${targets[$i]}" >> "${E_PATH}"/active.links
+		# Create relative links so that they work both here and inside the new
+		# root if $ROOT is not "/"
+		rel_source=$(relative_name "${sources[$i]}" "$(dirname "${target[$i]}")")
+
+		ln -s "$rel_source" "${targets[$i]}" || die -q "Unable to create link!"
+		echo "${targets[$i]##${ROOT%/}/}" >> "${E_PATH}"/active.links
 	done
 
 	# Link modules to /usr/lib{,32,64}/
@@ -197,9 +208,10 @@ do_set() {
 	for x in $(list_libdirs) ; do
 		if [[ -d ${B_PATH}/${x}/postgresql-${SLOT}/${x} ]] ; then
 			# 'linker' function doesn't work for linking directories.
-			# Default lib path
-			ln -s "${B_PATH}/${x}/postgresql-${SLOT}/${x}" "${B_PATH}/${x}/postgresql"
-			echo "${B_PATH}/${x}/postgresql" >> "${E_PATH}"/active.links
+			# Default lib path - create a relative link
+			ln -s "postgresql-${SLOT}/${x}" "${B_PATH}/${x}/postgresql"
+			echo "${B_PATH##${ROOT%/}/}/${x}/postgresql" >> \
+				"${E_PATH}"/active.links
 			# Linker works for files
 			linker "${B_PATH}/${x}/postgresql-${SLOT}/${x}/" \
 				"-name lib*" "${B_PATH}/${x}"
@@ -210,9 +222,10 @@ do_set() {
 	linker "${B_PATH}/$(lib_dir)/postgresql-${SLOT}/bin/" \
 		"-type f" "${B_PATH}/bin"
 
-	# Default share path
-	ln -s "${B_PATH}/share/postgresql-${SLOT}" "${B_PATH}/share/postgresql"
-	echo "${B_PATH}/share/postgresql" >> "${E_PATH}/active.links"
+	# Default share path - use a relative link here by just specifying the
+	# base name
+	ln -s "postgresql-${SLOT}" "${B_PATH}/share/postgresql"
+	echo "${B_PATH##${ROOT%/}/}/share/postgresql" >> "${E_PATH}/active.links"
 
 	echo ${SLOT} > "${E_PATH}/active"
 	echo "done."


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2013-02-08 12:35 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2013-02-08 12:35 UTC (permalink / raw
  To: gentoo-commits

commit:     e460356fb1505f942dcb013349defa2259a6185d
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  8 12:35:09 2013 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Fri Feb  8 12:35:09 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=e460356f

Update copyright.

---
 postgresql.eselect |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 7e97ed8..8dd29d6 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id: $
 


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2013-06-13 10:33 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2013-06-13 10:33 UTC (permalink / raw
  To: gentoo-commits

commit:     684a5c4f7a7280308c76d84d1136ce890e6f950b
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 13 10:31:00 2013 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Thu Jun 13 10:31:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=684a5c4f

Correct variable typo

Fix bug 471866 [1]. Thank you Ben Kohler for reporting and submitting
the patch.
1.) https://bugs.gentoo.org/show_bug.cgi?id=471866

---
 postgresql.eselect | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 8dd29d6..e49361a 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -197,7 +197,7 @@ do_set() {
 
 		# Create relative links so that they work both here and inside the new
 		# root if $ROOT is not "/"
-		rel_source=$(relative_name "${sources[$i]}" "$(dirname "${target[$i]}")")
+		rel_source=$(relative_name "${sources[$i]}" "$(dirname "${targets[$i]}")")
 
 		ln -s "$rel_source" "${targets[$i]}" || die -q "Unable to create link!"
 		echo "${targets[$i]##${ROOT%/}/}" >> "${E_PATH}"/active.links


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2013-07-13 14:06 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2013-07-13 14:06 UTC (permalink / raw
  To: gentoo-commits

commit:     17ade1e1b3803299c3de9315e40a2b6518fc2642
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 13 14:03:56 2013 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sat Jul 13 14:03:56 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=17ade1e1

Refine get_slots() Logic

get_slots() shouldn't return false positives now.

---
 postgresql.eselect | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index e49361a..52aae84 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -94,9 +94,20 @@ unlinker() {
 ### Get Slots Function ###
 # Find all available slots in the preferred lib_dir() and return them.
 get_slots() {
-	echo $(find "${B_PATH}/$(lib_dir)/" -maxdepth 1 -type d \
+	local slot
+	local found_slots
+
+	for slot in $(find "${B_PATH}/$(lib_dir)/" -maxdepth 1 -type d \
 		-regex '.*postgresql-[0-9][0-9]*\.[0-9][0-9]*' | \
 		sed -re 's#.*([0-9]+\.[0-9]+)$#\1#' | sort -n)
+	do
+		# Check that pg_config exists for this slot, otherwise we have
+		# a false positive.
+		[[ -x "${B_PATH}/$(lib_dir)/postgresql-${slot}/bin/pg_config" ]] && \
+			found_slots+=( ${slot} )
+	done
+
+	echo ${found_slots[@]}
 }
 
 ### List Action ###


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2013-07-27 21:34 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2013-07-27 21:34 UTC (permalink / raw
  To: gentoo-commits

commit:     4ee9c6f854f74bacd222c256037763136963460e
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 27 21:11:42 2013 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sat Jul 27 21:11:42 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=4ee9c6f8

Add support for x32.

---
 postgresql.eselect | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/postgresql.eselect b/postgresql.eselect
index 52aae84..d8c4991 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -29,6 +29,9 @@ lib_dir() {
 	elif [[ ${lib_list} =~ .*lib32.* && \
 		-n $(ls -d ${B_PATH}/lib32/postgresql-*/lib32 2> /dev/null) ]] ; then
 		echo "lib32"
+	elif [[ ${lib_list} =~ .*libx32.* && \
+		-n $(ls -d ${B_PATH}/libx32/postgresql-*/libx32 2> /dev/null) ]] ; then
+		echo "libx32"
 	else
 		echo "lib"
 	fi


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2013-07-27 21:42 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2013-07-27 21:42 UTC (permalink / raw
  To: gentoo-commits

commit:     0d62f2dcfea3a6451fe2ab88190971c1588c0cb1
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 27 21:42:30 2013 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sat Jul 27 21:42:30 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=0d62f2dc

Bump version number.

---
 postgresql.eselect | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index d8c4991..2de4f71 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -6,7 +6,7 @@ inherit config multilib
 
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
-VERSION="1.0.11"
+VERSION="1.2.0"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2013-11-21 11:19 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2013-11-21 11:19 UTC (permalink / raw
  To: gentoo-commits

commit:     01cdebd32204cefdc98f2aeca7c66f9b4a6464bf
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 21 11:17:39 2013 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Thu Nov 21 11:17:39 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=01cdebd3

pg_config_ext.h symlink

Have a new header to create a symlink for. Fixes bug 486674.

---
 postgresql.eselect | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/postgresql.eselect b/postgresql.eselect
index 2de4f71..0631dbf 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -186,6 +186,7 @@ do_set() {
 	local sources=(
 		"${B_PATH}"/include/postgresql-${SLOT}
 		"${B_PATH}"/include/postgresql-${SLOT}/libpq-fe.h
+		"${B_PATH}"/include/postgresql-${SLOT}/pg_config_ext.h
 		"${B_PATH}"/include/postgresql-${SLOT}/pg_config_manual.h
 		"${B_PATH}"/include/postgresql-${SLOT}/libpq
 		"${B_PATH}"/include/postgresql-${SLOT}/postgres_ext.h
@@ -193,6 +194,7 @@ do_set() {
 	local targets=(
 		"${B_PATH}"/include/postgresql
 		"${B_PATH}"/include/libpq-fe.h
+		"${B_PATH}"/include/pg_config_ext.h
 		"${B_PATH}"/include/pg_config_manual.h
 		"${B_PATH}"/include/libpq
 		"${B_PATH}"/include/postgres_ext.h
@@ -209,6 +211,9 @@ do_set() {
 		[[ -e ${targets[$i]} ]] && \
 			die -q "The target '${targets[$i]}' exists and could not be removed!"
 
+		# Some headers are present only in specific versions of PostgreSQL
+		[[ -e ${sources[$i]} ]] || continue
+
 		# Create relative links so that they work both here and inside the new
 		# root if $ROOT is not "/"
 		rel_source=$(relative_name "${sources[$i]}" "$(dirname "${targets[$i]}")")


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [gentoo-commits] proj/pgsql-patches:eselect commit in: /
@ 2013-11-21 11:38 Aaron Swenson
  0 siblings, 0 replies; 30+ messages in thread
From: Aaron Swenson @ 2013-11-21 11:38 UTC (permalink / raw
  To: gentoo-commits

commit:     a4c5930d0742c4c82f9e0492b92cdc07681a4908
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 21 11:38:15 2013 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Thu Nov 21 11:38:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=a4c5930d

Bump $VERSION to 1.2.1

---
 postgresql.eselect | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/postgresql.eselect b/postgresql.eselect
index 0631dbf..58527eb 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -6,7 +6,7 @@ inherit config multilib
 
 DESCRIPTION="Manage active PostgreSQL client applications and libraries"
 MAINTAINER="pgsql-bugs@gentoo.org"
-VERSION="1.2.0"
+VERSION="1.2.1"
 
 # Global Data
 B_PATH="${EROOT%/}/usr"


^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2013-11-21 11:38 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-02 11:24 [gentoo-commits] proj/pgsql-patches:eselect commit in: / Aaron Swenson
  -- strict thread matches above, loose matches on Subject: below --
2013-11-21 11:38 Aaron Swenson
2013-11-21 11:19 Aaron Swenson
2013-07-27 21:42 Aaron Swenson
2013-07-27 21:34 Aaron Swenson
2013-07-13 14:06 Aaron Swenson
2013-06-13 10:33 Aaron Swenson
2013-02-08 12:35 Aaron Swenson
2013-02-03 13:35 Aaron Swenson
2012-02-22 11:43 Aaron Swenson
2011-04-26 21:46 Aaron Swenson
2011-04-26 21:46 Aaron Swenson
2011-04-24 13:18 Aaron Swenson
2011-04-22 10:45 Aaron Swenson
2011-04-22 10:27 Aaron Swenson
2011-04-22 10:08 Aaron Swenson
2011-04-21 23:30 Aaron Swenson
2011-04-21 23:27 Aaron Swenson
2011-04-19  0:45 Aaron Swenson
2011-04-14 11:52 Aaron Swenson
2011-04-01 11:51 Aaron Swenson
2011-04-01 11:49 Aaron Swenson
2011-04-01 11:43 Aaron Swenson
2011-04-01 11:14 Aaron Swenson
2011-03-29 19:34 Aaron Swenson
2011-03-29 19:34 Aaron Swenson
2011-03-27 13:28 Aaron Swenson
2011-03-26  2:13 Aaron Swenson
2011-03-24 22:41 Aaron Swenson
2011-03-22  3:07 Aaron Swenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox