Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361830 - promote script does not fixup map file URLs
Summary: promote script does not fixup map file URLs
Status: RESOLVED FIXED
Alias: None
Product: Orbit
Classification: Tools
Component: releng (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Williams CLA
QA Contact: Project Inbox CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-24 12:36 EDT by David Williams CLA
Modified: 2011-10-24 14:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2011-10-24 12:36:34 EDT
As can be seen in the build promoted to 
http://download.eclipse.org/tools/orbit/downloads/drops/S20111018035124/

the map files do not have their URLs correctly changed to point to "downloads" and still point to "committers" (and won't work). 

I'll fix up M3 files "by hand" but the real problem and fix must be in the "promote" scripts.
Comment 1 David Williams CLA 2011-10-24 13:13:18 EDT
To document "findings" as I go, 

1. The builds on "build.eclipse.org" do not really produce valid repo locations for the maps files, while still on the build machine location ... they point to 

http://download.eclipse.org/tools/orbit/committers/drops/S20111018035124/repository
(which now is inaccurate, and points to nothing)

Would have to be 

http://build.eclipse.org/orbit/committers/orbit-I/20111018035124/S20111018035124/repository/

[I vaguely recall being aware of this when switching to "build machine only" builds, and thinking "oh well, it's just the build machine, no one would be using those as "repos" anyway ... not sure that's a valid limitation ... but, to be accurate would complicate things]



2. The one change we do (so far) during promote is for *.php files, and it does that incorrectly. It converts 

    fromString="orbit/committers"
    toString="tools/orbit/downloads"

So, now that are doing (leaving) builds on build.eclipse.org, we end up with "tools" doubled in index.php file. On build machine, the PHP code has 

index.php:$pos = strpos(getcwd(),'/tools/orbit/committers/drops/');
index.php:  $downloadUrlPrefix = 'http://www.eclipse.org/downloads/download.php?file=/tools/orbit/committers/drops/' . $buildlabel . '/';
index.php:  $downloadWithRedirectUrlPrefix = 'http://www.eclipse.org/downloads/download.php?r=1&file=/tools/orbit/committers/drops/' . $buildlabel . '/';

but we end up with 

// detect if on Eclipse download machine and use Eclipse mirror URLs
$pos = strpos(getcwd(),'/tools/tools/orbit/downloads/drops/');
if($pos === false) {
  $downloadUrlPrefix = ''; 
  $downloadWithRedirectUrlPrefix = ''; 
}
else {
  $downloadUrlPrefix = 'http://www.eclipse.org/downloads/download.php?file=/tools/tools/orbit/downloads/drops/' . $buildlabel . '/';
  $downloadWithRedirectUrlPrefix = 'http://www.eclipse.org/downloads/download.php?r=1&file=/tools/tools/orbit/downloads/drops/' . $buildlabel . '/';
}

So ... I was hoping just to add *.map to     
perl -w -pi -e ${replaceCommand} ${TODIR}${dropDirName}/*.php
But, even that would not be quite right. 

Off hand, I think 

    fromString="orbit/committers"
    toString="tools/orbit/downloads"

should be 

    fromString="tools/orbit/committers"
    toString="tools/orbit/downloads"

(for now ... will need to be more complicated if/when we make the build machine repository URLs accurate).
Comment 2 David Williams CLA 2011-10-24 14:00:26 EDT
I've fixed files on download site, and fixed "promote.sh" to fix up future promotes correctly. 

I've opened bug 361842 to cover the issue where the map files have invalid URLs while still on (only) build machine itself.