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: gentoo-x86 commit in app-portage/gentoolkit/files: 0.3.0.6-euse-422675.patch
Date: Wed, 20 Jun 2012 20:09:15 +0000 (UTC)
fuzzyray    12/06/20 20:09:15

  Added:                0.3.0.6-euse-422675.patch
  Log:
  Revision bump to add patch for euse to support the md5-dict metadata cache
  format.
  
  (Portage version: 2.1.10.65/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  app-portage/gentoolkit/files/0.3.0.6-euse-422675.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/gentoolkit/files/0.3.0.6-euse-422675.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/gentoolkit/files/0.3.0.6-euse-422675.patch?rev=1.1&content-type=text/plain

Index: 0.3.0.6-euse-422675.patch
===================================================================
From 6b94fbd3b74471cf9740a35d669963e0b6c84eac Mon Sep 17 00:00:00 2001
From: Paul Varner <fuzzyray@g.o>
Date: Wed, 20 Jun 2012 12:11:44 -0500
Subject: [PATCH] Add support for the md5-cache metadata format. (Bug 422675)

The gentoo tree is moving to the md5-cache format instead of pms. This
add support for reading the md5-cache metadata format.
---
 bin/euse |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/bin/euse b/bin/euse
index 85ff924..3b7556f 100755
--- a/bin/euse
+++ b/bin/euse
@@ -385,6 +385,7 @@ get_useflaglist() {
 #
 get_useflaglist_ebuild() {
 	local known=$(echo "${ACTIVE_FLAGS[5]}" | egrep "^${1}")
+	local cacheformat
 	if [[ -n $known ]]; then
 		# No need to recache
 		return
@@ -400,23 +401,34 @@ get_useflaglist_ebuild() {
 		fi
 		# Open the ebuild file and retrieve defined USE flags
 		[[ ! -d "$portdir/${1}" ]] && continue
-		if [[ ! -d "$portdir/metadata/cache" ]]; then
+		cacheformat="unknown"
+		[[ -d "$portdir/metadata/cache" ]] && cacheformat="cache" # format is pms
+		[[ -d "$portdir/metadata/md5-cache" ]] && cacheformat="md5-cache" # format is md5-cache
+		if [[ "$cacheformat" == "unknown" ]]; then
 			echo "!!! Metadata cache not found. You need to run " >&2
 			echo "!!! 'egencache --repo=$overlay --update'" >&2
 			echo "!!! to generate metadata for your overlays" >&2
 			return 1
 		fi
-		append=$(set +f; ls $portdir/metadata/cache/${1}-* \
+		append=$(set +f; ls ${portdir}/metadata/${cacheformat}/${1}-* \
 			| egrep "${1}-[0-9.]+" \
-			| sed -e "s:$portdir/metadata/cache/${1}-::g" \
+			| sed -e "s:${portdir}/metadata/${cacheformat}/${1}-::g" \
 			| while read -d $'\n' version; do
 				IFS=$'\n'
-				if [[ ! -e "$portdir/metadata/cache/${1}-$version" ]]; then
+				if [[ ! -e "${portdir}/metadata/${cacheformat}/${1}-$version" ]]; then
 					# Repo does not have this particular package
 					continue
 				fi
-				iuse=$(head -11 "$portdir/metadata/cache/${1}-$version"|tail -1)
-				slot=$(head -3 "$portdir/metadata/cache/${1}-$version"|tail -1)
+				if [[ "${cacheformat}" == "cache" ]]; then
+					iuse=$(head -n 11 "${portdir}/metadata/${cacheformat}/${1}-$version"|tail -n 1)
+					slot=$(head -n 3 "${portdir}/metadata/${cacheformat}/${1}-$version"|tail -n 1)
+				elif [[ "${cacheformat}" == "md5-cache" ]]; then
+					iuse=$(grep "^IUSE=" "${portdir}/metadata/${cacheformat}/${1}-$version" | sed 's/^IUSE=//')
+					slot=$(grep "^SLOT=" "${portdir}/metadata/${cacheformat}/${1}-$version" | sed 's/^SLOT=//')
+				else
+					# This is a bug, we should have already returned
+					return 1
+				fi
 				echo "${1};${version};${slot};${iuse};${overlay}"
 			done
 		)
-- 
1.7.8.6






Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in dev-util/kbuild: metadata.xml ChangeLog kbuild-0.1.9998_pre20110817-r1.ebuild
Next by thread:
gentoo-x86 commit in app-portage/gentoolkit: ChangeLog gentoolkit-0.3.0.6-r3.ebuild
Previous by date:
gentoo-x86 commit in app-text/opensp: ChangeLog opensp-1.5.2-r3.ebuild
Next by date:
gentoo-x86 commit in app-portage/gentoolkit: ChangeLog gentoolkit-0.3.0.6-r3.ebuild


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

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