Gentoo Archives: gentoo-commits

From: "Ned Ludd (solar)" <solar@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14497 - main/trunk/pym/_emerge
Date: Mon, 05 Oct 2009 22:46:25
Message-Id: E1MuwJz-0001iX-8V@stork.gentoo.org
1 Author: solar
2 Date: 2009-10-05 22:46:22 +0000 (Mon, 05 Oct 2009)
3 New Revision: 14497
4
5 Modified:
6 main/trunk/pym/_emerge/actions.py
7 Log:
8 - move news into features so it can be ignored when needed. Lots of whitespace cleanups
9
10 Modified: main/trunk/pym/_emerge/actions.py
11 ===================================================================
12 --- main/trunk/pym/_emerge/actions.py 2009-10-05 22:46:07 UTC (rev 14496)
13 +++ main/trunk/pym/_emerge/actions.py 2009-10-05 22:46:22 UTC (rev 14497)
14 @@ -642,7 +642,7 @@
15 required_sets[s] = InternalPackageSet(
16 initial_atoms=getSetAtoms(s))
17
18 -
19 +
20 # When removing packages, use a temporary version of world
21 # which excludes packages that are intended to be eligible for
22 # removal.
23 @@ -1148,7 +1148,7 @@
24 def cmp_reference_count(node1, node2):
25 return node_refcounts[node1] - node_refcounts[node2]
26 graph.order.sort(key=cmp_sort_key(cmp_reference_count))
27 -
28 +
29 ignore_priority_range = [None]
30 ignore_priority_range.extend(
31 range(UnmergeDepPriority.MIN, UnmergeDepPriority.MAX + 1))
32 @@ -1837,7 +1837,7 @@
33 portage.writemsg(yellow("WARNING:") + " adding required option " + \
34 "%s not included in PORTAGE_RSYNC_OPTS\n" % opt)
35 rsync_opts.append(opt)
36 -
37 +
38 for exclude in ("distfiles", "local", "packages"):
39 opt = "--exclude=/%s" % exclude
40 if opt not in rsync_opts:
41 @@ -1845,7 +1845,7 @@
42 " adding required option %s not included in " % opt + \
43 "PORTAGE_RSYNC_OPTS (can be overridden with --exclude='!')\n")
44 rsync_opts.append(opt)
45 -
46 +
47 if syncuri.rstrip("/").endswith(".gentoo.org/gentoo-portage"):
48 def rsync_opt_startswith(opt_prefix):
49 for x in rsync_opts:
50 @@ -2208,7 +2208,7 @@
51 print()
52 print(red(" * ")+"To update portage, run 'emerge portage' now.")
53 print()
54 -
55 +
56 display_news_notification(root_config, myopts)
57 return os.EX_OK
58
59 @@ -2632,6 +2632,8 @@
60 UNREAD_PATH = os.path.join(target_root, NEWS_LIB_PATH, "news")
61 newsReaderDisplay = False
62 update = "--pretend" not in myopts
63 + if "news" not in settings.features:
64 + return
65
66 if not settings.treeVirtuals:
67 # Populate these using our existing vartree, to avoid
68 @@ -2647,8 +2649,8 @@
69 print()
70 print(colorize("WARN", " * IMPORTANT:"), end=' ')
71 print("%s news items need reading for repository '%s'." % (unreadItems, repo))
72 -
73 -
74 +
75 +
76 if newsReaderDisplay:
77 print(colorize("WARN", " *"), end=' ')
78 print("Use " + colorize("GOOD", "eselect news") + " to read news items.")
79 @@ -2690,7 +2692,7 @@
80 """
81 Examines news items in repodir + '/' + NEWS_PATH and attempts to find unread items
82 Returns the number of unread (yet relevent) items.
83 -
84 +
85 @param portdb: a portage tree database
86 @type portdb: pordbapi
87 @param vardb: an installed package database
88 @@ -2704,7 +2706,7 @@
89 @rtype: Integer
90 @returns:
91 1. The number of unread but relevant news items.
92 -
93 +
94 """
95 from portage.news import NewsManager
96 manager = NewsManager(portdb, vardb, NEWS_PATH, UNREAD_PATH)