* Two bug fixes, two new features.

svn path=/trunk/kdenonbeta/kdecvs-build/; revision=322576
wilder
Michael Pyne 22 years ago
parent 692251aac5
commit be02ac4b99
  1. 4
      HISTORY
  2. 62
      doc.html.in
  3. 99
      kdecvs-build

@ -8,6 +8,10 @@ Version history: 0.74
'simple' options like --help, --version, and --author are done. So now
options which require an argument set a flag, and the processing is done
later.
* Add feature for Amilcar, failed packages will display the path to the
appropriate log file.
* Another feature, automatically refresh build system if a Makefile.am is
added.
Version history: 0.73
* Added support for timing a build to the program. Each make attempt is

@ -65,7 +65,30 @@ those who either can't or don't feel like installing it.</p>
<p id="emailaddy">It is authored by Michael Pyne (mpyne (AT) grammarian (DOT) homelinux
(DOT) net), and is one of several build scripts for this purpose.</p>
<p><b>2004-Jun-17:</b> v$VERSION<br/>
<p><b>2004-Jun-21:</b> v0.74<br/>
New features:
<ul>
<li>When a package fails to build, the script will give the file name of the
appropriate log file in the summary. Some errors don't leave a log file.
Hopefully later I'll have every error condition reported in the summary as
well.</li>
<li>Based on advice from Amilcar Lucas, the build system will automatically
refresh (without scrapping the builddir) if the CVS update for a module
detects an added Makefile.am. This is hard to test, so I'd appreciate any
reports on how well this is working.</li>
</ul>
Bugfixes:
<ul>
<li>The <a href="#cmdline-help">-h</a> option no longer prints annoying
warnings. Thanks to Kurt V. Hindenburg for the patch.</li>
<li>The <a href="#cmdline-install">--install</a> option was similarly
afflicted. It has also been fixed. As of this release, the file
successfully-build is no longer created.</li>
</ul>
</p>
<p><b>2004-Jun-17:</b> v0.73<br/>
New features:
<ul>
<li>The script now will report how long each module spent building, both in
@ -139,6 +162,7 @@ of the script.</li>
<li>The script tells you the log directory to examine after running.</li>
</ul>
</p>
<p><b>2004-Jun-13:</b> v0.72 -- <em>This Should Work Edition&trade;</em><br/>
Bugfixes:
@ -170,42 +194,8 @@ the script, and now keeps me from doing stupid stuff like forgetting to
upgrade the version number in the script, forgetting to commit my changes to
my CVS repository, and forgetting to actually install the script to test.</li>
</ul>
<p><b>2004-Jun-12:</b> v0.71<br/>
This release is dedicated to the heavy testing given the script by berkus and
mornfall. Thanks guys!
</p>
Bugfixes:
<ul>
<li>Make script header documentation better.</li>
<li>Force configure to run if qt-copy hasn't been configured. If you had
interrupted the build process for qt-copy before the configure script had run,
it wouldn't build right after that.</li>
</ul>
New features:
<ul>
<li>If the admin directory does not exist for some reason, kick CVS in the
head repeatedly until it checks it out. (I'm not responsible if CVS ends up in
a coma).</li>
<li>Accept GPL license by default for qt-copy. If you happen to have a
commerical license or some such for qt-copy, patches are accepted. :-)</li>
<li>Debug mode additions.</li>
<li>Experimental mode to simulate builddir != srcdir mode for qt-copy, as
requested by berkus. This needs more testing, but it seems to Work For
Me&trade;. The appropriate configuration file option is <a
href="#conf-use-qt-builddir-hack">use-qt-builddir-hack</a>.</li>
<li>The script now creates a symlink to the latest log directory called
<tt>latest</tt>. So you can always review the log of the last day the script
ran in by browsing $(cvs-root)/log/latest.</li>
</ul>
<p>I recommend that you set up a separate user account if you decide to run KDE
from CVS. I didn't at first, and I won't repeat that mistake for KDE 3.3 ;-).
I would also recommend that you add this script to your crontab so that you
@ -841,7 +831,7 @@ href="#options">.kdecvs-buildrc options</a>.
<div align="center" class="thankyou">
<font size="-1"><a href="http://www.cvsup.org/">CVSup</a> is a registered trademark of John D. Polstra.
<br/>
Last modified: Thu Jun 17 22:50:35 2004</font>
Last modified: Mon Jun 21 14:52:14 2004</font>
</div>
</body>
</html>

@ -70,7 +70,7 @@ my %global_opts = (
my %package_opts; # Holds module-specific options.
my @update_list; # List of modules to update/checkout.
my @build_list; # List of modules to build.
my @install_list; # List of modules to install.
my $install_flag; # True if we're in install mode.
my $BUILD_ID; # Used by logging subsystem to create a unique log dir.
my $LOG_DATE; # Used by logging subsystem to create logs in same dir.
@ -329,6 +329,10 @@ sub log_command
{
# Parent
waitpid $pid, 0;
# If the module fails building, set an internal flag in the module
# options with the name of the log file containing the error message.
$package_opts{$module}{'#error-log-file'} = "$logdir/$filename.log" if $?;
return $?;
}
else
@ -377,6 +381,7 @@ sub safe_make (@)
if (pretending)
{
return 1;
$opts = join(' ', @_);
print "\tWould have run make $opts > $logdir/build-$trynumber\n";
return 0;
@ -522,6 +527,45 @@ sub initialize_environment
$ENV{'CVS_RSH'} = 'ssh' if $cvsserver =~ /^:ext:/;
}
# Subroutine to get a list of modules to install, either from the command line
# if it's not empty, or based on the list of modules successfully built.
sub get_install_list
{
my @install_list;
if ($#ARGV > -1)
{
@install_list = @ARGV;
@ARGV = ();
}
else
{
# Get list of built items from $kdecvs/successfully-built
my $logdir = get_subdir_path('global', 'log-dir');
if (not open BUILTLIST, "<$logdir/latest/build-status")
{
print "Can't determine what modules have built. You must\n";
print "specify explicitly on the command line.\n";
exit (1); # Don't finish, not lock has been taken.
}
while (<BUILTLIST>)
{
chomp;
if (/Succeeded/)
{
s/^([^:]+):.*/$1/;
push @install_list, $_;
}
}
close BUILTLIST;
}
return @install_list;
}
# Subroutine to process the command line arguments. Any arguments so
# processed will be removed from @ARGV.
# The arguments are generally documented in doc.html now.
@ -604,28 +648,7 @@ DONE
};
/^--install$/ && do {
if ($#ARGV > -1)
{
@install_list = @ARGV;
@ARGV = ();
}
else
{
# Get list of built items from $kdecvs/successfully-built
my $kdecvs = get_kdecvs_dir();
if (not open BUILTLIST, "<$kdecvs/successfully-built")
{
print "Can't determine what modules have built. You must\n";
print "specify explicitly on the command line.\n";
exit (1);
}
@install_list = <BUILTLIST>;
chomp (@install_list);
close BUILTLIST;
}
$install_flag = 1;
last SWITCH;
};
@ -656,7 +679,6 @@ DONE
/^--no-build$/ && do {
$global_opts{'#manual-build'} = 1;
@build_list = ();
last SWITCH;
};
@ -1201,7 +1223,7 @@ sub handle_updates
{
print "Unable to make directory $kdecvs!\n$!\n";
@build_list = (); # Clear out the build list, since we can't build.
@install_list = (); # Can't install either.
$install_flag = 0; # Can't install either.
return 1;
}
}
@ -1409,6 +1431,7 @@ sub run_cvs
my $arg_ref = shift;
my %hash_count;
my $result;
my $force_refresh = 0;
my $logdir = get_log_dir($module);
# Do cvs update.
@ -1432,6 +1455,9 @@ sub run_cvs
$hash_count{'removed'}++ if /^R /;
$hash_count{'modified'}++ if /^M /;
$hash_count{'conflicted'}++ if /^C /;
# Check if we need to force a refresh.
$force_refresh = 1 if /^A / and /Makefile\.am/;
}
close CVS_LOG;
@ -1458,6 +1484,13 @@ sub run_cvs
print "\t$value $ending.\n";
}
if ($force_refresh)
{
print "A new Makefile.am was added, the build system will be recreated.\n";
%package_opts{$module}{'refresh-build'} = 1;
%package_opts{$module}{'#cancel-clean'} = 1;
}
return $result;
}
@ -1923,8 +1956,18 @@ sub handle_build
if (scalar @fail_list > 0)
{
my $homedir = $ENV{'HOME'};
my $logfile;
print "\n<<< PACKAGES FAILED BUILDING >>>\n";
print join ("\n", @fail_list), "\n";
for (@fail_list)
{
$logfile = $package_opts{$_}{'#error-log-file'};
$logfile = "No log file" unless $logfile;
$logfile =~ s|$homedir|~|;
print "$_ - $logfile\n";
}
}
return ((scalar @fail_list) > 0) ? 1 : 0;
@ -2054,7 +2097,7 @@ eval
# Make sure unsermake is checked out automatically if needed
adjust_update_list(\@update_list, \@build_list);
if ($#install_list == -1)
if (not $install_flag)
{
# No packages to install, we're in build mode
$result = handle_updates (\@update_list);
@ -2071,7 +2114,7 @@ eval
join (', ', @ARGV), "\n";
}
$result = handle_install (@install_list);
$result = handle_install (get_install_list());
}
$time = localtime;

Loading…
Cancel
Save