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

pkgrepo should only run refresh_db once #13361

Open
ryan-lane opened this Issue Jun 10, 2014 · 10 comments

Comments

Projects
None yet
3 participants
@ryan-lane
Contributor

ryan-lane commented Jun 10, 2014

Currently pkgrepo.managed will run apt-get update for every PPA added and it's necessary to do workarounds with module.wait:

https://gist.github.com/ryan-lane/085ec4fd14f337a6b09f

It would be nice if pkgrepo.managed only ran refresh_db once all pkgrepo states have run. It's actually the module and not the state that does this in the develop branch. Maybe aggregates is a way to handle this?

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 11, 2014

Since you say it's not the state, can you clarify which pkg frontend you are using?

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 11, 2014

Nevermind, I glossed over the PPA part. Could you provide an example we could use to replicate this? I don't see a way that refresh_db() gets run twice.

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 11, 2014

Specifically, I'm looking for an example of SLS that causes two refreshes. Would it be something like this?

Ensure salt ppa:
  pkgrepo.managed:
    - ppa: saltstack/salt
@ryan-lane

This comment has been minimized.

Contributor

ryan-lane commented Jun 11, 2014

It's run twice because I'm adding two PPAs (see the gist).

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 11, 2014

OK. Is there a specific reason why the update is being run after pkg.mod_repo is executed? I'm not really a debian guy.

The likely solution for this will be similar to what we are doing for pkg states to ensure that only one apt-get update at most is run per salt CLI command (well, at least in pkg states).

@ryan-lane

This comment has been minimized.

Contributor

ryan-lane commented Jun 11, 2014

It's necessary to update the package database after new resources have been added to it, otherwise apt-get install won't see all of the packages, or may see incorrect ones.

@terminalmage

This comment has been minimized.

Member

terminalmage commented Jun 11, 2014

OK, yeah, then we'd need to do something with the new mod_aggregate, like you mentioned.

@stale

This comment has been minimized.

stale bot commented Dec 4, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Dec 4, 2017

@terminalmage

This comment has been minimized.

Member

terminalmage commented Dec 5, 2017

This is worth doing, I'm going to keep it open.

@stale

This comment has been minimized.

stale bot commented Dec 5, 2017

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Dec 5, 2017

@terminalmage terminalmage self-assigned this Dec 5, 2017

@terminalmage terminalmage removed the Fluorine label Jul 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment