/[gentoo]/xml/htdocs/proj/en/glep/glep-0052-extras/portage-2.1.2_pre2-r6-interactive-restrict.diff.txt
Gentoo

Contents of /xml/htdocs/proj/en/glep/glep-0052-extras/portage-2.1.2_pre2-r6-interactive-restrict.diff.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Oct 14 02:47:31 2006 UTC (8 years, 1 month ago) by genone
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
add reference implementation

1 --- bin/emerge.org 2006-10-14 03:24:00.000000000 +0200
2 +++ bin/emerge 2006-10-14 04:13:34.000000000 +0200
3 @@ -1579,10 +1579,10 @@
4 elif "ebuild" == pkg_type:
5 self.useFlags[myroot][pkg_key] = pkgsettings["USE"].split()
6
7 - fetch=" "
8 + restrict=" "
9
10 if x[0]=="blocks":
11 - addl=""+red("B")+" "+fetch+" "
12 + addl=""+red("B")+" "+restrict+" "
13 resolved = self.trees[x[1]]["vartree"].resolve_key(x[2])
14 print "["+x[0]+" "+addl+"]",red(resolved),
15 block_parents = self.digraph.parent_nodes(" ".join(x))
16 @@ -1595,20 +1595,26 @@
17 print bad("(is blocking %s)") % block_parents
18 else:
19 mydbapi = self.trees[myroot][self.pkg_tree_map[pkg_type]].dbapi
20 - if x[3] != "nomerge" and \
21 - "fetch" in portdb.aux_get(
22 - x[2], ["RESTRICT"])[0].split():
23 - fetch = red("F")
24 - if portdb.fetch_check(
25 - pkg_key, self.useFlags[myroot][pkg_key]):
26 - fetch = green("f")
27 + restrict_list = portdb.aux_get(x[2], ["RESTRICT"])[0].split()
28 + if x[3] != "nomerge":
29 + if "fetch" in restrict_list:
30 + restrict = "F"
31 + if "interactive" in restrict_list:
32 + restrict = "P"
33 + if portdb.fetch_check(
34 + pkg_key, self.useFlags[myroot][pkg_key]):
35 + restrict = green(restrict.lower())
36 + else:
37 + restrict = red(restrict)
38 + elif "interactive" in restrict_list:
39 + restrict = red("i")
40
41 #we need to use "--emptrytree" testing here rather than "empty" param testing because "empty"
42 #param is used for -u, where you still *do* want to see when something is being upgraded.
43 myoldbest=""
44 if "--emptytree" not in self.myopts and \
45 self.trees[x[1]]["vartree"].exists_specific(x[2]):
46 - addl=" "+yellow("R")+fetch+" "
47 + addl=" "+yellow("R")+restrict+" "
48 elif "--emptytree" not in self.myopts and \
49 self.trees[x[1]]["vartree"].exists_specific_cat(x[2]):
50 mynewslot = mydbapi.aux_get(pkg_key, ["SLOT"])[0]
51 @@ -1618,7 +1624,7 @@
52 if mynewslot == vartree.getslot(inst_pkg)]
53 if myinslotlist:
54 myoldbest=portage.best(myinslotlist)
55 - addl=" "+fetch
56 + addl=" "+restrict
57 if portage.pkgcmp(portage.pkgsplit(x[2]), portage.pkgsplit(myoldbest)) < 0:
58 # Downgrade in slot
59 addl+=turquoise("U")+blue("D")
60 @@ -1627,7 +1633,7 @@
61 addl+=turquoise("U")+" "
62 else:
63 # New slot, mark it new.
64 - addl=" "+green("NS")+fetch+" "
65 + addl=" "+green("NS")+restrict+" "
66
67 if "--changelog" in self.myopts:
68 changelogs.extend(self.calc_changelog(
69 @@ -1635,7 +1641,7 @@
70 self.trees[x[1]]["vartree"].dep_bestmatch(
71 '/'.join(portage.catpkgsplit(x[2])[:2])), x[2]))
72 else:
73 - addl=" "+green("N")+" "+fetch+" "
74 + addl=" "+green("N")+" "+restrict+" "
75
76 verboseadd=""
77
78 --- man/ebuild.5.org 2006-08-20 14:27:20.434923000 +0200
79 +++ man/ebuild.5 2006-10-14 04:18:10.000000000 +0200
80 @@ -335,6 +335,10 @@
81 .I primaryuri
82 fetch from URL's in \fBSRC_URI\fR before \fBGENTOO_MIRRORS\fR.
83 .TP
84 +.I interactive
85 +indicate that this ebuild typically requires user interaction (like inserting
86 +physical media).
87 +.TP
88 .I strip
89 final binaries/libraries will not be stripped of debug symbols.
90 .TP
91 --- man/emerge.1.org 2006-07-15 03:38:27.072219750 +0200
92 +++ man/emerge.1 2006-10-14 04:27:03.000000000 +0200
93 @@ -410,6 +430,19 @@
94 .B [ebuild f ] media\-video/realplayer\-8\-r6
95 The realplayer package's files are already downloaded.
96 .TP
97 +.B [ebuild i ] games\-fps/unreal\-226
98 +Unreal requires user interaction during the build process.
99 +.TP
100 +.B [ebuild P ] games\-strategy/freecraft\-1.18\-r3
101 +Freecraft requires user interaction during the build process and you have to
102 +fetch its sources manually (this is the combination of the first realplayer
103 +example and the Unreal example above).
104 +.TP
105 +.B [ebuild p ] games\-strategy/freecraft\-1.18\-r3
106 +Freecraft requires user interaction during the build process and has its source
107 +files already downloaded (this is the combination of the second realplayer
108 +example and the Unreal example above).
109 +.TP
110 .B [ebuild U ] net\-fs/samba\-2.2.8_pre1 [2.2.7a]
111 Samba 2.2.7a has already been emerged and can be Updated to version
112 2.2.8_pre1.

  ViewVC Help
Powered by ViewVC 1.1.20