Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 225777 Details for
Bug 310475
Introduction of app-portage/epm-1.33 'declare ...' prefaced assignments in environment.bz2 prevents epm from identifying (key,value) pairs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
epm patches for newer portage system
epm-1.33.patch (text/plain), 1.78 KB, created by
Terra
on 2010-03-30 02:32:05 UTC
(
hide
)
Description:
epm patches for newer portage system
Filename:
MIME Type:
Creator:
Terra
Created:
2010-03-30 02:32:05 UTC
Size:
1.78 KB
patch
obsolete
>>From 4980fb45b103f2c9e36504b0685ca842c8d6474a Mon Sep 17 00:00:00 2001 >Date: Sun, 21 Mar 2010 15:12:59 -0400 >Subject: [PATCH 1/1] Rework so epm doesn't fail on envariables declared with '(declare( -x)? )?' which balks with 'unintialized value' > >--- > epm | 14 +++++++++++--- > 1 files changed, 11 insertions(+), 3 deletions(-) > >diff --git a/epm b/epm >index 5ef9b3b..f4d97ac 100755 >--- a/epm >+++ b/epm >@@ -189,7 +189,11 @@ sub query_info($) > my ($p) = @_; > my ($group, $ename) = $p =~ /^(.+?)\/(.+)$/; > my ($key, $value); >- my %vals; >+ my @search_base = qw/CATEGORY HOSTNAME DESCRIPTION LICENSE SLOT/; >+ my @search_base_switched = qw/PN PR PV HOMEPAGE/; >+ my @search_keys = qw/NAME RELEASE VERSION URL PACKAGER/; >+ my $search = join('|', (@search_base, @search_base_switched)); >+ my %vals = map { $_,'' } (@search_base, @search_keys); > my $ldbpath = "$dbpath/$p"; > my $fmt = <<EOT; > Name : \%s >@@ -206,8 +210,11 @@ EOT > open(F, "bzcat $ldbpath/environment.bz2|") > or die "epm: Can't open $ldbpath/environment.bz2: $!\n"; > while (<F>) { >- next unless (/^(CATEGORY|HOSTNAME|DESCRIPTION|HOMEPAGE|LICENSE|PN|PR|PV|SLOT)=(.*)/); >+ next unless (/^(?:declare(?: -x)? )?($search)=(.*)/o); > ($key, $value) = ($1, $2); >+ # if pulled from a declare -x line, then we need to delete the quotes >+ # should be no harm in cleansing all $value >+ $value =~ tr/"//d; #"avoid confusing syntax highlighting > if ($key eq 'PN') { > $key = 'NAME'; > } elsif ($key eq 'PR') { >@@ -219,10 +226,11 @@ EOT > $key = 'URL'; > $value = '(none)' unless $value; > } >+ > # Clean up the double and single quotes > $value =~ s/^'(.*)'$/$1/o; > $value =~ s/'\\''/'/go; >- $value =~ s/\\"/"/go; >+ $value =~ s/\\"/"/go; #"avoid confusing syntax highlighting > > $vals{$key} = $value; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 310475
: 225777 |
226685
|
226687