Gentoo Archives: gentoo-soc

From: Andrey Kislyuk <weaver@g.o>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Interest in idea 2.16: SCM snapshot management infrastructure or 2.1: Add "tags" support to Portage
Date: Mon, 23 Mar 2009 12:10:16
Message-Id: 17e1a1290903230510r4503167bg62dfe40a1a2af43@mail.gmail.com
In Reply to: Re: [gentoo-soc] Interest in idea 2.16: SCM snapshot management infrastructure or 2.1: Add "tags" support to Portage by Nils
1 > Ok, so this program would need to:
2 >  1 Scan all the ebuilds and see which ones use SCM.
3 >  2 Auto generate a snapshot and notify the maintainer so he/she can
4 > test the snapshot and make sure everything is working just fine.
5 >  3 Modify the ebuild to point to the snapshot instead of the source repository.
6 >  4 Update the Manifest to reflect this update
7 >  5 Periodically check for changes.
8
9 No.
10
11 Let's say the ebuild name is bioperl-1.7.ebuild and the writer
12 specifies (purely hypothetical/provisional syntax)
13
14 inherit git scm-snapshots
15
16 EGIT_REPO_URI="git://code.open-bio.org/bioperl/"
17 EGIT_BRANCH="1.7"
18 SRC_URI=""
19
20 What scm-snapshots.eclass will do is try to add
21 "mirror://gentoo/bioperl-1.7.tar.bz2" to SRC_URI and fetch it, and if
22 that fails, hand it over to the git eclass which will perform the
23 fetch from the repo as it normally would. It would be the daemon's
24 responsibility to see that the ebuild is using scm-snapshots, generate
25 the snapshot, upload it to gentoo mirrors, and update the package
26 manifest to include the snapshot.
27
28 Alternatively, since an automated manifest change is necessary anyway
29 once the snapshot is generated in this scenario, the daemon could edit
30 the ebuild to change the SRC_URI and effectively disable any SCM
31 eclass that is being used.
32
33 > I also assume that there will be an option for the maintainer to keep
34 > the ebuild live in the way it is now, without snapshots?
35
36 Yes. They wouldn't need to do anything. Without scm-snapshots.eclass,
37 nothing would happen.
38
39 > Also, would the scm url be left as a backup, in case the snapshot
40 > cannot be found? Or should we provide an classical live ebuild as well
41 > as the snapshot version, in order to have a fallback?
42
43 Yes, see the way I described it above. If there is no snapshot found
44 on the mirrors, it would hand over to the scm eclass. A "classical"
45 live ebuild's behavior wouldn't change at all.
46
47 -ak