/[secure-testing]/bin/dtsasync
ViewVC logotype

Diff of /bin/dtsasync

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1677 by joeyh, Sat Aug 27 19:05:18 2005 UTC revision 1678 by joeyh, Sat Aug 27 19:11:31 2005 UTC
# Line 22  foreach my $hint (glob "$dir/*") { Line 22  foreach my $hint (glob "$dir/*") {
22          }          }
23          print "Processing $hint\n";          print "Processing $hint\n";
24          while (<IN>) {          while (<IN>) {
                 s/#*//;  
25                  chomp;                  chomp;
26                    s/#.*//;
27                  s/^\s+//;                  s/^\s+//;
28                  s/\s+$//;                  s/\s+$//;
29                  next unless length;                  next unless length;
# Line 35  foreach my $hint (glob "$dir/*") { Line 35  foreach my $hint (glob "$dir/*") {
35                          print "Syncing $sync_package/$sync_version";                          print "Syncing $sync_package/$sync_version";
36                          print "Current status:\n";                          print "Current status:\n";
37                          system("madison", "-S", $sync_package);                          system("madison", "-S", $sync_package);
38    
39                          my @toheidi;                          my @toheidi;
40                          foreach my $line (system("madison", "-s", $fromsuite, "-f", "heidi", "-S", $sync_package)) {                          my $pid;
41                                  my ($pkg, $version, $arch)=split(' ', 3);                          die "Can’t fork: $!" unless defined($pid = open(KID, "-│"));
42                                  next unless $version eq $sync_version;                          if ($pid) {
43                                  push @toheidi, $line;                                  while (<KID>) {
44                                            chomp;
45                                            my ($pkg, $version, $arch)=split(' ', 3);
46                                            next unless $version eq $sync_version;
47                                            push @toheidi, $_;
48                                    }
49                                    close KID || print "madison edited nonzero\n";
50                          }                          }
51                            else {
52                                    exec "madison", "-s", $fromsuite,
53                                            "-f", "heidi", "-S", $sync_package
54                                    or die "can't exec madison: $!";
55                            }
56    
57                          if (! @toheidi) {                          if (! @toheidi) {
58                                  print "Already in sync, doing nothing.\n";                                  print "Already in sync, doing nothing.\n";
59                                  next;                                  next;
60                          }                          }
61    
62                          open(HEIDI, "| $heidicmd") || print "$heidicmd failed!\n";                          open(HEIDI, "| $heidicmd") || print "$heidicmd failed!\n";
63                          foreach (@toheidi) {                          foreach (@toheidi) {
64                                  print HEIDI "$_\n";                                  print HEIDI "$_\n";

Legend:
Removed from v.1677  
changed lines
  Added in v.1678

  ViewVC Help
Powered by ViewVC 1.1.5