conan: [bug] Build policy outdated builds test_package ever

Hi!

This issues came from https://github.com/conan-io/conan-package-tools/issues/434

As we know, Build Policies can influence the build action to Conan client. One of these policies is outdate, which is used to build ONLY a package that is outdated.

When running Conan Package Tools to build a list of packages, and using the outdated policy to avoid unnecessary jobs, Conan builds and run test_package, even when a package is not outdated.

Environment Details (include every applicable attribute)

  • Operating System+version: ANY
  • Compiler+version: ANY
  • Conan version: 1.20.4
  • Python version: 3.8.0

Steps to reproduce (Include if Applicable)

conan new -t foo/0.1.0
conan create . 
conan create . --build outdated

Actual Result

Conan build and run test_package even when a package is up-to-date and the build policy is “outdated”.

Expected Result

Conan should not build/run test package when build policy is “outdated”, and the current package is up-to-date.

Logs (Executed commands with output) (Include/Attach if Applicable)

conan-outdated.log

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments

I see, but it sounds a bit wrong, for instance, you run conan create --build outdated, which you want to say to Conan, “You must build ONLY IF a package is outdated”, So Conan follow the rule, but it build the test_package even if the package is up-to-date. Like, you don’t need to build the test, if my package is not outdated.

Anyway, I see your point, we can avoid it by extra argument, but it could be implicit for this case.