Whitespace fixes
This patch fixes some issues with inconsistent use of whitespace. It only modifies lines that do not contain any code to not break git blame too much. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
68115f3502
commit
c55ed742cd
@ -87,6 +87,7 @@ def is_genisoimage_needed(conf):
|
|||||||
def is_createrepo_c_needed(conf):
|
def is_createrepo_c_needed(conf):
|
||||||
return conf.get('createrepo_c', True)
|
return conf.get('createrepo_c', True)
|
||||||
|
|
||||||
|
|
||||||
# The first element in the tuple is package name expected to have the
|
# The first element in the tuple is package name expected to have the
|
||||||
# executable (2nd element of the tuple). The last element is an optional
|
# executable (2nd element of the tuple). The last element is an optional
|
||||||
# function that should determine if the tool is required based on
|
# function that should determine if the tool is required based on
|
||||||
|
@ -1435,34 +1435,32 @@ class Pungi(PungiBase):
|
|||||||
# setup the repoview call
|
# setup the repoview call
|
||||||
repoview = ['/usr/bin/repoview']
|
repoview = ['/usr/bin/repoview']
|
||||||
repoview.append('--quiet')
|
repoview.append('--quiet')
|
||||||
|
|
||||||
repoview.append('--state-dir')
|
repoview.append('--state-dir')
|
||||||
repoview.append(os.path.join(cachedir, 'repoviewcache'))
|
repoview.append(os.path.join(cachedir, 'repoviewcache'))
|
||||||
|
|
||||||
if repoviewtitle:
|
if repoviewtitle:
|
||||||
repoview.append('--title')
|
repoview.append('--title')
|
||||||
repoview.append(repoviewtitle)
|
repoview.append(repoviewtitle)
|
||||||
|
|
||||||
repoview.append(path)
|
repoview.append(path)
|
||||||
|
|
||||||
# run the command
|
# run the command
|
||||||
pungi.util._doRunCommand(repoview, self.logger)
|
pungi.util._doRunCommand(repoview, self.logger)
|
||||||
|
|
||||||
def doCreaterepo(self, comps=True):
|
def doCreaterepo(self, comps=True):
|
||||||
"""Run createrepo to generate repodata in the tree."""
|
"""Run createrepo to generate repodata in the tree."""
|
||||||
|
|
||||||
|
|
||||||
compsfile = None
|
compsfile = None
|
||||||
if comps:
|
if comps:
|
||||||
compsfile = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('pungi', 'family'), self.config.get('pungi', 'version')))
|
compsfile = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('pungi', 'family'), self.config.get('pungi', 'version')))
|
||||||
|
|
||||||
# setup the cache dirs
|
# setup the cache dirs
|
||||||
for target in ['createrepocache', 'repoviewcache']:
|
for target in ['createrepocache', 'repoviewcache']:
|
||||||
pungi.util._ensuredir(os.path.join(self.config.get('pungi', 'cachedir'),
|
pungi.util._ensuredir(os.path.join(self.config.get('pungi', 'cachedir'),
|
||||||
target),
|
target),
|
||||||
self.logger,
|
self.logger,
|
||||||
force=True)
|
force=True)
|
||||||
|
|
||||||
repoviewtitle = '%s %s - %s' % (self.config.get('pungi', 'family'),
|
repoviewtitle = '%s %s - %s' % (self.config.get('pungi', 'family'),
|
||||||
self.config.get('pungi', 'version'),
|
self.config.get('pungi', 'version'),
|
||||||
self.tree_arch)
|
self.tree_arch)
|
||||||
@ -1604,6 +1602,7 @@ class Pungi(PungiBase):
|
|||||||
# Create a function to use with os.path.walk to sum the files
|
# Create a function to use with os.path.walk to sum the files
|
||||||
# basepath is used to make the sum output relative
|
# basepath is used to make the sum output relative
|
||||||
sums = []
|
sums = []
|
||||||
|
|
||||||
def getsum(basepath, dir, files):
|
def getsum(basepath, dir, files):
|
||||||
for file in files:
|
for file in files:
|
||||||
path = os.path.join(dir, file)
|
path = os.path.join(dir, file)
|
||||||
@ -1616,7 +1615,7 @@ class Pungi(PungiBase):
|
|||||||
|
|
||||||
# Walk the os/images path to get sums of all the files
|
# Walk the os/images path to get sums of all the files
|
||||||
os.path.walk(os.path.join(self.topdir, 'images'), getsum, self.topdir + '/')
|
os.path.walk(os.path.join(self.topdir, 'images'), getsum, self.topdir + '/')
|
||||||
|
|
||||||
# Capture PPC images
|
# Capture PPC images
|
||||||
if self.tree_arch in ['ppc', 'ppc64', 'ppc64le']:
|
if self.tree_arch in ['ppc', 'ppc64', 'ppc64le']:
|
||||||
os.path.walk(os.path.join(self.topdir, 'ppc'), getsum, self.topdir + '/')
|
os.path.walk(os.path.join(self.topdir, 'ppc'), getsum, self.topdir + '/')
|
||||||
@ -1690,8 +1689,6 @@ class Pungi(PungiBase):
|
|||||||
def doGetRelnotes(self):
|
def doGetRelnotes(self):
|
||||||
"""Get extra files from packages in the tree to put in the topdir of
|
"""Get extra files from packages in the tree to put in the topdir of
|
||||||
the tree."""
|
the tree."""
|
||||||
|
|
||||||
|
|
||||||
docsdir = os.path.join(self.workdir, 'docs')
|
docsdir = os.path.join(self.workdir, 'docs')
|
||||||
relnoterpms = self.config.get('pungi', 'relnotepkgs').split()
|
relnoterpms = self.config.get('pungi', 'relnotepkgs').split()
|
||||||
|
|
||||||
@ -1748,7 +1745,7 @@ class Pungi(PungiBase):
|
|||||||
if regex.match(directory) and not os.path.exists(os.path.join(self.topdir, directory)):
|
if regex.match(directory) and not os.path.exists(os.path.join(self.topdir, directory)):
|
||||||
self.logger.info("Copying release note dir %s" % directory)
|
self.logger.info("Copying release note dir %s" % directory)
|
||||||
shutil.copytree(os.path.join(dirpath, directory), os.path.join(self.topdir, directory))
|
shutil.copytree(os.path.join(dirpath, directory), os.path.join(self.topdir, directory))
|
||||||
|
|
||||||
def _doIsoChecksum(self, path, csumfile):
|
def _doIsoChecksum(self, path, csumfile):
|
||||||
"""Simple function to wrap creating checksums of iso files."""
|
"""Simple function to wrap creating checksums of iso files."""
|
||||||
|
|
||||||
|
@ -93,5 +93,6 @@ class TestExclusiveExcludeArch(unittest.TestCase):
|
|||||||
self.assertEqual(log.mock_calls,
|
self.assertEqual(log.mock_calls,
|
||||||
[mock.call.debug("Excluding (EXCLUSIVEARCH: ['aarch64']): pkg.rpm")])
|
[mock.call.debug("Excluding (EXCLUSIVEARCH: ['aarch64']): pkg.rpm")])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
@ -558,5 +558,6 @@ class OSBSThreadTest(helpers.PungiTestCase):
|
|||||||
self._assertCorrectMetadata(scratch=True)
|
self._assertCorrectMetadata(scratch=True)
|
||||||
self._assertRepoFile()
|
self._assertRepoFile()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
@ -65,6 +65,7 @@ class EqualsAny(object):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return u'ANYTHING'
|
return u'ANYTHING'
|
||||||
|
|
||||||
|
|
||||||
ANYTHING = EqualsAny()
|
ANYTHING = EqualsAny()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user