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

Versions conflict #5

Closed
a-lyupa opened this issue Jul 12, 2018 · 6 comments
Closed

Versions conflict #5

a-lyupa opened this issue Jul 12, 2018 · 6 comments
Assignees
Labels

Comments

@a-lyupa
Copy link
Contributor

a-lyupa commented Jul 12, 2018

There are different versions of libmm-sound in san- and unified- repos:

./combireposQZlEvrepository/armv7l/libmm-sound-sdk-devel-0.12.22-37.1.armv7l.rpm
./combireposQZlEvrepository/armv7l/libmm-sound-devel-0.12.22-37.1.armv7l.rpm
./combireposQZlEvrepository/armv7l/libmm-sound-0.12.22-37.1.armv7l.rpm
./combireposQZlEvrepository/armv7l/libmm-sound-tool-0.12.22-37.1.armv7l.rpm
./combirepo7mmhr5repository/armv7l/libmm-sound-tool-0.12.19-2.9.armv7l.rpm
./combirepo7mmhr5repository/armv7l/libmm-sound-0.12.19-2.9.armv7l.rpm
./combirepo7mmhr5repository/armv7l/libmm-sound-sdk-devel-0.12.19-2.9.armv7l.rpm
./combirepo7mmhr5repository/armv7l/libmm-sound-devel-0.12.19-2.9.armv7l.rpm`

--preferring-strategy big is set.

In case of --mirror option an image is built successfully but in case of --greedy there is an error because of different versions of the same packages:

ERROR:root:Found 7 packages with different version numbers!
ERROR:root: libmm-sound                    0.12.22 0.12.19
...
ERROR:root:Please go and rebuild them!

@ilya-palachev , could you comment this case?

@ilya-palachev
Copy link

ilya-palachev commented Jul 12, 2018

Hi, Anastasia.
Yes, it's a bit tricky heuristics :)

The reason is the following:

  1. --greedy option means that combirepo marks the maximum set of packages, i.e. tries to get as many packages from marked ( = sanitized) repository as possible.
  2. --mirror option means that combirepo gets non-marked packages instead of marked ones, if some package doesn't present in the marked repository.
  3. The error Found 7 packages with different version numbers! is generated by method check_rpm_versions, which checks only marked packages for equality of version numbers (see this line, where it's called). For each marked package this method checks its version number in marked and non-marked repository, and asks the developer to make them equal. If I recall correctly, at the stage of combirepo design and development this feature was needed to prevent image creation with different versions. This is needed to make debugging of package correct: if versions of the package are different, we cannot provide the correctness of its testing in the combined image.

As I guess, libmm-sound-* packages weren't marked when --mirror option was specified, because ks file didn't contain explicit mention of that packages. But with --greedy option, libmm-sound-* packages were marked, and repository combiner checked them for version correspondence.

So you have three options:

  1. Actually rebuild libmm-sound-* packages in marked ( = sanitized) repository, so that to make versions correspond to each other.
  2. Temporarily disable check_rpm_versions and see to what consequences that will lead. I believe that either mic will fail during image creation phase, or there will be some run-time error. Moreover, as I remember, mic error logs about non-equal versions are very strange and hard to debug, because mic reports not the root cause of the error. There is some tricky way to debug it, I can describe if needed.
  3. Implement heuristic that will exclude package from marked set, if there is a version conflict. I.e. take non-marked package if marked one has a version conflict.

Hope this comment will help.

@a-lyupa
Copy link
Contributor Author

a-lyupa commented Jul 12, 2018

@ilya-palachev,
Thank you for a such detailed response!

@a-lyupa
Copy link
Contributor Author

a-lyupa commented Jul 13, 2018

@ilya-palachev , @rayslava ,
What if replace critical error of version mismatch with warning, unmark such packages and continue building an image?

@rayslava
Copy link
Contributor

I don't think that implicitly changing user request is a good idea. At least by default, may be we can add flag to convert it into warning.

@ilya-palachev
Copy link

Maybe, a trade-off would be, when both --mirror and --greedy options are specified, to take non-marked package when its version conflicts with marked one's.

@a-lyupa
Copy link
Contributor Author

a-lyupa commented Jul 23, 2018

Added a new option to skip version mismatch
#9

@a-lyupa a-lyupa closed this as completed Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants