1 |
ottxor 12/12/27 19:22:18 |
2 |
|
3 |
Added: epm-1.33-prefix.patch |
4 |
Log: |
5 |
added prefix support |
6 |
|
7 |
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key C2000586) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-portage/epm/files/epm-1.33-prefix.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/epm/files/epm-1.33-prefix.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/epm/files/epm-1.33-prefix.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: epm-1.33-prefix.patch |
16 |
=================================================================== |
17 |
--- epm |
18 |
+++ epm |
19 |
@@ -1,4 +1,4 @@ |
20 |
-#!/usr/bin/perl -wI. |
21 |
+#!@GENTOO_PORTAGE_EPREFIX@/usr/bin/perl -wI. |
22 |
# $Id: epm-1.33-prefix.patch,v 1.1 2012/12/27 19:22:18 ottxor Exp $ |
23 |
|
24 |
use Getopt::Long; |
25 |
@@ -7,13 +7,13 @@ |
26 |
# Global vars |
27 |
(my $version = '$Revision: 1.1 $') =~ s/.*?(\d.*\d).*/EPM version $1/; |
28 |
my $verbose = 0; |
29 |
-my $dbpath = '/var/db/pkg'; |
30 |
+my $dbpath = '@GENTOO_PORTAGE_EPREFIX@/var/db/pkg'; |
31 |
my $pkgregex = |
32 |
'^.+?\/'. # group (ignored) |
33 |
'(.+?)'. # name |
34 |
'-(\d+(?:\.\d+)*\w*)'. # version, eg 1.23.4a |
35 |
'((?:(?:_alpha|_beta|_pre|_rc)\d*)?)'. # special suffix |
36 |
- '((?:-r\d+)?)$'; # revision, eg r12 |
37 |
+ '((?:-r\d+)?(?:\.\d+)?)$'; # revision, eg r12 or r01.1 |
38 |
my $root = '/'; |
39 |
my %opt = ( |
40 |
'dbpath' => \$dbpath, |
41 |
@@ -266,11 +266,11 @@ |
42 |
if ($opt{'c'}) { |
43 |
# Read in CONFIG_PROTECT from /etc/make.{global,conf} |
44 |
my (@CONFIG_PROTECT) = split ' ', |
45 |
- `. /etc/make.globals; . /etc/make.conf; echo \$CONFIG_PROTECT`; |
46 |
+ `. @GENTOO_PORTAGE_EPREFIX@/etc/make.globals; . @GENTOO_PORTAGE_EPREFIX@/etc/make.conf; echo \$CONFIG_PROTECT`; |
47 |
die "CONFIG_PROTECT is empty" unless @CONFIG_PROTECT; |
48 |
my ($confprotre) = join '|', @CONFIG_PROTECT; |
49 |
@files = grep { |
50 |
- (split ' ', $_, 2)[1] =~ /^($confprotre)/o } @files; |
51 |
+ (split ' ', $_, 2)[1] =~ m!^@GENTOO_PORTAGE_EPREFIX@($confprotre)!o } @files; |
52 |
} |
53 |
|
54 |
# Trim @files if doc files requested |