summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-08-19 12:22:27 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-08-19 12:27:19 +0100
commita36485c82a964b71156f8e4d38f38abe6dd93868 (patch)
tree1e559d972b3fe5b06ab96bcabee2ce7607787b92 /solenv
parent9950fc4f657ebc389185006137143e9782deccfc (diff)
fix linkoo issue with preferring old libraries to new gnumake ones
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/linkoo19
1 files changed, 17 insertions, 2 deletions
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo
index ae6a7f27fee6..5e0645959483 100755
--- a/solenv/bin/linkoo
+++ b/solenv/bin/linkoo
@@ -199,9 +199,24 @@ sub do_link($$$$@)
sub scan_one_dir($$$$)
{
my ($installed_files, $build_files, $path, $solver) = @_;
+ my $dirh_module;
+
+ if (!$solver) {
+ if (opendir ($dirh_module, "$path/..")) {
+ while (my $file = readdir ($dirh_module)) {
+ if ($file =~ /Library_.*\.mk/) {
+ if (-d $path) {
+ print STDERR "gnu-makeified module contains stale output dir '$path', renaming it away\n";
+ rename ($path, "$path.obsolete"); # if it fails, nevermind ...
+ }
+ return;
+ }
+ }
+ closedir ($dirh_module);
+ }
+ }
for my $elem (@search_dirs) {
- my $dirh_module;
my $module_path = "$path/$elem";
if (opendir ($dirh_module, $module_path)) {
while (my $file = readdir ($dirh_module)) {
@@ -214,7 +229,7 @@ sub scan_one_dir($$$$)
}
}
if (!$known && !$solver) {
- print STDERR "\nlinkoo:: Unknown duplicate file '$file' in: '" .
+ print STDERR "\nlinkoo:: Unknown duplicate file '$file' in: '" .
$build_files->{$file} . "' vs '" .
$module_path . "' in module $path\n";
exit (1);