1 |
fuzzyray 12/06/20 20:09:15 |
2 |
|
3 |
Added: 0.3.0.6-euse-422675.patch |
4 |
Log: |
5 |
Revision bump to add patch for euse to support the md5-dict metadata cache |
6 |
format. |
7 |
|
8 |
(Portage version: 2.1.10.65/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 app-portage/gentoolkit/files/0.3.0.6-euse-422675.patch |
12 |
|
13 |
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 |
14 |
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 |
15 |
|
16 |
Index: 0.3.0.6-euse-422675.patch |
17 |
=================================================================== |
18 |
From 6b94fbd3b74471cf9740a35d669963e0b6c84eac Mon Sep 17 00:00:00 2001 |
19 |
From: Paul Varner <fuzzyray@g.o> |
20 |
Date: Wed, 20 Jun 2012 12:11:44 -0500 |
21 |
Subject: [PATCH] Add support for the md5-cache metadata format. (Bug 422675) |
22 |
|
23 |
The gentoo tree is moving to the md5-cache format instead of pms. This |
24 |
add support for reading the md5-cache metadata format. |
25 |
--- |
26 |
bin/euse | 24 ++++++++++++++++++------ |
27 |
1 files changed, 18 insertions(+), 6 deletions(-) |
28 |
|
29 |
diff --git a/bin/euse b/bin/euse |
30 |
index 85ff924..3b7556f 100755 |
31 |
--- a/bin/euse |
32 |
+++ b/bin/euse |
33 |
@@ -385,6 +385,7 @@ get_useflaglist() { |
34 |
# |
35 |
get_useflaglist_ebuild() { |
36 |
local known=$(echo "${ACTIVE_FLAGS[5]}" | egrep "^${1}") |
37 |
+ local cacheformat |
38 |
if [[ -n $known ]]; then |
39 |
# No need to recache |
40 |
return |
41 |
@@ -400,23 +401,34 @@ get_useflaglist_ebuild() { |
42 |
fi |
43 |
# Open the ebuild file and retrieve defined USE flags |
44 |
[[ ! -d "$portdir/${1}" ]] && continue |
45 |
- if [[ ! -d "$portdir/metadata/cache" ]]; then |
46 |
+ cacheformat="unknown" |
47 |
+ [[ -d "$portdir/metadata/cache" ]] && cacheformat="cache" # format is pms |
48 |
+ [[ -d "$portdir/metadata/md5-cache" ]] && cacheformat="md5-cache" # format is md5-cache |
49 |
+ if [[ "$cacheformat" == "unknown" ]]; then |
50 |
echo "!!! Metadata cache not found. You need to run " >&2 |
51 |
echo "!!! 'egencache --repo=$overlay --update'" >&2 |
52 |
echo "!!! to generate metadata for your overlays" >&2 |
53 |
return 1 |
54 |
fi |
55 |
- append=$(set +f; ls $portdir/metadata/cache/${1}-* \ |
56 |
+ append=$(set +f; ls ${portdir}/metadata/${cacheformat}/${1}-* \ |
57 |
| egrep "${1}-[0-9.]+" \ |
58 |
- | sed -e "s:$portdir/metadata/cache/${1}-::g" \ |
59 |
+ | sed -e "s:${portdir}/metadata/${cacheformat}/${1}-::g" \ |
60 |
| while read -d $'\n' version; do |
61 |
IFS=$'\n' |
62 |
- if [[ ! -e "$portdir/metadata/cache/${1}-$version" ]]; then |
63 |
+ if [[ ! -e "${portdir}/metadata/${cacheformat}/${1}-$version" ]]; then |
64 |
# Repo does not have this particular package |
65 |
continue |
66 |
fi |
67 |
- iuse=$(head -11 "$portdir/metadata/cache/${1}-$version"|tail -1) |
68 |
- slot=$(head -3 "$portdir/metadata/cache/${1}-$version"|tail -1) |
69 |
+ if [[ "${cacheformat}" == "cache" ]]; then |
70 |
+ iuse=$(head -n 11 "${portdir}/metadata/${cacheformat}/${1}-$version"|tail -n 1) |
71 |
+ slot=$(head -n 3 "${portdir}/metadata/${cacheformat}/${1}-$version"|tail -n 1) |
72 |
+ elif [[ "${cacheformat}" == "md5-cache" ]]; then |
73 |
+ iuse=$(grep "^IUSE=" "${portdir}/metadata/${cacheformat}/${1}-$version" | sed 's/^IUSE=//') |
74 |
+ slot=$(grep "^SLOT=" "${portdir}/metadata/${cacheformat}/${1}-$version" | sed 's/^SLOT=//') |
75 |
+ else |
76 |
+ # This is a bug, we should have already returned |
77 |
+ return 1 |
78 |
+ fi |
79 |
echo "${1};${version};${slot};${iuse};${overlay}" |
80 |
done |
81 |
) |
82 |
-- |
83 |
1.7.8.6 |