Bug 32433

Summary: rpm -U --replacepkgs --replacefiles can't bear self-conflicts (via virtual Provides)
Product: Sisyphus Reporter: Ivan Zakharyaschev <imz>
Component: rpmAssignee: placeholder <placeholder>
Status: NEW --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: at, glebfm, imz, ldv, placeholder, vt
Version: unstable   
Hardware: all   
OS: Linux   

Description Ivan Zakharyaschev 2016-08-25 20:09:28 MSK
[root@sogoserver ~]# rpm -qa 'apt-conf*'
apt-conf-branch-8.0.0-alt2
[root@sogoserver ~]# apt-get install --reinstall apt-conf-branch
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 removed and 1 not upgraded.
Need to get 0B/11,7kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue? [Y/n] 
	apt-conf-centaurus conflicts with apt-conf-branch-8.0.0-alt2
E: Transaction set check failed
[root@sogoserver ~]# apt-get install apt-conf-branch
Reading Package Lists... Done
Building Dependency Tree... Done
apt-conf-branch is already the newest version.
0 upgraded, 0 newly installed, 0 removed and 1 not upgraded.
[root@sogoserver ~]# rpm -qf "$(which apt-get)
> ^C
[root@sogoserver ~]# rpm -qf "$(which apt-get)"
apt-0.5.15lorg2-alt53
[root@sogoserver ~]# 

[root@sogoserver ~]# apt-cache showpkg apt-conf-branch 
Package: apt-conf-branch
Versions: 
8.0.0-alt2(/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_p8_branch_x86%5f64_base_pkglist.classic)(/var/lib/rpm/Packages)

Reverse Depends: 
  sisyphus-updates,apt-conf-branch 5.0-alt3
  altlinux-repos,apt-conf-branch 7.0.0-alt3
  alterator-pkg,apt-conf-branch 5.0-alt3
  alterator-mirror,apt-conf-branch 5.0-alt2
Dependencies: 
8.0.0-alt2 - /bin/sh (0 (null)) apt (1 0:0.5.15cnc6-alt14) apt-conf-sisyphus (0 (null)) apt-conf (3 0:4.0) apt-conf-Castle (0 (null)) apt-conf-Compact (0 (null)) apt-conf-Junior (0 (null)) apt-conf-Master (0 (null)) apt-conf-Spring (0 (null)) apt-conf-centaurus (0 (null)) apt-conf-desktop (0 (null)) apt-conf-hpc (0 (null)) apt-conf-junior (0 (null)) apt-conf-master (0 (null)) apt-conf-office-server (0 (null)) apt-conf-platform5 (0 (null)) apt-conf-school (0 (null)) apt-conf-server (0 (null)) apt-conf-terminal (0 (null)) apt-conf-centaurus (0 (null)) 
Provides: 
8.0.0-alt2 - apt-conf-branch apt-conf-centaurus /etc/apt/pkgpriorities apt-conf 
Reverse Provides: 
apt-conf-branch 8.0.0-alt2
[root@sogoserver ~]# apt-cache showpkg apt-conf-centaurus
Package: apt-conf-centaurus
Versions: 

Reverse Depends: 
  apt-conf-branch,apt-conf-centaurus
  apt-conf-branch,apt-conf-centaurus
Dependencies: 
Provides: 
Reverse Provides: 
apt-conf-branch 8.0.0-alt2
[root@sogoserver ~]# 

[root@sogoserver ~]# rpm -q apt-conf-branch --conflicts
apt <= 0:0.5.15cnc6-alt14
apt-conf-sisyphus  
apt-conf < 0:4.0
apt-conf-Castle  
apt-conf-Compact  
apt-conf-Junior  
apt-conf-Master  
apt-conf-Spring  
apt-conf-centaurus  
apt-conf-desktop  
apt-conf-hpc  
apt-conf-junior  
apt-conf-master  
apt-conf-office-server  
apt-conf-platform5  
apt-conf-school  
apt-conf-server  
apt-conf-terminal  
[root@sogoserver ~]# rpm -q apt-conf-branch --provides
apt-conf = 8.0.0-alt2
/etc/apt/pkgpriorities  
apt-conf-centaurus = 8.0.0-alt2
apt-conf-branch = 8.0.0-alt2
[root@sogoserver ~]# 

That's not even apt's problem, that's rpm's problem:

[root@sogoserver ~]# rpm -Uvh /var/cache/apt/archives/apt-conf-branch_8.0.0-alt2_x86%5f64_1460654251.rpm --replacepkgs --replacefiles 
error: failed dependencies:
	apt-conf-centaurus conflicts with apt-conf-branch-8.0.0-alt2
[root@sogoserver ~]# rpm -Uvh /var/cache/apt/archives/apt-conf-branch_8.0.0-alt2_x86%5f64_1460654251.rpm --replacepkgs --replacefiles --oldpackage 
error: failed dependencies:
	apt-conf-centaurus conflicts with apt-conf-branch-8.0.0-alt2
[root@sogoserver ~]# rpm -q rpm
rpm-4.0.4-alt100.93
[root@sogoserver ~]#