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

feature/updateinfo #75

Merged
merged 41 commits into from Jul 24, 2014
Merged

feature/updateinfo #75

merged 41 commits into from Jul 24, 2014

Conversation

lmacken
Copy link
Contributor

@lmacken lmacken commented Jul 23, 2014

This is a port of the bodhi.metadata module that generates the updateinfo.xml that is injected into the yum repodata with bodhi.modifyrepo.

…ig file

This also adds a few new arguments to the ExtendedMetadata constructor
The get_notice method looks for the nvr in the filenames of the notice, which
are currently not consistent in our testing environment with the current
DevBuildsys. Work around it for now by indexing into all of them.


class ExtendedMetadata(object):

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a docstring here? A paragraph or two to help the reader know what kind of metadata they're looking at. Is this yum metadata? how does this get used? Is it called upon at update submission time? at mash time? What kinds of things rely on it? If it breaks, is it nbd or is it really bad?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

docstring added!

@ralphbean
Copy link
Contributor

This is so tight. 👍

@bochecha
Copy link
Contributor

If we deploy on RHEL 7, then we likely won't need the modifyrepo. 😉

@lmacken
Copy link
Contributor Author

lmacken commented Jul 24, 2014

I'm definitely in favor of focusing on RHEL7+ so we can finally ditch bodhi.modifyrepo and use createrepo's.

Testing this locally, I'm hitting this:

raceback (most recent call last):
  File "/home/lmacken/code/github.com/bodhi/bodhi/tests/test_metadata.py", line 102, in test_extended_metadata
    md.insert_updateinfo()
  File "/home/lmacken/code/github.com/bodhi/bodhi/metadata.py", line 340, in insert_updateinfo
    repomd.add(self.doc)
  File "/usr/share/createrepo/modifyrepo.py", line 125, in add
    if self.compress:
AttributeError: RepoMetadata instance has no attribute 'compress'

@bochecha
Copy link
Contributor

Do you have to set that attribute yourself on the object?

Also, I just thought about one thing: with the move to createrepo_c, how does that leave us? 😕

@lmacken
Copy link
Contributor Author

lmacken commented Jul 24, 2014

Setting the attribute(s) leads me down a rabbit hole of failure. I'm just going to merge what I've got for now, and hopefully someday we can work with upstream createrepo's modifyrepo.

With regards to createrepo_c, I'm not sure. Hopefully nothing will change from a bodhi perspective, and most of the change will be isolated to mash.

lmacken added a commit that referenced this pull request Jul 24, 2014
updateinfo.xml metadata support ported from bodhi1
@lmacken lmacken merged commit d0431c3 into pyramid Jul 24, 2014
@lmacken lmacken deleted the feature/updateinfo branch July 24, 2014 18:48
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