On 03/04/10 22:38, Robin H. Johnson wrote:
> This contains a critical bug...
>
> "cvs add" and the matching commit aren't mentioned anywhere...
I've been moving Git today, properly hopefully.
This is what I've been doing on the shell basically:
cd gentoo-x86
# Copy package to new location
cd dev-vcs
# Add empty dirs to please CVS
for dir in $(find ../dev-util/git/ -name CVS -prune -or -type d
-printf 'git/%P
'); do
mkdir ${dir}
cvs add ${dir}
done
cd git
rsync -v --recursive --archive --cvs-exclude ../../dev-util/git/ .
find . -name CVS -prune -or -type f -print0 | xargs --null cvs add
echangelog 'New package (copied from dev-util/git)'
fgrep -Rw dev-util/git . | fgrep -v Header # Check for self-references
repoman manifest
repoman ci -m 'dev-vcs/git: New package (copied from dev-util/git)'
cd ..
cd ..
# Extend profiles
cd profiles
# Duplicate refs to old package
# ...
# Add move entry
echo 'move dev-util/git dev-vcs/git' >> updates/1Q-2010
echangelog 'Move dev-util/git to dev-vcs/git'
cvs ci -m 'Move dev-util/git to dev-vcs/git' ChangeLog updates/1Q-2010
cd ..
# Fix eclasses
nano -w eclass/git.eclass
cvs commit -m 'Move from dev-util/git to dev-vcs/git' eclass/git.eclass
# Fix packages depending on the old package
# For each package:
cd category/package
fgrep -Rwl dev-util/git . | xargs -n 1 sed
's|dev-util/git|dev-vcs/git|' -i
echangelog 'Propagate move of dev-util/git to dev-vcs/git'
repoman manifest
cvs diff -u | colordiff | less -r
repoman ci -m "$(basename $(dirname $PWD))/$(basename $PWD): Propagate
move of dev-util/git to dev-vcs/git"
cd ..
# Check if we missed anything
fgrep -Rwl dev-util/git . | fgrep -v ChangeLog | fgrep -v Repository
# Remove old package
cd dev-util
cvs rm -Rf git
cvs ci -m "dev-util/git: Remove (renamed to dev-vcs/git)" git
cd ..
# Clean-up profiles
cd profiles
# Remove refs to old package
# ...
cd ..