Closed jimk-bdrc closed 3 years ago
Along the way, I looked for DRS deposits in the DB which did not have a corresponding batchBuild. There were a few thousand.
Along the way built a db that GNU locate
can use to search multiple directory trees efficiently.
#!/usr/bin/env bash
#
# Build a locate db for batchBuilds.
# Search these paths
export LOCALPATHS="$PR/batchBuilds $PR/batchBuildsFromBodhi $PR/deposited-batch-builds /Volumes/D\
RS_Staging/DRS/oldprod"
export PRUNEPATHS=/Volumes/DRS_Staging/DRS/oldprod/batchLinks
export OUTFILE=$PR/locate.db
export FINDOPTIONS=" -type d"
#
# Use ignore links, because oldprod/batchLinks is all links
updatedb --findoptions="$FINDOPTIONS" --localpaths="$LOCALPATHS" --prunepaths="$PRUNEPATHS" --out\
put="$OUTFILE"
See
cat DepoVols.lst | parallel 'locate --database=/Volumes/DRS_Staging/DRS/prod/locate.db --basename {}'
As simple as calling 'updateBuildStatus 'success'