Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

fix #5 - Breaks when a Package title != name #1

Closed
wants to merge 13 commits into from

Conversation

giuliano108
Copy link
Collaborator

I can't open an upstream PR because fix_tests hasn't been merged yet...

This PR should address bug #5. Please have a look there for context.

In summary: when computing the set of managed packages, we can't just look them up by title in the Catalog. Because title and name can be different, we need to look into the "resource aliases" table too.

package {'arbitrarytitle': name => 'pkgname'}

I couldn't find a public API to access @aliases, hence the instance_variable_get hack... :(

/cc @hashbrowncipher @solarkennedy @oholiab

@giuliano108
Copy link
Collaborator Author

In the last commit I've collapsed everything down to:

catalog_r = catalog.resource(r.ref) || find_resource_alias(["Package", r.name, :held_apt])

Is that any better?

@giuliano108
Copy link
Collaborator Author

#2 , which I just merged, also includes this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants