[arch-dev-public] ABS cleanup, round 2

Dan McGee dpmcgee at gmail.com
Tue Jun 26 11:18:03 EDT 2007


I just made another script today to do some more cleanup- this untags
all files that have been removed from CVS but did not drop their
CURRENT or CURRENT-64 tag. I went ahead and ran it on both the
[current] and [extra] repos for both i686 and x86_64. If anyone
notices any problems building certain packages from ABS now, it may be
due to this, in which case I'll put the blame squarely on the person
who originally deleted the file. :)

With the script below, it was as easy as running this command in the
top level directory of the CVS checkout (that has not had directories
pruned):
./cleantags.sh > cleanlist.txt
cat cleanlist.txt | xargs cvs tag -d CURRENT (or CURRENT-64, of course)

If anyone wants to run this on community, or thinks I should, let me
know. I felt a little more worried about messing something up there I
can't fix. I would recommend it get done however- this single cleanup
dropped 336 files from ABS, which is rather significant.

-Dan


#!/bin/bash

# find files in CVS that have been deleted but not untagged

# tag to search for
tag="CURRENT"
#tag="CURRENT-64"
#tag="TESTING"
#tag="TESTING-64"

# path to CVSROOT ,v files
path="/home/cvs-arch/arch/build"
#path="/home/cvs-extra/extra"
#path="/home/cvs-community/community"
#path="/home/cvs-unstable/unstable"

atticdirs="$(find $path -type d -name Attic)"

for dir in $atticdirs; do
    for file in $(ls $dir); do
        grep -Pq "\t$tag:" $dir/$file
        if [ $? -eq 0 ]; then
            echo "$dir/$file" | sed -e 's|,v||' -e "s|$path|.|" -e 's|Attic/||'
        fi
    done
done




More information about the arch-dev-public mailing list