Bug 853661 - _all_urls_are_files is used in a scope where it is not defined
_all_urls_are_files is used in a scope where it is not defined
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-09-01 16:54 EDT by Bruno Wolff III
Modified: 2014-10-03 10:17 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-10-03 10:17:26 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 Bruno Wolff III 2012-09-01 16:54:34 EDT
Description of problem:
When doing a yum update using just local repos I get the following error:
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 319, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 227, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 559, in doTransaction
    problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb) 
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2308, in downloadPkgs
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 984, in getPackage
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 907, in _getFile
    if size and (copy_local or not _all_urls_are_files(url)):
NameError: global name '_all_urls_are_files' is not defined

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

How reproducible:
Seems to happen all of the time with local repos. I am not sure if it happens when using remote repos.
Comment 1 Ricky Elrod 2012-09-01 18:02:41 EDT
Seeing this as well.

Simple fix:

On line 907 of /usr/lib/python2.7/site-packages/yum/yumRepo.py

        if size and (copy_local or not _all_urls_are_files(url)):

        if size and (copy_local or not self._all_urls_are_files(url)):

and it seems to work.
Comment 2 Andre Robatino 2012-09-02 10:59:21 EDT
Change in comment 1 is applied in yum-3.4.3-42.fc19.noarch and it appears fixed.
Comment 3 Fedora End Of Life 2013-04-03 12:56:52 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:

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