common/tools/csvToSysDef.pl
changeset 1314 2a30d4157ddd
parent 976 50e351dfaafe
child 1315 8d797b367538
equal deleted inserted replaced
1313:116cb28ed586 1314:2a30d4157ddd
    57 	$pkgDef =~ s{/[^/]*$}{};
    57 	$pkgDef =~ s{/[^/]*$}{};
    58 	$pkgDef = "$backupBaseDir/$pkgDef/package_definition.xml";
    58 	$pkgDef = "$backupBaseDir/$pkgDef/package_definition.xml";
    59 	if (!-f $pkgDef)
    59 	if (!-f $pkgDef)
    60 	{
    60 	{
    61 		# Not there, so look for the pkg defn in the root of the package tree
    61 		# Not there, so look for the pkg defn in the root of the package tree
    62 		warn "Warning: Package $package->{dst} does not appear on the local system\n" unless -d $package->{dst};
    62 		warn "WARNING: Package $package->{dst} does not appear on the local system\n" unless -d $package->{dst};
    63 		$pkgDef = "$package->{dst}/$package->{sysdef}";
    63 		$pkgDef = "$package->{dst}/$package->{sysdef}";
    64 	}
    64 	}
    65 	die "Unable to locate any package_definition at all for $package->{dst}" unless -f $pkgDef;
    65 	warn "INFO: sources.csv lists '$package->{sysdef}', which is not supplied in $package->{dst}\n" if -d "$package->{dst}" && !-f "$package->{dst}/$package->{sysdef}";
       
    66 	die "ERROR: Unable to locate any package_definition at all for $package->{dst}" unless -f $pkgDef;
    66 
    67 
    67 	warn "Including $pkgDef for $package->{dst}\n";
    68 	warn "Including $pkgDef for $package->{dst}\n";
    68 	my $pkgTree = eval { $parser->parsefile($pkgDef) } or die "Failed to parse $pkgDef : $@";
    69 	my $pkgTree = eval { $parser->parsefile($pkgDef) } or die "Failed to parse $pkgDef : $@";
    69 	if (!$outTree)
    70 	if (!$outTree)
    70 	{
    71 	{