Only check ChangeLog if we're dealing with an ebuild (bug #170604)
authorMarius Mauch <genone@gentoo.org>
Thu, 31 May 2007 01:36:22 +0000 (01:36 -0000)
committerMarius Mauch <genone@gentoo.org>
Thu, 31 May 2007 01:36:22 +0000 (01:36 -0000)
svn path=/main/trunk/; revision=6685

pym/emerge/__init__.py

index 592dda9ccc4115c6cb0e3af457347482174d7b8a..5189c6e2d8251851c4766b90dfdb8b861d195bba 100644 (file)
@@ -2809,10 +2809,14 @@ class depgraph:
                        sys.stderr.write("".join(msg))
 
        def calc_changelog(self,ebuildpath,current,next):
+               if ebuildpath == None or not os.path.exists(ebuildpath):
+                       return []
                current = '-'.join(portage.catpkgsplit(current)[1:])
-               if current.endswith('-r0'): current = current[:-3]
+               if current.endswith('-r0'):
+                       current = current[:-3]
                next = '-'.join(portage.catpkgsplit(next)[1:])
-               if next.endswith('-r0'): next = next[:-3]
+               if next.endswith('-r0'):
+                       next = next[:-3]
                changelogpath = os.path.join(os.path.split(ebuildpath)[0],'ChangeLog')
                try:
                        changelog = open(changelogpath).read()