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

Parse dependency architecture even without version #868

Merged
merged 2 commits into from
Sep 6, 2019

Conversation

rmedaer
Copy link
Contributor

@rmedaer rmedaer commented Aug 13, 2019

This commit closes: #145

Description of the Change

The dependency format "pkg:arch" (e.g. "python3:any") was not well parsed if not any version is given. This commit splits the dependency name and architecture in all cases.

Checklist

  • unit-test added (if change is algorithm)
  • functional test added/updated (if change is functional)
  • man page updated (if applicable)
  • bash completion updated (if applicable)
  • documentation updated
  • author name in AUTHORS

@codecov
Copy link

codecov bot commented Aug 13, 2019

Codecov Report

Merging #868 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #868      +/-   ##
==========================================
+ Coverage   63.79%   63.81%   +0.01%     
==========================================
  Files          54       54              
  Lines        6662     6665       +3     
==========================================
+ Hits         4250     4253       +3     
  Misses       1887     1887              
  Partials      525      525
Impacted Files Coverage Δ
deb/version.go 92.35% <100%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ae5a12...a05cc3a. Read the comment docs.

Copy link
Contributor

@smira smira left a comment

Choose a reason for hiding this comment

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

thanks, the change looks good to me, but could you please add a unit-test to deb/version_test.go to make sure python:any (and other similar) are now properly parsed?

rmedaer added a commit to rmedaer/aptly that referenced this pull request Sep 6, 2019
@rmedaer
Copy link
Contributor Author

rmedaer commented Sep 6, 2019

I added a test in DependencyString. Here is the result without my PR:

FAIL: version_test.go:227: VersionSuite.TestDependencyString

version_test.go:237:
    c.Check(d.Pkg, Equals, "dpkg")
... obtained string = "dpkg:any"
... expected string = "dpkg"

OOPS: 159 passed, 1 FAILED
--- FAIL: Test (5.36s)
FAIL
exit status 1
FAIL	github.com/aptly-dev/aptly/deb	5.369s

and with my PR:

OK: 160 passed
PASS
ok  	github.com/aptly-dev/aptly/deb	5.266s

@smira
Copy link
Contributor

smira commented Sep 6, 2019

@rmedaer thanks, would you mind rebasing your PR and resolving conflicts so that it can be merged?

@smira smira added this to the 1.5.0 milestone Sep 6, 2019
@smira smira added the 1.5.0 label Sep 6, 2019
This commit closes: aptly-dev#145

The dependency format "pkg:arch" (e.g. "python3:any") was not well
parsed if not any version is given. This commit splits the dependency
name and architecture in all cases.
@rmedaer
Copy link
Contributor Author

rmedaer commented Sep 6, 2019

@smira it should be OK right now !

Copy link
Contributor

@smira smira left a comment

Choose a reason for hiding this comment

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

thanks!

@smira smira merged commit bde6e6b into aptly-dev:master Sep 6, 2019
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.

Aptly snapshot verify misses "python:any"
2 participants