Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] <rest-service> dmacvicar_log_viewer : Use mtime from base class
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Thu, 10 Sep 2009 11:41:36 +0200
  • Message-id: <E1MlmpK-0005hM-Fo@xxxxxxxxxxxxxxxx>
ref: refs/heads/dmacvicar_log_viewer
commit d546a248ba4124e8fa8d73d0fc2cf8b917bbb68b
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Thu Sep 10 11:41:36 2009 +0200

Use mtime from base class
---
plugins/patches/app/models/patch.rb | 11 -----------
plugins/patches/app/models/resolvable.rb | 5 ++---
2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/plugins/patches/app/models/patch.rb
b/plugins/patches/app/models/patch.rb
index c7625bf..d53e900 100644
--- a/plugins/patches/app/models/patch.rb
+++ b/plugins/patches/app/models/patch.rb
@@ -3,17 +3,6 @@ require 'resolvable'
# Model for patches available via package kit
class Patch < Resolvable

- # returns the modification time of
- # the patch status, which you can use
- # for cache policy purposes
- def self.mtime
- # we look for the most recent (max) modification time
- # of either the package database or libzypp cache files
- [ File.stat("/var/lib/rpm/Packages").mtime,
- File.stat("/var/cache/zypp/solv").mtime,
- * Dir["/var/cache/zypp/solv/*/solv"].map{ |x| File.stat(x).mtime } ].max
- end
-
def to_xml( options = {} )
xml = options[:builder] ||= Builder::XmlMarkup.new(options)
xml.instruct! unless options[:skip_instruct]
diff --git a/plugins/patches/app/models/resolvable.rb
b/plugins/patches/app/models/resolvable.rb
index fc25636..8aba62b 100644
--- a/plugins/patches/app/models/resolvable.rb
+++ b/plugins/patches/app/models/resolvable.rb
@@ -21,9 +21,8 @@ class Resolvable
@resolvable_id = id_val
end

- # returns the modification time of
- # the patch status, which you can use
- # for cache policy purposes
+ # returns the modification time of the resolvable
+ # which you can use for cache policy purposes
def self.mtime
# we look for the most recent (max) modification time
# of either the package database or libzypp cache files
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages