Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Paul Varner (fuzzyray)" <fuzzyray@g.o>
Subject: gentoolkit r499 - trunk/src/revdep-rebuild
Date: Mon, 21 Jul 2008 18:38:35 +0000
Author: fuzzyray
Date: 2008-07-21 18:38:34 +0000 (Mon, 21 Jul 2008)
New Revision: 499

Modified:
   trunk/src/revdep-rebuild/revdep-rebuild
Log:
Moved temporary files from /tmp to /var/tmp. Use a to avoid unprintable characters when using --library

Modified: trunk/src/revdep-rebuild/revdep-rebuild
===================================================================
--- trunk/src/revdep-rebuild/revdep-rebuild	2008-07-21 16:53:41 UTC (rev 498)
+++ trunk/src/revdep-rebuild/revdep-rebuild	2008-07-21 18:38:34 UTC (rev 499)
@@ -512,7 +512,7 @@
 	else
 		die 1 "Unable to find or create a satisfactory location for temporary files"
 	fi
-	[[ $VERBOSE ]] && einfo "Temporary files are located in $PWD"
+	[[ $VERBOSE ]] && einfo "Temporary cache files are located in $PWD"
 	setup_rm
 }
 get_search_env() {
@@ -521,7 +521,7 @@
 	local uid=$(python -c 'import os; import pwd; print pwd.getpwuid(os.getuid())[0]')
 	# Find a place to put temporary files
 	# Use "${TMPDIR}/revdep-rebuild" or /tmp/revdep-rebuild
-	local tmp_target="${TMPDIR:=/tmp}/${APP_NAME}-${uid}"
+	local tmp_target="/var/tmp/${APP_NAME}-${uid}-cache"
 
 	# From here on all work is done inside the temporary directory
 	setup_tmpdir "$tmp_target" "$uid"
@@ -542,14 +542,18 @@
 			# Set to "<tab>$SONAME<space>"
 			SONAME_SEARCH=$'\t'"$SONAME "
 		fi
-		local uuid="${SONAME##*/}"
-		uuid="${uuid//[[:space:]]}"
-		uuid="${uuid//\*}"
-		uuid="${uuid//\\}"
+		# Hash the SONAME, to avoid unprintable characters.  We are using HMAC since
+		# the interface has remained consistent since python 2.2
+		local uuid_hash=$(python -c "import hmac; print hmac.new('revdep-rebuild',\"${SONAME##*/}\").hexdigest()")
+		# Delete me - keeping for reference if needed
+		#local uuid="${SONAME##*/}"
+		#uuid="${uuid//[[:space:]]}"
+		#uuid="${uuid//\*}"
+		#uuid="${uuid//\\}"
 		HEAD_TEXT="using $SONAME"
 		OK_TEXT="There are no dynamic links to $SONAME"
 		unset WORKING_TEXT
-		setup_tmpdir $tmp_target"/"$uuid" "$uid"
+		setup_tmpdir "$tmp_target"/"$uuid_hash" "$uid"
 	fi
 
 	# If any of our temporary files are older than 1 day, remove them all



Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in app-misc/sphinx: ChangeLog sphinx-0.9.8.ebuild
Next by thread:
gentoo-x86 commit in app-crypt/ophcrack-tables: ophcrack-tables-1.0.ebuild ChangeLog metadata.xml Manifest
Previous by date:
gentoo-x86 commit in app-misc/sphinx: ChangeLog sphinx-0.9.8.ebuild
Next by date:
gentoo-x86 commit in dev-java/sun-jmx: sun-jmx-1.2.1-r3.ebuild ChangeLog


Updated Jun 10, 2010

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.