cros ca: Check venv version based on libraries

Change the version check logic to use the dependent library
file (requirements.in), instead of using the timestamp. With
this change, even the venv has a newer timestamp on the host,
as long as the libraries are the same, DUT won't update the
venv. This will save the venv update time during test.

BUG=b:345846130
TEST=create new venv and ensure there is no update on DUTs

Change-Id: I7effdc0d4193eea5fbd4a64f82c45a237c443840
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/5664037
Commit-Queue: Xibin Liu <xibin@google.com>
Reviewed-by: Willis Kung <williskung@google.com>
Tested-by: Xibin Liu <xibin@google.com>
3 files changed