[zypp-commit] r6890 - in /trunk/repotools/zypptools: input/contentparser.rb input/yast.rb lib/arch.rb
Author: haass Date: Mon Aug 27 12:17:05 2007 New Revision: 6890 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6890&view=rev Log: Minor changes for compatibilty to 10.3 Modified: trunk/repotools/zypptools/input/contentparser.rb trunk/repotools/zypptools/input/yast.rb trunk/repotools/zypptools/lib/arch.rb Modified: trunk/repotools/zypptools/input/contentparser.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/repotools/zypptools/input/contentparser.rb?rev=6890&r1=6889&r2=6890&view=diff ============================================================================== --- trunk/repotools/zypptools/input/contentparser.rb (original) +++ trunk/repotools/zypptools/input/contentparser.rb Mon Aug 27 12:17:05 2007 @@ -41,6 +41,8 @@ #puts "get_line(#{@lnum}:#{l})" next if l.size == 0 next if l[0,1] == "#" + next if l[0,4] == "TYPE" + next if l[0,4] == "HASH" break end return l @@ -61,7 +63,7 @@ end tag, @subtag = tag.split( "." ) #puts "tag[#{tag}][#{@subtag}][#{value}]" - self.send( tag.downcase, value ) + self.send( tag.downcase, value ) end end Modified: trunk/repotools/zypptools/input/yast.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/repotools/zypptools/input/yast.rb?rev=6890&r1=6889&r2=6890&view=diff ============================================================================== --- trunk/repotools/zypptools/input/yast.rb (original) +++ trunk/repotools/zypptools/input/yast.rb Mon Aug 27 12:17:05 2007 @@ -12,6 +12,7 @@ require 'zypptools/lib/selection' require 'zypptools/lib/product' require 'zypptools/lib/arch' +require 'zlib' class YaST # @@ -95,7 +96,7 @@ def method_missing meth, *args return if @missing.has_key? meth - STDERR.puts "#{meth} is missing" +#STDERR.puts "#{meth} is missing" @missing[meth] = true end @@ -358,7 +359,21 @@ end dir += "/" + @products[0].descrdir - @pkgs = Packages.new( dir + "/packages", arch ) + if File.exist?(dir + "/packages") + @pkgs = Packages.new( dir + "/packages", arch ) + elsif File.exist?(dir + "/packages.gz") + data = File.new("tmp_yast", modestring="w+") + File.open(dir + "/packages.gz") do |f| + gzip = Zlib::GzipReader.new(f) + data << gzip.read + gzip.close + end + data.close + @pkgs = Packages.new( "tmp_yast", arch ) + File.delete("tmp_yast") + else + raise "Packages-File not found" + end @packages = @pkgs.store @patterns = Hash.new pname = dir + "/patterns" Modified: trunk/repotools/zypptools/lib/arch.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/repotools/zypptools/lib/arch.rb?rev=6890&r1=6889&r2=6890&view=diff ============================================================================== --- trunk/repotools/zypptools/lib/arch.rb (original) +++ trunk/repotools/zypptools/lib/arch.rb Mon Aug 27 12:17:05 2007 @@ -22,6 +22,8 @@ when :s390x : @compat = [ @arch, :s390 ] when :s390 : @compat = [ @arch ] when :noarch : @compat = [ ] + when :all : @compat = [ :noarch, :i386, :i486, :i586, :i686, :athlon, :x86_64, + :ia64, :ppc, :ppc64, :s390, :s390x ] else STDERR.puts "Unknown arch #{@arch}" exit 1 -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
haass@svn.opensuse.org