-
Notifications
You must be signed in to change notification settings - Fork 1k
package_manager version support added #18517
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
base: develop2
Are you sure you want to change the base?
package_manager version support added #18517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good
@@ -25,8 +25,6 @@ def system_requirements(self): | |||
print("missing:", not_installed) | |||
""")}) | |||
client.run("create . --name=test --version=1.0 -s:b arch=armv8 -s:h arch=x86") | |||
assert "dpkg-query: no packages found matching non-existing1:i386" in client.out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed these lines because dpkg -l
doesn't print anything if it doesn't find any package with the search pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
install_command = "{sudo}{tool} install -y {recommends}{packages}" | ||
update_command = "{sudo}{tool} update" | ||
check_command = "dpkg-query -W -f='${{Status}}' {package} | grep -q \"ok installed\"" | ||
check_command = "dpkg -l | grep -q -E \"^ii\\s+\\b{package}\\s+\\b\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the change to check_command
solve issues of the previous one, or is this change more to align it with the check_version_command
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is necessary to fix a false positive issue we had before. It is also to align with the way of checking the version of a package.
If your package had a default architecture that was implicit and the others were explicit, the old check found the default package substring within an installation for another architecture:
For example: foo
and foo:armv8
. The old check said that foo
was already installed if it found foo:armv8
.
arch_name=arch_name, | ||
version="", | ||
version_separator="") | ||
if version and self.check_version_command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should we output a warning message when we are specifying versions but the package manager does not support that?
Co-authored-by: James <[email protected]>
Co-authored-by: Carlos Zoido <[email protected]>
Changelog: Feature: Added support to the system_package tool for defining the system package version to be installed
Docs: conan-io/docs#4170
Close #17744
develop
branch, documenting this one.