Bug 1096524 - mockchain traceback
Summary: mockchain traceback
Status: CLOSED DUPLICATE of bug 1034805
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 20
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-05-11 15:55 UTC by Daniel Narvaez
Modified: 2014-05-12 07:59 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-05-12 07:59:30 UTC
Type: Bug

Attachments (Terms of Use)

Description Daniel Narvaez 2014-05-11 15:55:10 UTC
[root@localhost ~]# /usr/bin/mockchain -r fedora-19-armhfp -l /var/tmp/mockremote-CZCJ0/build/ -a http://fedora.sugarlabs.org/out/ http://fedora.sugarlabs.org/out/rpmbuild/SRPMS/sugar-0.101.7-6.20140511gite85c062.fc20.src.rpm
starting logfile: None
results dir: /var/tmp/mockremote-CZCJ0/build/results/fedora-19-armhfp
config dir: /var/tmp/mockremote-CZCJ0/build/configs/fedora-19-armhfp
Traceback (most recent call last):
  File "/usr/bin/mockchain", line 353, in <module>
  File "/usr/bin/mockchain", line 252, in main
    res, msg =  add_local_repo(my_mock_config, my_mock_config, baseurl)
  File "/usr/bin/mockchain", line 106, in add_local_repo
    repoid = re.sub(r'[^a-zA-Z0-9_]', '', repoid)
  File "/usr/lib/python2.7/re.py", line 151, in sub
    return _compile(pattern, flags).sub(repl, string, count)

Seems to be caused by the following change. (Maybe the intention was to also keep the removed line?). 

commit 9db6edb33cc34a450e762eb5d2bedf9067ebc419
Author: Miroslav Suchý <msuchy@redhat.com>
Date:   Sat Jan 4 14:48:58 2014 -0600

    mockchain: Do not pass $ to repo id in mockchain [BZ# 1034805]
    remove special characters when constructing the internal id for
    a repo from the passed in parameter 'repoid'
    Signed-off-by: Clark Williams <clark.williams@gmail.com>

diff --git a/py/mockchain.py b/py/mockchain.py
index df66746..f13293a 100755
--- a/py/mockchain.py
+++ b/py/mockchain.py
@@ -102,7 +102,7 @@ def add_local_repo(infile, destfile, baseurl, repoid=None):
         if not repoid:
-            repoid=baseurl.split('//')[1].replace('/','_')
+            repoid = re.sub(r'[^a-zA-Z0-9_]', '', repoid)

Comment 1 Miroslav Suchý 2014-05-12 07:59:30 UTC

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

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