--- a/downloadkit/downloadkit.py Tue Aug 31 16:14:25 2010 +0100
+++ b/downloadkit/downloadkit.py Tue Aug 31 16:17:03 2010 +0100
@@ -26,10 +26,10 @@
import hashlib
import xml.etree.ElementTree as ET
-version = '0.19'
+version = '0.20'
user_agent = 'downloadkit.py script v' + version
headers = { 'User-Agent' : user_agent }
-top_level_url = "https://developer.symbian.org"
+top_level_url = "https://developer-secure.symbian.org"
passman = urllib2.HTTPPasswordMgrWithDefaultRealm() # not relevant for live Symbian website
download_list = []
failure_list = []
@@ -434,7 +434,7 @@
global options
if not options.publicity:
return
- reporting_url = "http://developer.symbian.org/downloadkit_report/%s/%s/args=" % (version, what)
+ reporting_url = "http://developer-secure.symbian.org/downloadkit_report/%s/%s/args=" % (version, what)
if options.dryrun:
reporting_url += "+dryrun"
if options.nosrc:
@@ -482,6 +482,11 @@
response = urllib2.urlopen(req)
doc=response.read()
+ if options.debug:
+ f = open("downloadpage.html","w")
+ print >>f, doc
+ f.close()
+
# BeatifulSoup chokes on some javascript, so we cut away everything before the <body>
try:
bodystart=doc.find('<body>')
@@ -489,11 +494,6 @@
except:
pass
- if options.debug:
- f = open("downloadpage.html","w")
- print >>f, doc
- f.close()
-
soup=BeautifulSoup(doc)
# check that this is the right version
@@ -595,7 +595,7 @@
progress=False,
username='',
password='',
- webhost = 'developer.symbian.org',
+ webhost = 'developer-secure.symbian.org',
resume=True,
publicity=True,
debug=False
--- a/envinfo/envinfo.pl Tue Aug 31 16:14:25 2010 +0100
+++ b/envinfo/envinfo.pl Tue Aug 31 16:17:03 2010 +0100
@@ -144,7 +144,20 @@
# Perl
my $perl_ver = 'N.A.';
my $perl_out = `perl -v`;
-$perl_ver = $1 if ($perl_out =~ /This is perl, v(\S+)/m);
+
+# match:
+#match This is perl, v5.10.0 built for darwin-thread-multi-2level
+if($perl_out =~ /This is perl, v(\S+)/m)
+{
+ $perl_ver = $1;
+}
+# match:
+# This is perl 5, version 12, subversion 1 (v5.12.1) built for MSWin32-x64-multi-thread
+elsif($perl_out =~ /This is perl.*? \(v(\S+)\)/m)
+{
+ $perl_ver = $1;
+}
+
push @environment_info, {name=>'Perl', version=>$perl_ver};
# Python
@@ -338,4 +351,4 @@
{
warn "WARNING: Could not write to file: $output\n";
}
-}
\ No newline at end of file
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/williamr/delete_builds.pl Tue Aug 31 16:17:03 2010 +0100
@@ -0,0 +1,98 @@
+#! perl
+
+# Copyright (c) 2010 Symbian Foundation Ltd
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Symbian Foundation Ltd - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Delete a directory full of builds, making space as quickly as possible by
+# deleting known regions of massive files first
+
+use strict;
+
+# List directory subtrees containing mostly big files, biggest first
+my @rich_pickings = (
+ 'output/zips',
+ 'output/logs',
+ 'epoc32/release/winscw/udeb'
+ );
+
+if (scalar @ARGV == 0)
+ {
+ print <<'EOF';
+Usage: perl delete_builds.pl dir1 [dir2 ...]
+
+Delete one or more builds, making free space as quickly as possible
+by deleting a few selected directories first
+
+You can use wildcards in the directory names, and they can be either
+individual builds or directories of builds. A build is identified by
+the present of an "output" subdirectory.
+EOF
+ exit(1);
+ }
+
+my @builds = ();
+
+@ARGV = map {glob} @ARGV;
+foreach my $dir (@ARGV)
+ {
+ $dir =~ s/\\/\//g; # unix separators
+ $dir =~ s/\/+$//; # remove trailing /
+ if (!-d $dir)
+ {
+ print "Ignoring $dir - not a directory\n";
+ next;
+ }
+ if (!-d "$dir/output")
+ {
+ # not a build - perhaps a directory of builds?
+ opendir DIR, $dir;
+ my @files = grep !/^\.\.?$/, readdir DIR;
+ closedir DIR;
+
+ my @subbuilds = ();
+ foreach my $file (@files)
+ {
+ next if (!-d "$dir/$file");
+ next if (!-d "$dir/$file/output");
+ push @subbuilds, "$dir/$file";
+ }
+ if (scalar @subbuilds == 0)
+ {
+ print "Ignoring $dir - not a build and contains no builds\n";
+ next;
+ }
+ push @builds, @subbuilds;
+ }
+ else
+ {
+ push @builds, $dir;
+ }
+ }
+
+foreach my $subdir (@rich_pickings)
+ {
+ foreach my $build (@builds)
+ {
+ my $victim = "$build/$subdir";
+ next if (!-d $victim); # nothing to delete
+ $victim =~ s/\//\\/g; # windows separators again (sigh!)
+ print "* rmdir /s/q $victim\n";
+ system("rmdir","/s/q",$victim);
+ }
+ }
+
+foreach my $build (@builds)
+ {
+ $build =~ s/\//\\/g;
+ print "* rmdir /s/q $build\n";
+ system("rmdir","/s/q",$build);
+ }