Bug 965114

Summary: When running dnf using file:/// as the media, it tries to erase packages in file:///
Product: [Fedora] Fedora Reporter: Norman Weathers <weathnr>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: akozumpl, jzeleny
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: hawkey-0.3.13-2.git15db39f.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-07 04:38:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Norman Weathers 2013-05-20 13:06:07 UTC
Description of problem:
While trying dnf to install a set of packages, I noticed during the installation that DNF tried to erase the packages from the Media where the packages were located.  If I had this shared media root writable, it would have deleted several packages from my synced repository.

Version-Release number of selected component (if applicable):
dnf-02.22-1.git97180b8.fc18

How reproducible:
Always

Steps to Reproduce:
1. create a local repository for Fedora
2. use dnf to install a new package
3. Between installation and verify, see the Cannot remove /....rpm

Actual results:
If the files would have been mounted rw, they may have been deleted.

Expected results:
Media listed as file:/// for yum repos are often shared filesystems (NFS, etc), dnf should not try and delete those files.

Additional info:
Here is the output from the dnf installation:

[root@homrlw01 ~]# dnf install gnome-rdp
Setting up Install Process
Resolving Dependencies
--> Starting dependency resolution
---> Package gnome-rdp.x86_64 0.2.3-10.fc17 will be installed
---> Package mono-data-sqlite.x86_64 2.10.8-3.fc18 will be installed
---> Package gnome-keyring-sharp.x86_64 1.0.1-0.11.133722svn.fc18 will be installed
---> Package gnome-desktop-sharp.x86_64 2.26.0-17.fc18 will be installed
---> Package gtk-sharp2.x86_64 2.12.11-6.fc18 will be installed
---> Package mono-core.x86_64 2.10.8-3.fc18 will be installed
---> Package gnome-sharp.x86_64 2.24.1-10.fc18 will be installed
---> Package gtksourceview2.x86_64 2.11.2-14.fc18 will be installed
---> Package libgdiplus.x86_64 2.10-6.fc18 will be installed
---> Package tigervnc-server.x86_64 1.2.80-0.10.20130314svn5065.fc18 will be installed
--> Finished dependency resolution

Dependencies Resolved

===========================================================================================================================================================================
 Package                                     Arch                           Version                                                  Repository                       Size
===========================================================================================================================================================================
Installing:
 gnome-desktop-sharp                         x86_64                         2.26.0-17.fc18                                           fedora                          127 k
 gnome-keyring-sharp                         x86_64                         1.0.1-0.11.133722svn.fc18                                fedora                           23 k
 gnome-rdp                                   x86_64                         0.2.3-10.fc17                                            fedora                          178 k
 gnome-sharp                                 x86_64                         2.24.1-10.fc18                                           fedora                          310 k
 gtk-sharp2                                  x86_64                         2.12.11-6.fc18                                           fedora                          680 k
 gtksourceview2                              x86_64                         2.11.2-14.fc18                                           fedora                          674 k
 libgdiplus                                  x86_64                         2.10-6.fc18                                              fedora                          159 k
 mono-core                                   x86_64                         2.10.8-3.fc18                                            fedora                           12 M
 mono-data-sqlite                            x86_64                         2.10.8-3.fc18                                            fedora                          106 k
 tigervnc-server                             x86_64                         1.2.80-0.10.20130314svn5065.fc18                         updates                         200 k

Transaction Summary
===========================================================================================================================================================================
Install  10 Packages

Total download size: 15 M
Installed size: 15 M
Is this ok [y/N]: y
Downloading Packages:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                       15 MB/s |  15 MB     00:00     
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
RPMDB altered outside of DNF.
  Installing : gtksourceview2-2.11.2-14.fc18.x86_64                                                                                                                   1/10 
  Installing : libgdiplus-2.10-6.fc18.x86_64                                                                                                                          2/10 
  Installing : mono-core-2.10.8-3.fc18.x86_64                                                                                                                         3/10 
  Installing : gtk-sharp2-2.12.11-6.fc18.x86_64                                                                                                                       4/10 
  Installing : gnome-keyring-sharp-1.0.1-0.11.133722svn.fc18.x86_64                                                                                                   5/10 
  Installing : gnome-sharp-2.24.1-10.fc18.x86_64                                                                                                                      6/10 
  Installing : gnome-desktop-sharp-2.26.0-17.fc18.x86_64                                                                                                              7/10 
  Installing : mono-data-sqlite-2.10.8-3.fc18.x86_64                                                                                                                  8/10 
  Installing : tigervnc-server-1.2.80-0.10.20130314svn5065.fc18.x86_64                                                                                                9/10 
  Installing : gnome-rdp-0.2.3-10.fc17.x86_64                                                                                                                        10/10 
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/g/gnome-keyring-sharp-1.0.1-0.11.133722svn.fc18.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/g/gnome-desktop-sharp-2.26.0-17.fc18.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/m/mono-core-2.10.8-3.fc18.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/updates/tigervnc-server-1.2.80-0.10.20130314svn5065.fc18.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/g/gnome-rdp-0.2.3-10.fc17.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/m/mono-data-sqlite-2.10.8-3.fc18.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/g/gtk-sharp2-2.12.11-6.fc18.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/l/libgdiplus-2.10-6.fc18.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/g/gnome-sharp-2.24.1-10.fc18.x86_64.rpm
Cannot remove /hpcadmin/kickstart/Fedora/18/x86_64/Everything/Packages/g/gtksourceview2-2.11.2-14.fc18.x86_64.rpm
  Verifying  : gnome-keyring-sharp-1.0.1-0.11.133722svn.fc18.x86_64                                                                                                   1/10 
  Verifying  : gnome-desktop-sharp-2.26.0-17.fc18.x86_64                                                                                                              2/10 
  Verifying  : mono-core-2.10.8-3.fc18.x86_64                                                                                                                         3/10 
  Verifying  : tigervnc-server-1.2.80-0.10.20130314svn5065.fc18.x86_64                                                                                                4/10 
  Verifying  : gnome-rdp-0.2.3-10.fc17.x86_64                                                                                                                         5/10 
  Verifying  : mono-data-sqlite-2.10.8-3.fc18.x86_64                                                                                                                  6/10 
  Verifying  : gtk-sharp2-2.12.11-6.fc18.x86_64                                                                                                                       7/10 
  Verifying  : libgdiplus-2.10-6.fc18.x86_64                                                                                                                          8/10 
  Verifying  : gnome-sharp-2.24.1-10.fc18.x86_64                                                                                                                      9/10 
  Verifying  : gtksourceview2-2.11.2-14.fc18.x86_64                                                                                                                  10/10 

Installed:
  gnome-desktop-sharp.x86_64 2.26.0-17.fc18  gnome-keyring-sharp.x86_64 1.0.1-0.11.133722svn.fc18     gnome-rdp.x86_64 0.2.3-10.fc17  gnome-sharp.x86_64 2.24.1-10.fc18 
  gtk-sharp2.x86_64 2.12.11-6.fc18           gtksourceview2.x86_64 2.11.2-14.fc18                     libgdiplus.x86_64 2.10-6.fc18   mono-core.x86_64 2.10.8-3.fc18    
  mono-data-sqlite.x86_64 2.10.8-3.fc18      tigervnc-server.x86_64 1.2.80-0.10.20130314svn5065.fc18 

Complete!


NOtice the Cannot remove /hpcadmin/kickstart/Fedora  lines between Installing and Verifying.

Comment 1 Norman Weathers 2013-05-20 13:07:20 UTC
/etc/yum.repos.d/fedora.repo is as follows:

[root@homrlw01 ~]# cat /etc/yum.repos.d/fedora.repo 
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl=file:///hpcadmin/kickstart/Fedora/18/x86_64/Everything
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
#metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

Comment 2 Ales Kozumplik 2013-05-21 10:44:43 UTC
Thanks for the report, in F19 this is actually even more broken and DNF won't even see these files. Fixing now.

Comment 3 Ales Kozumplik 2013-05-21 12:48:14 UTC
Both problems fixed by 965114, will be included in dnf-0.3.6.

Comment 4 Fedora Update System 2013-05-27 13:21:40 UTC
hawkey-0.3.13-2.git15db39f.fc19, dnf-0.3.6-1.git24ce938.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/dnf-0.3.6-1.git24ce938.fc19,hawkey-0.3.13-2.git15db39f.fc19

Comment 5 Fedora Update System 2013-05-27 17:03:43 UTC
Package hawkey-0.3.13-2.git15db39f.fc19, dnf-0.3.6-1.git24ce938.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.3.13-2.git15db39f.fc19 dnf-0.3.6-1.git24ce938.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9385/dnf-0.3.6-1.git24ce938.fc19,hawkey-0.3.13-2.git15db39f.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-05-29 17:48:55 UTC
Package hawkey-0.3.13-2.git15db39f.fc19, dnf-0.3.7-1.gitf8bdc98.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.3.13-2.git15db39f.fc19 dnf-0.3.7-1.gitf8bdc98.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9385/hawkey-0.3.13-2.git15db39f.fc19,dnf-0.3.7-1.gitf8bdc98.fc19
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-06-07 04:38:12 UTC
hawkey-0.3.13-2.git15db39f.fc19, dnf-0.3.7-1.gitf8bdc98.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.