Revert "Remove trailing slash for proxy env."
authorAnas Nashif <anas.nashif@intel.com>
Tue, 16 Oct 2012 13:31:14 +0000 (06:31 -0700)
committerZhang Qiang <qiang.z.zhang@intel.com>
Tue, 16 Oct 2012 23:12:12 +0000 (07:12 +0800)
Sorry, but proxy settings and handling is not part of depanneur, fix it where it occurs.

This reverts commit c5c7b796ad5d67c6bf5fb0e9e7d1c7d7443ae4e7

depanneur

index 8bbf70f8c5f5ad5191f2ab2d4b9043f9dde8f7a6..c77126cdee20d85e053129acf8d96f4fdb377231 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -446,7 +446,7 @@ sub clean_cache {
 sub query_git_commit_rev {
     my ($base, $commit_id) = @_;
 
-    open(my $git, '-|', "git --git-dir $base/.git rev-parse $commit_id") ||
+    open(my $git, '-|', "git --git-dir $base/.git rev-parse $commit_id") || 
         die "query git commit reversion($commit_id) failed: $!";
     my $rev = readline($git);
     close($git);
@@ -924,20 +924,9 @@ sub build_package {
 
 }
 
-sub strip_trailing_slash_for_proxy_env {
-    for my $key ("http_proxy", "https_proxy") {
-        if (exists $ENV{$key} && $ENV{$key} =~ m#/$#) {
-            #build could fail if proxy url ends with '/'
-            #failed: 500 Can't connect to xxx:xxx
-            $ENV{$key} =~ s#/+$##;
-            debug("strip trailing slash for env $key");
-        }
-    }
-}
 
-# MAIN
-strip_trailing_slash_for_proxy_env;
 
+# MAIN
 info("start building packages from: " . $package_path . " ($style)");
 
 if ($buildall || @packs == 0 ) {