Skip to content

Use version to disable pulling from upstream during an update#144

Merged
ehelms merged 1 commit intotheforeman:masterfrom
ehelms:fix-update-more
Oct 18, 2018
Merged

Use version to disable pulling from upstream during an update#144
ehelms merged 1 commit intotheforeman:masterfrom
ehelms:fix-update-more

Conversation

@ehelms
Copy link
Copy Markdown
Member

@ehelms ehelms commented Oct 17, 2018

No description provided.

@evgeni
Copy link
Copy Markdown
Member

evgeni commented Oct 18, 2018

The tests fail because the packaging repo stubs we ship are no git repositories.

There is some code that does a git setup, but it's not used universally:

def setup_upstream(upstream_path):
# create a cloneable upstream repo, what we ship in fixtures is not
subprocess.check_call(['git', 'init'], cwd=upstream_path)
subprocess.check_call(['git', 'annex', 'init'], cwd=upstream_path)
subprocess.check_call(['git', 'add', '.'], cwd=upstream_path)
subprocess.check_call(['git', 'annex', 'addurl', '--file',
'packages/hello/hello-2.10.tar.gz',
'http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz'],
cwd=upstream_path)
subprocess.check_call(['git', 'commit', '-a', '-m', 'init'],
cwd=upstream_path)

Other than that, I think version is a valid differentiator for the "do update" vs "pull update" scenarios.

@evgeni
Copy link
Copy Markdown
Member

evgeni commented Oct 18, 2018

#145 should fix the tests for you.

@evgeni
Copy link
Copy Markdown
Member

evgeni commented Oct 18, 2018

Given no tests broke when you modified this behavior in #68, I think we should add tests for this branch of logic now?

Copy link
Copy Markdown
Member

@evgeni evgeni left a comment

Choose a reason for hiding this comment

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

APT


assert not os.path.exists('packages/hello/hello-2.9.tar.gz')
assert not os.path.islink('packages/hello/hello-2.9.tar.gz')
assert os.path.islink('packages/hello/hello-2.10.tar.gz')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you can't fetch hello.tar from example.com (and thus git-annex blows up), so maybe let's just skip this assert

@ehelms ehelms merged commit 920b1c6 into theforeman:master Oct 18, 2018
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.

2 participants