Gentoo Archives: gentoo-dev

From: Sebastian Pipping <sping@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Moving packages to dev-vcs
Date: Wed, 17 Mar 2010 18:09:13
Message-Id: 4BA11AA0.4090202@gentoo.org
In Reply to: Re: [gentoo-dev] Moving packages to dev-vcs by "Robin H. Johnson"
1 On 03/04/10 22:38, Robin H. Johnson wrote:
2 > This contains a critical bug...
3 >
4 > "cvs add" and the matching commit aren't mentioned anywhere...
5
6 I've been moving Git today, properly hopefully.
7 This is what I've been doing on the shell basically:
8
9
10 cd gentoo-x86
11
12 # Copy package to new location
13 cd dev-vcs
14 # Add empty dirs to please CVS
15 for dir in $(find ../dev-util/git/ -name CVS -prune -or -type d
16 -printf 'git/%P\n'); do
17 mkdir ${dir}
18 cvs add ${dir}
19 done
20 cd git
21 rsync -v --recursive --archive --cvs-exclude ../../dev-util/git/ .
22 find . -name CVS -prune -or -type f -print0 | xargs --null cvs add
23 echangelog 'New package (copied from dev-util/git)'
24 fgrep -Rw dev-util/git . | fgrep -v Header # Check for self-references
25 repoman manifest
26 repoman ci -m 'dev-vcs/git: New package (copied from dev-util/git)'
27 cd ..
28 cd ..
29
30 # Extend profiles
31 cd profiles
32 # Duplicate refs to old package
33 # ...
34
35 # Add move entry
36 echo 'move dev-util/git dev-vcs/git' >> updates/1Q-2010
37 echangelog 'Move dev-util/git to dev-vcs/git'
38 cvs ci -m 'Move dev-util/git to dev-vcs/git' ChangeLog updates/1Q-2010
39 cd ..
40
41 # Fix eclasses
42 nano -w eclass/git.eclass
43 cvs commit -m 'Move from dev-util/git to dev-vcs/git' eclass/git.eclass
44
45 # Fix packages depending on the old package
46 # For each package:
47 cd category/package
48 fgrep -Rwl dev-util/git . | xargs -n 1 sed
49 's|\bdev-util/git\b|dev-vcs/git|' -i
50 echangelog 'Propagate move of dev-util/git to dev-vcs/git'
51 repoman manifest
52 cvs diff -u | colordiff | less -r
53 repoman ci -m "$(basename $(dirname $PWD))/$(basename $PWD): Propagate
54 move of dev-util/git to dev-vcs/git"
55 cd ..
56
57 # Check if we missed anything
58 fgrep -Rwl dev-util/git . | fgrep -v ChangeLog | fgrep -v Repository
59
60 # Remove old package
61 cd dev-util
62 cvs rm -Rf git
63 cvs ci -m "dev-util/git: Remove (renamed to dev-vcs/git)" git
64 cd ..
65
66 # Clean-up profiles
67 cd profiles
68 # Remove refs to old package
69 # ...
70 cd ..
71
72
73 # EOF