Bug 28522 - File conflicts with opencv-devel cause cascading errors during upgrade from Mageia 7 to 8
Summary: File conflicts with opencv-devel cause cascading errors during upgrade from M...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: High critical
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA8-64-OK
Keywords: IN_ERRATA8, advisory, validated_update
Depends on:
Blocks: 28393
  Show dependency treegraph
 
Reported: 2021-03-05 03:41 CET by Dave Hodgins
Modified: 2021-03-31 11:01 CEST (History)
6 users (show)

See Also:
Source RPM: opencv-4.5.1-1.mga8
CVE:
Status comment:


Attachments

Description Dave Hodgins 2021-03-05 03:41:34 CET
As reported in bug 28485, there are file conflicts between the Mageia 7 and 8
versions of opencv-devel.

file /usr/include/opencv2 from install of opencv-devel-4.5.1-1.mga8.x86_64 conflicts with file from package opencv-devel-3.4.5-2.1.mga7.x86_64

The problem there is that the directory /usr/include/opencv2 is being replaced
by a symlink /usr/include/opencv2 -> opencv4/opencv2/
so proper conflicts are needed.

As file conflicts cause all packages that happen to be in the same transaction
to fail to be installed, it can result in a partial upgrade which leaves rpm
unable to be used as happened in the report.

Since opencv doesn't have a maintainer assigning to all packagers.

This must be fixed before upgrading using mgaapplet can be enabled.
Dave Hodgins 2021-03-05 03:52:29 CET

Priority: Normal => High

Comment 1 David GEIGER 2021-03-05 06:17:01 CET
Should be fixed with upcoming opencv-4.5.1-1.1.mga8 in Core/Updates_testing repo!

CC: (none) => geiger.david68210

Morgan Leijström 2021-03-05 15:00:09 CET

Keywords: (none) => IN_ERRATA8
CC: (none) => fri

Comment 2 Aurelien Oudelet 2021-03-05 15:43:46 CET
Installing updated packages over existing:

lib64opencv_video4.5-4.5.1-1.1.mga8
lib64opencv_objdetect4.5-4.5.1-1.1.mga8
lib64opencv_calib3d4.5-4.5.1-1.1.mga8
lib64opencv_imgcodecs4.5-4.5.1-1.1.mga8
lib64opencv_highgui4.5-4.5.1-1.1.mga8
lib64opencv_features2d4.5-4.5.1-1.1.mga8
lib64opencv_dnn4.5-4.5.1-1.1.mga8
lib64opencv_imgproc4.5-4.5.1-1.1.mga8
lib64opencv_flann4.5-4.5.1-1.1.mga8
lib64opencv_core4.5-4.5.1-1.1.mga8

on Mageia 8 Plasma x86_64 does not produce any issue.

CC: (none) => ouaurelien

Manuel Hiebel 2021-03-05 18:31:18 CET

Blocks: (none) => 28393

Comment 3 Dave Hodgins 2021-03-05 20:09:50 CET
Still fails on m7 to m8 upgrade of an install with opencv-devel installed.
Installation failed:    file /usr/include/opencv2 from install of opencv-devel-4.5.1-1.1.mga8.x86_64 conflicts with file from package opencv-devel-3.4.5-2.1.mga7.x86_64

Keywords: (none) => feedback

Comment 4 Aurelien Oudelet 2021-03-05 20:12:04 CET
(In reply to Dave Hodgins from comment #3)
> Still fails on m7 to m8 upgrade of an install with opencv-devel installed.
> Installation failed:    file /usr/include/opencv2 from install of
> opencv-devel-4.5.1-1.1.mga8.x86_64 conflicts with file from package
> opencv-devel-3.4.5-2.1.mga7.x86_64

With 8/core/updates_testing repositories enabled at update time?
Comment 5 Dave Hodgins 2021-03-06 03:24:39 CET
(In reply to Aurelien Oudelet from comment #4)
> (In reply to Dave Hodgins from comment #3)
> > Still fails on m7 to m8 upgrade of an install with opencv-devel installed.
> > Installation failed:    file /usr/include/opencv2 from install of
> > opencv-devel-4.5.1-1.1.mga8.x86_64 conflicts with file from package
> > opencv-devel-3.4.5-2.1.mga7.x86_64
> 
> With 8/core/updates_testing repositories enabled at update time?

Yes or opencv-devel-4.5.1-1.1.mga8.x86_64.rpm wouldn't have been found as
shown in the error message.
Comment 6 Dave Hodgins 2021-03-08 14:40:20 CET
Did more digging. It's obsoletes rather then conflicts that's needed.
Obsoletes: opencv-devel < 4.5.1
instead of
Conflicts: opencv-devel < 4.5.1
Comment 7 Jani Välimaa 2021-03-10 20:41:49 CET
Pkg foo always obsoletes previous versions of foo. A %pretrans lua scriptlet is needed when replacing file/directory with a symlink.

https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/#_scriptlet_to_replace_a_directory

CC: (none) => jani.valimaa

Comment 8 Aurelien Oudelet 2021-03-19 14:06:32 CET
Installation failed:

file /usr/include/opencv2 from install of opencv-devel-4.5.1-1.1.mga8.x86_64 conflicts with file from package opencv-devel-3.4.5-2.1.mga7.x86_64

This is still the case.

BUT as this is a -devel package and not installed on a default Mageia 7 installation...
Ping?
Comment 9 Nicolas Lécureuil 2021-03-24 12:56:11 CET
Wally, can you do this ?

CC: (none) => mageia

Comment 10 Dave Hodgins 2021-03-25 15:32:42 CET
Ping. This is still causing a cascading error during upgrade. In my latest test
the upgrade appeared to complete ok, but after rebooting into the upgraded system
the desktop fails to load leaving just a black screen, with no menu or context
menu working.

Out of just over 2,500 packages included in this upgrade test this was the only
remaining file conflict.
Comment 11 Jani Välimaa 2021-03-25 20:19:39 CET
Please test with opencv-4.5.1-1.2.mga8 from core/updates_testing.

Assignee: pkg-bugs => qa-bugs

Aurelien Oudelet 2021-03-25 21:38:51 CET

Keywords: feedback => (none)

Comment 12 Dave Hodgins 2021-03-27 02:36:53 CET
Fails with Installation failed:    file /usr/include/opencv2 from install of opencv-devel-4.5.1-1.2.mga8.x86_64 conflicts with file from package opencv-devel-3.4.5-2.1.mga7.x86_64
Comment 13 Dave Hodgins 2021-03-27 03:17:27 CET
Fedora has documentation on how to replace a directory with a symlink
https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
Comment 14 Jani Välimaa 2021-03-27 20:48:01 CET
(In reply to Dave Hodgins from comment #13)
> Fedora has documentation on how to replace a directory with a symlink
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> Directory_Replacement/

Yep, see comment 7. Lua scriptlet was used, but os.remove() can't remove directories unless they're empty.

Lets see if opencv-4.5.1-1.3.mga8 works better.
Comment 15 Jani Välimaa 2021-03-28 10:23:02 CEST
I had no issues when upgrading my mga7 dev chroot to mga8 with opencv-devel installed.

SRPMS:
opencv-4.5.1-1.3.mga8

RPMS:
opencv-4.5.1-1.3.mga8
opencv-devel-4.5.1-1.3.mga8
opencv-samples-4.5.1-1.3.mga8
python3-opencv-4.5.1-1.3.mga8
lib(64)opencv_alphamat4.5-4.5.1-1.3.mga8
lib(64)opencv_aruco4.5-4.5.1-1.3.mga8
lib(64)opencv_bgsegm4.5-4.5.1-1.3.mga8
lib(64)opencv_bioinspired4.5-4.5.1-1.3.mga8
lib(64)opencv_calib3d4.5-4.5.1-1.3.mga8
lib(64)opencv_ccalib4.5-4.5.1-1.3.mga8
lib(64)opencv_core4.5-4.5.1-1.3.mga8
lib(64)opencv_datasets4.5-4.5.1-1.3.mga8
lib(64)opencv_dnn4.5-4.5.1-1.3.mga8
lib(64)opencv_dnn_objdetect4.5-4.5.1-1.3.mga8
lib(64)opencv_dnn_superres4.5-4.5.1-1.3.mga8
lib(64)opencv_dpm4.5-4.5.1-1.3.mga8
lib(64)opencv_face4.5-4.5.1-1.3.mga8
lib(64)opencv_features2d4.5-4.5.1-1.3.mga8
lib(64)opencv_flann4.5-4.5.1-1.3.mga8
lib(64)opencv_freetype4.5-4.5.1-1.3.mga8
lib(64)opencv_fuzzy4.5-4.5.1-1.3.mga8
lib(64)opencv_gapi4.5-4.5.1-1.3.mga8
lib(64)opencv_hfs4.5-4.5.1-1.3.mga8
lib(64)opencv_highgui4.5-4.5.1-1.3.mga8
lib(64)opencv_imgcodecs4.5-4.5.1-1.3.mga8
lib(64)opencv_img_hash4.5-4.5.1-1.3.mga8
lib(64)opencv_imgproc4.5-4.5.1-1.3.mga8
lib(64)opencv_intensity_transform4.5-4.5.1-1.3.mga8
lib(64)opencv_line_descriptor4.5-4.5.1-1.3.mga8
lib(64)opencv_mcc4.5-4.5.1-1.3.mga8
lib(64)opencv_ml4.5-4.5.1-1.3.mga8
lib(64)opencv_objdetect4.5-4.5.1-1.3.mga8
lib(64)opencv_optflow4.5-4.5.1-1.3.mga8
lib(64)opencv_phase_unwrapping4.5-4.5.1-1.3.mga8
lib(64)opencv_photo4.5-4.5.1-1.3.mga8
lib(64)opencv_plot4.5-4.5.1-1.3.mga8
lib(64)opencv_quality4.5-4.5.1-1.3.mga8
lib(64)opencv_rapid4.5-4.5.1-1.3.mga8
lib(64)opencv_reg4.5-4.5.1-1.3.mga8
lib(64)opencv_rgbd4.5-4.5.1-1.3.mga8
lib(64)opencv_saliency4.5-4.5.1-1.3.mga8
lib(64)opencv_shape4.5-4.5.1-1.3.mga8
lib(64)opencv_stereo4.5-4.5.1-1.3.mga8
lib(64)opencv_stitching4.5-4.5.1-1.3.mga8
lib(64)opencv_structured_light4.5-4.5.1-1.3.mga8
lib(64)opencv_superres4.5-4.5.1-1.3.mga8
lib(64)opencv_surface_matching4.5-4.5.1-1.3.mga8
lib(64)opencv_text4.5-4.5.1-1.3.mga8
lib(64)opencv_tracking4.5-4.5.1-1.3.mga8
lib(64)opencv_video4.5-4.5.1-1.3.mga8
lib(64)opencv_videoio4.5-4.5.1-1.3.mga8
lib(64)opencv_videostab4.5-4.5.1-1.3.mga8
lib(64)opencv_ximgproc4.5-4.5.1-1.3.mga8
lib(64)opencv_xobjdetect4.5-4.5.1-1.3.mga8
lib(64)opencv_xphoto4.5-4.5.1-1.3.mga8
Comment 16 Dave Hodgins 2021-03-28 21:35:23 CEST
Yeah!

1612/2513: opencv-devel          #############################################
    16/37: removing opencv-devel-3.4.5-2.1.mga7.x86_64
[root@localhost ~]# rpm -q opencv-devel
opencv-devel-4.5.1-1.3.mga8

Validating the update.

Whiteboard: (none) => MGA8-64-OK
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 17 Dave Hodgins 2021-03-30 00:26:08 CEST
Advisory committed to svn

Keywords: (none) => advisory

Comment 18 Mageia Robot 2021-03-30 22:10:44 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2021-0056.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 19 Morgan Leijström 2021-03-31 11:01:11 CEST
In Errata marked as fixed by update

Note You need to log in before you can comment on or make changes to this bug.