Tricks with file descriptors, so that I can receive by email (sended by
crond) the warnings about conflicting files.
This commit is contained in:
@@ -111,6 +111,11 @@ sub install_packages() {
|
||||
}
|
||||
close PACKAGES_TO_INCLUDE;
|
||||
|
||||
if( ! open(LOG_CONFLICTS, ">>&=3") ) {
|
||||
print STDOUT "STDOUT\n";
|
||||
open(LOG_CONFLICTS, ">&", STDOUT);
|
||||
}
|
||||
|
||||
opendir ALLPACKAGESDIR, $ALLPACKAGESDIR or die;
|
||||
while (defined($package_name = readdir(ALLPACKAGESDIR))) {
|
||||
next unless $is_permitted_package{$package_name};
|
||||
@@ -133,8 +138,8 @@ sub install_packages() {
|
||||
{
|
||||
if(exists($files{$_->name}))
|
||||
{
|
||||
print "File ", $_->name(), " from package ", $package_name;
|
||||
print " conflicts with one from package ", $files{$_->name()}. "\n";
|
||||
print LOG_CONFLICTS "File ", $_->name(), " from package ", $package_name;
|
||||
print LOG_CONFLICTS " conflicts with one from package ", $files{$_->name()}. "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,6 +162,7 @@ sub install_packages() {
|
||||
# }
|
||||
# system('rm', '-rf', "$tmp_package_name");
|
||||
}
|
||||
close(LOG_CONFLICTS);
|
||||
closedir ALLPACKAGESDIR;
|
||||
unlink 'temppack.tar';
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ LOGFILE="${TMPDIR}/create_release.log.$date_.$$"
|
||||
|
||||
if [ -z "$VERBOSE" ]; then
|
||||
# Redirect standard out and standard err to $LOGFILE
|
||||
exec >> ${LOGFILE} 2>&1
|
||||
exec 3>&1 >> ${LOGFILE} 2>&1
|
||||
fi
|
||||
|
||||
# Verbose: displays all executed commands
|
||||
@@ -129,7 +129,7 @@ if [ -r $VERSION_FILE ]; then
|
||||
INTERNAL_NUMBER=$(( `cat $VERSION_FILE` + 1 ))
|
||||
[ "$DO_IT" ] && printf "%d\n" "${INTERNAL_NUMBER}" > $VERSION_FILE
|
||||
else
|
||||
INTERNAL_NUMBER=$(("`svn ls $SVNCGAL/tags/internal-releases | awk "/${MAJOR_NUMBER}\\.${MINOR_NUMBER}${BUGFIX_STRING}/ "'{FS="-|/"; print $4}' | sort -n | tail -1`" + 1 ))
|
||||
INTERNAL_NUMBER=$((`svn ls $SVNCGAL/tags/internal-releases | awk "/${MAJOR_NUMBER}\\.${MINOR_NUMBER}${BUGFIX_STRING}/ "'{FS="-|/"; print $4}' | sort -n | tail -1` + 1 ))
|
||||
fi
|
||||
if [ -z "$INTERNAL_NUMBER" ]; then
|
||||
INTERNAL_NUMBER=1
|
||||
|
||||
Reference in New Issue
Block a user