Ticket #489 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Submission folder modification dates got updated as a result of upgrade to svn 1.7

Reported by: kmaclean Owned by: kmaclean
Priority: major Milestone:
Component: Scripts Version: 0.1-alpha
Keywords: Cc:

Description (last modified by kmaclean) (diff)

folder updates

see fixDates.sh

The upgrade of the subversion client (to svn v1.7) on the acoustic model build server changed the modification date of all the submission folders.

Subversion no longer keeps .svn files in each repository folder. The result of the upgrade from svn 1.6 to 1.7 was the mass deletion of these .svn folders and their contents, and merging them into a single svn folder at the base of the repository.

The problem is that the folder modification dates were updated when this happened, and now the acoustic model creation scripts want to update *every* submission on the VoxForge? repository (since tarfile.pm compares the submission folder modification date to the modification date of its corresponding tarfile).

Separate update required

see fixTarfileDates.sh

these need to be updated separately: german (de) repository submission tarfiles were updated with new date; and some greek (el) submission tarfiles repository

Change History

comment:1 Changed 9 years ago by kmaclean

script to fix this problem

#!/bin/sh
# This program deals with the outcome of an update in the subversion client (to svn v1.7) that changed the date of the 
# submission folders on the VoxForge acoustic model ceration server.
# 
# Subversion no longer keeps .svn files in each repository folder.  The result of the upgrade from svn 1.6 to 1.7 was
# the mass deletion of these .svn folders and their contents, and merging them into a single svn folder at the base of the 
# repository.  
# The problem is that the folder modification dates were updated when this happened, and now the acoustic
# model creation scripts want to update every submission on the VoxForge repository (since they compare the submission
# folder modification date to the submission tarfile modification date).
#
# This scripts picks one file in the submission (GPL_license.txt) and compares its modification date to that of the
# submission folder, and if the modification folder is newer (liekely as a result of the svn client upgrade...) then it
# updates the date of the folder and all the files to be the same as that for GPL_license.txt.
#

processSubmission () {
	local submission=$1
	local submissionPath=$2

	echo "$submissionPath"
	submissionFiles=`find $submissionPath`
	for submissionFile in $submissionFiles
	do
		echo "        touch $submissionFile"
		touch -r $submissionPath/etc/GPL_license.txt $submissionFile
	done					 

}

dirlist='/home/kmaclean/VoxForge-dev/Greek'
for dir in $dirlist
do
	for subdir in 'Audio/Original' 'Audio/Main' 'Audio/MFCC' 
	do

		for audiodir in '8kHz_16bit' '16kHz_16bit' '32kHz_16bit' '44.1kHz_16bit' '48kHz_16bit' '8kHz_16bit/MFCC_0_D' '16kHz_16bit/MFCC_0_D'
		do
		echo "### $audiodir ########################"
			echo "*** $dir/$subdir/$audiodir ***"
			if [ -d $dir/$subdir/$audiodir ] ; then
				listOfSubmissions=`ls -1 $dir/$subdir/$audiodir`
				for submission in $listOfSubmissions
				do
					submissionPath="$dir/$subdir/$audiodir/$submission"
					submissionDirectorydate=`date -r $submissionPath +%s`
					gplFiledate=`date -r $submissionPath/etc/GPL_license.txt +%s`
	
					if [ $submissionDirectorydate -gt $gplFiledate ] ; then
						processSubmission $submission $submissionPath
					fi
				done
			else
				echo "  does not exist: $dir/$subdir/$audiodir"
			fi
		done


	done
done

comment:2 Changed 9 years ago by kmaclean

  • Description modified (diff)

comment:3 Changed 9 years ago by kmaclean

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)
Note: See TracTickets for help on using tickets.