Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix appdata parsing #181

Merged
merged 2 commits into from
Jul 28, 2017
Merged

Conversation

lnussel
Copy link
Member

@lnussel lnussel commented Jul 27, 2017

No description provided.

@lnussel lnussel mentioned this pull request Jul 27, 2017
@lnussel lnussel requested a review from guoyunhe July 27, 2017 15:21
Copy link
Contributor

@guoyunhe guoyunhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I am not really a Ruby expert. I remember I have seen this problem one year ago. https://github.com/openSUSE/software-o-o/pull/121/files#diff-2304bd464c39d51ebb8120d3be4e9039

However, this behavior might changed after Ruby updates.

@@ -39,10 +45,12 @@ def self.get_distribution dist = "factory", flavour = "oss"
else
"http://download.opensuse.org/distribution/#{dist}/repo/#{flavour}/suse/setup/descr/appdata.xml.gz"
end
filename = File.join(Rails.root.join('tmp'), "appdata-" + dist + ".xml")
logger.debug("fetching appdata for #{dist}/#{flavour}")
filename = File.join(Rails.root.join('tmp'), "appdata-#{dist}-#{flavour}.xml.gz")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you store uncompressed data into it, so you better stay with .xml

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed

In contrast to the previous comment open-uri does not decompress the stream
@coolo coolo merged commit 4ef8ca1 into openSUSE:new_design_2017 Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants