Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Support cleaning strip step. #382
Conversation
coveralls
commented
Mar 18, 2016
sergiusens
reviewed
Mar 19, 2016
| @@ -128,12 +128,11 @@ def is_dirty(self, step): | ||
| def should_step_run(self, step, force=False): | ||
| return force or self.is_dirty(step) | ||
| - def mark_done(self, step): | ||
| + def mark_done(self, step, state={}): |
sergiusens
Mar 19, 2016
Collaborator
state=None and then inside check
if not state:
state = {}https://pythonconquerstheuniverse.wordpress.com/2012/02/15/mutable-default-arguments/
sergiusens
reviewed
Mar 19, 2016
| + with open(self._step_state_file('strip'), 'r') as f: | ||
| + state = yaml.load(f.read()) | ||
| + | ||
| + _clean_migrated_files(state['snap-files'], state['snap-directories'], |
sergiusens
Mar 19, 2016
Collaborator
before passing this in, you need to load all parts and check if they migrated the same file to remove it from the wipe list
kyrofa
Mar 21, 2016
Member
Oh right, when writing this I assumed that would imply they were dependent parts, but I forgot that multiple independent parts can supply the same file as long as the contents don't change. Good catch, thank you!
|
Looks good, just comment about dict and filesets |
coveralls
commented
Mar 21, 2016
|
This PR needs to land to an intermediate branch. Closing. |
kyrofa
closed this
Mar 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kyrofa commentedMar 18, 2016
This PR makes progress on LP: #1537786 toward implementing per-step clean rules by adding one for the
stripstep. The others are currently placeholders and will be implemented in future PRs.