Bug 996495 - mock problem removing local repository packages
mock problem removing local repository packages
Status: CLOSED DUPLICATE of bug 977007
Product: Fedora EPEL
Classification: Fedora
Component: mock (Show other bugs)
el6
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-13 05:46 EDT by Sergio Freire
Modified: 2014-11-18 13:38 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-11-18 13:38:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sergio Freire 2013-08-13 05:46:05 EDT
Description of problem:
If you install a local repository, you are unable to remove it.


Version-Release number of selected component (if applicable):
1.1.32

How reproducible:
Always

Steps to Reproduce:
1. install a local repository, using a RPMm


[root@cte-dev-evl-mm2 ~]# cat /etc/yum.repos.d/repo-local.repo
[repo-local]
name=repo-local - el6
baseurl=file:///var/lib/repo-local/repo
gpgcheck=0
enabled=1

[root@cte-dev-evl-mm2 ~]# rpm -q --scripts repo-local
postinstall scriptlet (using /bin/sh):
createrepo /var/lib/repo-local/repo >/dev/null

2. 
 mock -r ptin-5-x86_64 --init
 mock -r ptin-5-x86_64 --install repo-local

3.
 mock -r ptin-5-x86_64 --remove repo-local

-bash-4.1$ mock -r ptin-5-x86_64 --remove repo-local
INFO: mock.py version 1.1.32 starting...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Mock Version: 1.1.32
INFO: Mock Version: 1.1.32
Start: lock buildroot
INFO: removing package(s): repo-local
ERROR: Command failed:
 # ['/usr/bin/yum', '--installroot', '/var/lib/mock/ptin-5-x86_64/root/', 'remove', 'repo-local']
file:///var/lib/repo-local/repo/repodata/repomd.xml: [Errno 14] Could not open/read file:///var/lib/repo-local/repo/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: repo-local. Please verify its path and try again
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

4. install repo-local in the host
# yum install repo-local

-bash-4.1$ ll /var/lib/repo-local
total 20
drwxr-xr-x 3 root root 4096 Aug 13 10:41 repo
-rw-r--r-- 1 root root  523 Nov  5  2012 repo-local-httpd.conf.sample
-rw-r--r-- 1 root root  244 Nov  5  2012 repo-local-nginx.conf.sample
-rw-r--r-- 1 root root  136 Nov  5  2012 repo-local.repo.sample
drwxr-xr-x 3 root root 4096 Aug 13 10:41 testing
-bash-4.1$

5. try to remove again the repo-local package in the chroot

-bash-4.1$ mock -r ptin-5-x86_64 --remove repo-local
INFO: mock.py version 1.1.32 starting...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Mock Version: 1.1.32
INFO: Mock Version: 1.1.32
Start: lock buildroot
INFO: removing package(s): repo-local
Start: Outputting list of available packages
Finish: Outputting list of available packages
INFO:
================================================================================
 Package             Arch            Version               Repository      Size
================================================================================
Removing:
 repo-local          noarch          7-1.ptin.el5          @ptin          2.0 k

Transaction Summary
================================================================================
Remove        1 Package(s)

Installed size: 2.0 k
could not open ts_done file: [Errno 2] No such file or directory: '/var/lib/mock/ptin-5-x86_64/root/var/lib/yum/transaction-done.2013-08-13.10:41.22'

Removed:
  repo-local.noarch 0:7-1.ptin.el5


Finish: lock buildroot
Finish: run



Actual results:
mock fails to remove the package.

Expected results:
package should be removed normally.

Additional info:
it seems mock is looking at the host diretories whenever acting on local repositories.
this bug does not seem to happen for a a EL6 mock environment.
Comment 1 Miroslav Suchý 2014-11-18 13:38:22 EST

*** This bug has been marked as a duplicate of bug 977007 ***

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