Bug 847996 - yum traceback if downloading existing package when offline
yum traceback if downloading existing package when offline
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: PackageKit (Show other bugs)
x86_64 Linux
unspecified Severity low
: beta
: 7.0
Assigned To: Richard Hughes
Desktop QE
Depends On:
  Show dependency treegraph
Reported: 2012-08-14 05:45 EDT by Vladimir Benes
Modified: 2012-11-01 06:22 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-01 06:22:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Vladimir Benes 2012-08-14 05:45:45 EDT
Description of problem:
when I execute pkcon download /tmp mc while offline I get ugly yum traceback and exit code is 0.. 

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

How reproducible:

Steps to Reproduce:
1.go offline
2.execute pkcon download /tmp mc

Actual results:
Fatal error: Error Type: <class 'yum.Errors.NoMoreMirrorsRepoError'>
Error Value: failure: Packages/mc-4.8.3-1.el7.x86_64.rpm from alpha2: [Errno 256] No more mirrors to try.
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 3633, in <module>
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 3630, in main
  File : /usr/lib/python2.7/site-packages/packagekit/backend.py, line 836, in dispatcher
    self.dispatch_command(args[0], args[1:])
  File : /usr/lib/python2.7/site-packages/packagekit/backend.py, line 664, in dispatch_command
    self.download_packages(directory, package_ids)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 1140, in download_packages
    path = repo.getPackage(pkg_download)
  File : /usr/lib/python2.7/site-packages/yum/yumRepo.py, line 957, in getPackage
  File : /usr/lib/python2.7/site-packages/yum/yumRepo.py, line 933, in _getFile
    raise Errors.NoMoreMirrorsRepoError, errstr

Expected results:
there should be error shown that you are not online or so.. exit code should be non-zero

Additional info:
Comment 1 Richard Hughes 2012-11-01 06:22:31 EDT
commit 03d1ca18ca13e9e6b005377ed87827bccb48c9af
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Nov 1 10:25:03 2012 +0000

    yum: Handle NoMoreMirrorsRepoError when using repo.getPackage()

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