Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 324410 Details for
Bug 434672
app-portage/ufed should look for make.* in new location: /etc/portage
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add a check for both paths (unless symlinking each other) to Portage.pm
ufed-0.40.1-add_new_path_to_pm.patch (text/plain), 2.25 KB, created by
Sven Eden
on 2012-09-20 17:39:38 UTC
(
hide
)
Description:
Add a check for both paths (unless symlinking each other) to Portage.pm
Filename:
MIME Type:
Creator:
Sven Eden
Created:
2012-09-20 17:39:38 UTC
Size:
2.25 KB
patch
obsolete
>--- ufed-0.40.1/Portage.pm 2009-10-26 20:56:53.000000000 +0100 >+++ src/Portage.pm 2012-09-20 19:15:15.292794714 +0200 >@@ -4,10 +4,15 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-src/ufed/Portage.pm,v 1.3 2005/11/13 00:28:17 truedfx Exp $ > >+use strict; >+use warnings; >+use File::Spec; ## provided by virtual/perl-File-Spec >+ > my %environment; > $environment{$_}={} for qw(USE); # INCREMENTALS, except we only need USE > > our %packages; >+our @portagedirs; > our @profiles; > our %use_masked_flags; > our %use_defaults_flags; >@@ -16,6 +21,7 @@ > our %make_conf_flags; > our %archs; > our %all_flags; >+our $make_conf_path; > > sub have_package($); > sub merge(\%%); >@@ -42,6 +48,7 @@ > read_archs; > > my $lastorder; >+ > for(reverse split /:/, $environment{USE_ORDER} || "env:pkg:conf:auto:defaults") { > if($_ eq 'defaults') { > merge %default_flags, %make_defaults_flags; >@@ -136,9 +143,34 @@ > } > > sub read_make_conf() { >- my %env = read_sh "/etc/make.conf"; >- merge %make_conf_flags, %{$env{USE}} if exists $env{USE}; >- @portagedirs = $environment{PORTDIR}; >+ my $mcFile = "/etc/make.conf"; >+ my $mcPath = ( -l $mcFile ) ? File::Spec->rel2abs( readlink($mcFile) ) : $mcFile; >+ my %env = (); >+ >+ # 1. There is no known valid path, yet >+ $make_conf_path = ""; >+ >+ # 2. Read the old path if it is not a symlink to the new path >+ if ( ( -e $mcPath ) && ("/etc/portage/make.conf" ne $mcPath) ) { >+ %env = read_sh $mcPath; >+ merge %make_conf_flags, %{$env{USE}} if exists $env{USE}; >+ %env = (); >+ ## Store this path as being valid for now >+ $make_conf_path = $mcPath; >+ } >+ >+ # 3. Now switch to the new location - it must not be a symlink to the old either >+ $mcFile = "/etc/portage/make.conf"; >+ $mcPath = ( -l $mcFile ) ? File::Spec->rel2abs( readlink($mcFile) ) : $mcFile; >+ if ( (-e $mcPath ) && ("/etc/make.conf" ne $mcPath) ) { >+ %env = read_sh $mcPath; >+ merge %make_conf_flags, %{$env{USE}} if exists $env{USE}; >+ >+ # Overwrite the old path, as the new location is the overriding one. >+ $make_conf_path = $mcPath; >+ } >+ >+ @portagedirs = $environment{PORTDIR} || ( "/usr/portage" ); ## PORTDIR is not necassarily set by make.conf > push @portagedirs, split ' ', $environment{PORTDIR_OVERLAY} if defined $environment{PORTDIR_OVERLAY}; > } >
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 434672
:
324238
|
324240
|
324410
|
324412
|
324422
|
324424
|
324748
|
325674
|
326628
|
326630
|
326632