List:Internals« Previous MessageNext Message »
From:mwagner Date:March 11 2005 2:43am
Subject:bk commit into 4.1 tree (mwagner:1.2190)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of mwagner. When mwagner does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2190 05/03/10 19:42:52 mwagner@stripped +1 -0
  Do-solaris-pkg:
    Many changes to improve error handling, and fix problem of multiple packaging
processes trampling each other (32 & 64bit at the same time)

  Build-tools/Do-solaris-pkg
    1.4 05/03/10 19:40:39 mwagner@stripped +16 -16
    Many changes to improve error handling, and fix problem of multiple packaging
processes trampling each other (32 & 64bit at the same time)

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	mwagner
# Host:	here.mwagner.org
# Root:	/Users/mwagner/work/bk/mysql-4.1

--- 1.3/Build-tools/Do-solaris-pkg	Mon Feb  7 02:17:19 2005
+++ 1.4/Build-tools/Do-solaris-pkg	Thu Mar 10 19:40:39 2005
@@ -14,19 +14,17 @@
 ($gid ,$pkg ,$uid ,$userInfo ,$email ,$quota ,$group ,$passwd
 ,$category ,$userHome ,$vendor ,$loginShell ,$pstamp ,$basedir)=();
 
-$fullname = shift @ARGV;
-$fullname or die "No package name was specified";
--d $fullname or die "That directory is not present!";
-
-$fullname =~ s,/+$,,;             # Remove ending slash if any
-
-$pkgdir= `cd ../$hostname; pwd`;
-$pwd = `pwd`;
-if ($pwd =~ '\/usr\/local') {
-        $pwd = $`;
-}
-die  "Wrong location, please cd to <PKGBASE>/usr/local/ and run again.\n"
-    	if ($pwd eq "");
+$tarball= $fullname= shift @ARGV;
+$fullname=~ s/.*(mysql.*)\.tar\.gz/$1/;
+$workdir= $$; 
+chomp ($parent_workdir= `pwd`);
+
+$hostname= ($fullname=~ m/^.+-64bit$/) ? $hostname . "-64bit" : $hostname;
+$pkgdir= "$ENV{'HOME'}/$hostname";
+
+mkdir $workdir or die "Can't make workdir: $!\n";
+chdir $workdir or die "Can't change to workdir: $!\n";
+system ("tar xzvf $tarball") == 0 or die "Can't untar: $!\n";
 
 system  ("$find . -print | $pkgproto > $temp");
 open (PREPROTO,"<$temp") or die "Unable to read prototype information ($!)\n";
@@ -57,8 +55,9 @@
 # Now we can start building the package
 #
 # First get some info
+$fullname =~ s,/+$,,;             # Remove ending slash if any
 
-$fullname =~ /^((mysql)-.+)-([\d\.]+)-.+$/
+$fullname =~ /^((mysql)-\w+-?\w+?)-([\d\.]+\w?)-.+$/
   or die "This name is not what I expected - \"$fullname\"";
 
 $default{"name"}= $2;
@@ -137,10 +136,11 @@
 # Clean-up the spool area
 system ("(cd /var/spool/pkg; rm -rf $pkg)");
 # Clean-up the ~/packaging/ area
-system ("(rm -rf mysql*)");
 unlink $pkginfo;
 unlink $prototype;
-system ("mv /tmp/${packagename}.gz $pkgdir");
+chdir $parent_workdir or die "Can't change to parent workdir '$parent_workdir': $!\n";
+system ("rm -rf $workdir") == 0 or die "Can't remove the working dir: $!\n";
+system ("mv /tmp/${packagename}.gz $pkgdir") == 0 or die "Can't move the finished package
out of /tmp: $!\n";
 print "Done. (~/$hostname/$packagename.gz)\n";
 # The subroutines
 sub chkvar {
Thread
bk commit into 4.1 tree (mwagner:1.2190)mwagner11 Mar