diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-11-20 08:11:18 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-11-20 08:11:18 +0000 |
commit | 480c356b9553d9cc144d4ea11e2db7cae59acac3 (patch) | |
tree | e6b259702a89ec4936abbbb491af928917ebd3f0 | |
parent | 82e229ae9a8ba8a31680ec1d302c4974c94fcf88 (diff) | |
download | portage-480c356b9553d9cc144d4ea11e2db7cae59acac3.tar.gz portage-480c356b9553d9cc144d4ea11e2db7cae59acac3.tar.bz2 portage-480c356b9553d9cc144d4ea11e2db7cae59acac3.zip |
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
-rwxr-xr-x | bin/emerge | 22 |
1 files changed, 22 insertions, 0 deletions
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] |