From 480c356b9553d9cc144d4ea11e2db7cae59acac3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 20 Nov 2006 08:11:18 +0000 Subject: [PATCH] Print a warning message if a user requests a package from package.provided (since it won't be merged). svn path=/main/trunk/; revision=5106 --- bin/emerge | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bin/emerge b/bin/emerge index f20c5724b..b99d897da 100755 --- a/bin/emerge +++ b/bin/emerge @@ -756,6 +756,7 @@ class depgraph: self.blocker_digraph = digraph() self.blocker_parents = {} self._altlist_cache = {} + self._pprovided_args = [] def create(self, mybigkey, myparent=None, addme=1, myuse=None, priority=DepPriority(), rev_dep=False, arg=None): @@ -1195,6 +1196,12 @@ class depgraph: return 0 mymerge = mycheck[1] + if not mymerge and arg and \ + portage.best_match_to_list(depstring, self.args_keys): + # A provided package has been specified on the command line. The + # package will not be merged and a warning will be displayed. + self._pprovided_args.append(arg) + if myparent: # The parent is added after it's own dep_check call so that it # isn't allowed to satisfy a direct bootstrap dependency on itself @@ -2160,6 +2167,21 @@ class depgraph: print bold('*'+revision) sys.stdout.write(text) + if self._pprovided_args: + msg = [] + msg.append(bad("\nWARNING: ")) + if len(self._pprovided_args) > 1: + msg.append("Requested packages will not be " + \ + "merged because they are listed in\n") + else: + msg.append("A requested package will not be " + \ + "merged because it is listed in\n") + msg.append(" package.provided:\n\n") + for arg in self._pprovided_args: + msg.append(" " + arg + "\n") + msg.append("\n") + sys.stderr.write("".join(msg)) + def calc_changelog(self,ebuildpath,current,next): current = '-'.join(portage.catpkgsplit(current)[1:]) if current.endswith('-r0'): current = current[:-3] -- 2.26.2