From 4faa73d97e340612f5212458852df7e045b131de Mon Sep 17 00:00:00 2001 From: Steve Dibb Date: Fri, 1 Jan 2010 16:14:47 +0000 Subject: new mtimes git-svn-id: file:///var/svn/portage@34 3218660a-b0cf-4799-a991-8ddcc5b9e0f3 --- class.portage.ebuild.php | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/class.portage.ebuild.php b/class.portage.ebuild.php index d1a1efb..97cea90 100644 --- a/class.portage.ebuild.php +++ b/class.portage.ebuild.php @@ -44,8 +44,6 @@ // File properties private $filename; - private $mtime; - private $ctime; private $category; @@ -55,6 +53,12 @@ public $arr_components; private $has_version; + // File mtimes + private $portage_mtime; + private $changelog_mtime; + private $metadata_mtime; + private $cache_mtime; + function __construct($str) { $this->atom = trim($str); @@ -67,6 +71,9 @@ $this->filename = $this->portage."/".$this->getCategory()."/".$this->getPackageName()."/".$this->getFullPackageName().".ebuild"; $this->filename_cache = $this->cache."/".$this->getCategory()."/".$this->getFullPackageName(); + + if(file_exists($this->filename_cache)) + $this->cache_mtime = filemtime($this->filename_cache); $this->arr_metadata_keys = array('depend', 'rdepend', 'slot', 'src_uri', 'restrict', 'homepage', 'license', 'description', 'keywords', 'inherited', 'iuse', 'cdepend', 'pdepend', 'provide', 'eapi', 'properties', 'defined_phases'); @@ -143,14 +150,10 @@ return $this->getPackageVersionAndRevision(); break; - case 'mtime': + case 'portage_mtime': return $this->getMtime(); break; - case 'ctime': - return $this->getCtime(); - break; - case 'filename': return $this->filename; break; @@ -497,15 +500,6 @@ } - function getCtime() { - - if(file_exists($this->filename)) - return filectime($this->filename); - else - return null; - - } - } ?> \ No newline at end of file -- cgit v1.2.3-65-gdbad