Remove extra dependencies
There is a sorted dict implementation in Productmd used to achieve the exact same thing as Pungi does here. No need for an extra dependency. While we're at it, we can also sort the imports. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
d6e72c8e61
commit
e78f8d1f13
@ -21,7 +21,6 @@ BuildRequires: python2-libcomps
|
||||
BuildRequires: python2-six
|
||||
BuildRequires: python2-multilib
|
||||
BuildRequires: python2-dogpile-cache
|
||||
BuildRequires: python2-dict-sorted
|
||||
|
||||
Requires: createrepo >= 0.4.11
|
||||
Requires: yum => 3.4.3-28
|
||||
@ -52,7 +51,6 @@ Requires: python2-multilib
|
||||
Requires: python2-libcomps
|
||||
Requires: python2-six
|
||||
Requires: python2-dogpile-cache
|
||||
Requires: python2-dict-sorted
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
@ -14,23 +14,23 @@
|
||||
# along with this program; if not, see <https://gnu.org/licenses/>.
|
||||
|
||||
|
||||
import yum
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import pungi.util
|
||||
import lockfile
|
||||
import logging
|
||||
import urlgrabber.progress
|
||||
import subprocess
|
||||
import createrepo
|
||||
import ConfigParser
|
||||
from sdict import AlphaSortedDict
|
||||
import sys
|
||||
from fnmatch import fnmatch
|
||||
|
||||
import createrepo
|
||||
import lockfile
|
||||
import urlgrabber.progress
|
||||
import yum
|
||||
from productmd.common import SortedConfigParser
|
||||
|
||||
import arch as arch_module
|
||||
import multilib_yum as multilib
|
||||
import pungi.util
|
||||
|
||||
|
||||
class ReentrantYumLock(object):
|
||||
@ -87,17 +87,6 @@ def is_package(po):
|
||||
return True
|
||||
|
||||
|
||||
class MyConfigParser(ConfigParser.ConfigParser):
|
||||
"""A subclass of ConfigParser which does not lowercase options"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['dict_type'] = AlphaSortedDict
|
||||
ConfigParser.ConfigParser.__init__(self, *args, **kwargs)
|
||||
|
||||
def optionxform(self, optionstr):
|
||||
return optionstr
|
||||
|
||||
|
||||
FLAGS = {
|
||||
'EQ': '=',
|
||||
'GE': '>=',
|
||||
@ -1611,7 +1600,7 @@ class Pungi(PungiBase):
|
||||
|
||||
# Create a ConfigParser object out of the contents so that we can
|
||||
# write it back out later and not worry about formatting
|
||||
treeinfo = MyConfigParser()
|
||||
treeinfo = SortedConfigParser()
|
||||
treeinfo.readfp(treefile)
|
||||
treefile.close()
|
||||
treeinfo.add_section('checksums')
|
||||
|
Loading…
Reference in New Issue
Block a user