From 740f274b8516cece84947426afb93bcf6072889e Mon Sep 17 00:00:00 2001 From: Steve Dibb Date: Wed, 17 Feb 2010 03:46:41 +0000 Subject: bugfix git-svn-id: file:///var/svn/portage@90 3218660a-b0cf-4799-a991-8ddcc5b9e0f3 --- class.portage.package.manifest.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/class.portage.package.manifest.php b/class.portage.package.manifest.php index 4d8cde2..12bce8a 100644 --- a/class.portage.package.manifest.php +++ b/class.portage.package.manifest.php @@ -132,11 +132,19 @@ return $str; } + public function getHash($file = 'Manifest', $type = 'sha1') { - - if($file == 'Manifest' && !$this->hash && $this->filename) - $str = $this->hash = sha1($this->getManifest()); - else { + + // FIXME This is really dumb. + if($file == 'Manifest') { + + if(!$this->hash) { + $str = $this->hash = sha1($this->getManifest()); + } else { + $str =& $this->hash; + } + + } else { $this->parse(); -- cgit v1.2.3-65-gdbad