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

opensuse: zypper --replacefiles #8685

Closed
wants to merge 1 commit into from
Closed

Conversation

zyga
Copy link
Collaborator

@zyga zyga commented May 15, 2020

I don't quite know why opensuse has a conflict between go 12 and 13 but
the alternative is probably the alternative system. Oh well, this fixes
master.

We should update all the images and remove this hack.

Signed-off-by: Zygmunt Krynicki me@zygoon.pl

I don't quite know why opensuse has a conflict between go 12 and 13 but
the alternative is probably the alternative system. Oh well, this fixes
master.

We should update all the images and remove this hack.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
@@ -287,7 +287,7 @@ distro_install_package() {
# --allow-downgrade will make the installation proceed

# shellcheck disable=SC2086
quiet zypper install -y --allow-downgrade --force-resolution $ZYPPER_FLAGS "${pkg_names[@]}"
quiet zypper install -y --allow-downgrade --force-resolution --replacefiles $ZYPPER_FLAGS "${pkg_names[@]}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have a log with the conflicts indentified by zypper?

@bboozzoo
Copy link
Collaborator

For reference:

2020-05-15T20:12:07.5676086Z Retrieving package libsmbldap2-32bit-4.12.2+git.152.c5bf9f6da52-1.1.x86_64 (122/123), 424.0 KiB ( 49.4 KiB unpacked)
2020-05-15T20:12:07.5676626Z Retrieving: libsmbldap2-32bit-4.12.2+git.152.c5bf9f6da52-1.1.x86_64.rpm [done]
2020-05-15T20:12:07.5677142Z Retrieving package samba-client-32bit-4.12.2+git.152.c5bf9f6da52-1.1.x86_64 (123/123), 411.0 KiB ( 13.4 KiB unpacked)
2020-05-15T20:12:07.5677602Z Retrieving: samba-client-32bit-4.12.2+git.152.c5bf9f6da52-1.1.x86_64.rpm [done]
2020-05-15T20:12:07.5677702Z 
2020-05-15T20:12:07.5677837Z Checking for file conflicts: [.............error]
2020-05-15T20:12:07.5677981Z Detected 2 file conflicts:
2020-05-15T20:12:07.5678105Z 
2020-05-15T20:12:07.5678336Z File /usr/bin/go
2020-05-15T20:12:07.5678554Z   from install of
2020-05-15T20:12:07.5678976Z      go1.12-1.12.17-3.2.x86_64 (repo-oss)
2020-05-15T20:12:07.5679117Z   conflicts with file from package
2020-05-15T20:12:07.5679500Z      go1.13-1.13.10-2.1.x86_64 (@System)
2020-05-15T20:12:07.5680071Z 
2020-05-15T20:12:07.5680181Z File /usr/bin/gofmt
2020-05-15T20:12:07.5680276Z   from install of
2020-05-15T20:12:07.5680541Z      go1.12-1.12.17-3.2.x86_64 (repo-oss)
2020-05-15T20:12:07.5680644Z   conflicts with file from package
2020-05-15T20:12:07.5680908Z      go1.13-1.13.10-2.1.x86_64 (@System)
2020-05-15T20:12:07.5680959Z 
2020-05-15T20:12:07.5681090Z File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.
2020-05-15T20:12:07.5681224Z Continue? [yes/no] (no): no
2020-05-15T20:12:07.5681274Z 
2020-05-15T20:12:07.5681372Z Problem occurred during or after installation or removal of packages:
2020-05-15T20:12:07.5681483Z Installation has been aborted as directed.
2020-05-15T20:12:07.5681580Z History:
2020-05-15T20:12:07.5681803Z  - ABORT request: 
2020-05-15T20:12:07.5681867Z 
2020-05-15T20:12:07.5681949Z Please see the above error message for a hint.
2020-05-15T20:12:07.5682055Z quiet: end of output.

@bboozzoo
Copy link
Collaborator

For some reason zypper insists on installing go 1.12 to satisfy the requirements, even though it lists multiple packages that match the query. I suppose go-1.12-1.1 is the closest match

google:opensuse-tumbleweed-64 .../mini/hello# zypper wp 'go >= 1.9'                                                                                                                             
Command 'what-provides' is replaced by 'search --provides --match-exact'.
See 'help search' for all available options.       
Loading repository data...                                             
Reading installed packages...                        
                                                                                               
S | Name   | Type    | Version     | Arch   | Repository
--+--------+---------+-------------+--------+-----------
  | go     | package | 1.12-1.1    | i586   | repo-oss            
  | go     | package | 1.12-1.1    | x86_64 | repo-oss                        
  | go1.10 | package | 1.10.8-5.2  | i586   | repo-oss
  | go1.10 | package | 1.10.8-5.2  | x86_64 | repo-oss
  | go1.11 | package | 1.11.13-8.2 | i586   | repo-oss    
  | go1.11 | package | 1.11.13-8.2 | x86_64 | repo-oss
  | go1.12 | package | 1.12.17-3.2 | i586   | repo-oss    
  | go1.12 | package | 1.12.17-3.2 | x86_64 | repo-oss                    
v | go1.13 | package | 1.13.11-1.1 | i586   | repo-oss           
i | go1.13 | package | 1.13.11-1.1 | x86_64 | repo-oss              
  | go1.14 | package | 1.14.2-2.2  | i586   | repo-oss               
  | go1.14 | package | 1.14.2-2.2  | x86_64 | repo-oss                          
  | go1.9  | package | 1.9.7-7.3   | i586   | repo-oss     
  | go1.9  | package | 1.9.7-7.3   | x86_64 | repo-oss       
google:opensuse-tumbleweed-64 .../mini/hello# zypper -vv in  'go >= 1.9'                                                                                                                        
Verbosity: 3
Non-option program arguments: 'go >= 1.9' 
Initializing Target
Checking whether to refresh metadata for repo-debug
Checking whether to refresh metadata for repo-non-oss
Checking whether to refresh metadata for repo-oss
Checking whether to refresh metadata for repo-update
Loading repository data...
Reading installed packages...
Force resolution: No
Selecting 'go-1.12-1.1.x86_64' from repository 'repo-oss' for installation.
Resolving package dependencies...
Force resolution: No
                                                                                               
The following package update will NOT be installed:
  google-compute-engine-oslogin  20200111-2.7  x86_64  Cloud:Tools (openSUSE_Tumbleweed)  obs://build.opensuse.org/Cloud
                                                                                               
The following 6 NEW packages are going to be installed:
  go           1.12-1.1     x86_64  repo-oss  openSUSE
  go-doc       1.12-1.1     x86_64  repo-oss  openSUSE
  go-race      1.12-1.1     x86_64  repo-oss  openSUSE         
  go1.12       1.12.17-3.2  x86_64  repo-oss  openSUSE
  go1.12-doc   1.12.17-3.2  x86_64  repo-oss  openSUSE
  go1.12-race  1.12.17-3.2  x86_64  repo-oss  openSUSE
                                                                                               
The following 2 recommended packages were automatically selected:
  go-doc      1.12-1.1     x86_64  repo-oss  openSUSE
  go1.12-doc  1.12.17-3.2  x86_64  repo-oss  openSUSE
                                                                                               
6 new packages to install.                    
Overall download size: 115.3 MiB. Already cached: 0 B. After the operation, additional 438.4 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): 

the info:

Information for package go:
---------------------------
Repository     : repo-oss
Name           : go
Version        : 1.12-1.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 82 B
Installed      : No
Status         : not installed
Source package : go-1.12-1.1.src
Summary        : A compiled, garbage-collected, concurrent programming language
Description    : 
    Go is an expressive, concurrent, garbage collected systems programming language
    that is type safe and memory safe. It has pointers but no pointer arithmetic.
    Go has fast builds, clean syntax, garbage collection, methods for any type, and
    run-time reflection. It feels like a dynamic language but has the speed and
    safety of a static language.
Provides       : [3]
    golang(API) = 1.12
    go = 1.12-1.1
    go(x86-64) = 1.12-1.1

For comparison trying to install a package that satisfies `golang(API) >= 1.9' is satisfied by the currently installed go1.13:

google:opensuse-tumbleweed-64 .../mini/hello# zypper in 'golang(API) >= 1.9'
Loading repository data...
Reading installed packages...
'golang(API) >= 1.9' not found in package names. Trying capabilities.
'go1.13' providing 'golang(API) >= 1.9' is already installed.
Resolving package dependencies...

Nothing to do.

Perhaps we should use golang(API) >= 1.9 then instead of go >= 1.9 ?

@zyga
Copy link
Collaborator Author

zyga commented May 18, 2020

Interesting observation and research @bboozzoo -- I'll check and ask my SUSE contacts and perhaps that is indeed the way forward.

@zyga
Copy link
Collaborator Author

zyga commented May 18, 2020

I had a look at this and we're just in an unlucky snapshot.

A zypper dup && zypper install 'go >=1.9' command passes correctly. The go in our image is incompatible with updates before being updated itself.

@zyga zyga closed this May 18, 2020
@zyga zyga deleted the fix/opensuse-pkgs branch May 18, 2020 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants