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

Compress sqlite repodata files. #1306

Merged
merged 1 commit into from Mar 26, 2019
Merged

Compress sqlite repodata files. #1306

merged 1 commit into from Mar 26, 2019

Conversation

ipanova
Copy link
Member

@ipanova ipanova commented Mar 25, 2019

@ipanova ipanova force-pushed the i4516 branch 2 times, most recently from 92a53be to 932b780 Compare March 25, 2019 17:45
open(repomd_path, "w").write(repomd.xml_dump())
repomd_f = open(repomd_path, "w")
repomd_f.write(repomd.xml_dump())
repomd_f.close()
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch on the file handler leak! Is there any reason not to use a context manager here? If we can, I think we should.

with open(repomd_path, "w") as repomd_f:
    repomd_f.write(repomd.xml_dump())

Copy link
Member Author

Choose a reason for hiding this comment

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

no reason!

@dralley dralley changed the title Compress slite repodata files. Compress sqlite repodata files. Mar 25, 2019
@dralley
Copy link
Contributor

dralley commented Mar 26, 2019

@ipanova @PulpQE Should we create a smash test for this?

@ipanova
Copy link
Member Author

ipanova commented Mar 26, 2019

@dralley i do not have any strong preference. I tested the work-flow on fedora and package manager did not complain about uncompressed files, but it was be the problem for centos and probably rhel.

@ipanova ipanova merged commit d746acc into pulp:master Mar 26, 2019
@dralley
Copy link
Contributor

dralley commented Mar 26, 2019

Sounds good, I suppose QE should determine if it needs one and how to do so if it would be difficult to test on a non-centos system.

Probably leave a note on the if statement mentioning this special case though.

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

2 participants