diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2019-06-09 02:41:37 +0300 |
---|---|---|
committer | Mykyta Holubakha <hilobakho@gmail.com> | 2019-06-09 02:41:37 +0300 |
commit | ff361ddeb5b97dcb912da2faa065ccee20607752 (patch) | |
tree | 80f385f56bd159a75718b2e38f95a4be937785a7 /pomu | |
parent | Mark handlers as static with to make pylint happy (diff) | |
download | pomu-ff361ddeb5b97dcb912da2faa065ccee20607752.tar.gz pomu-ff361ddeb5b97dcb912da2faa065ccee20607752.tar.bz2 pomu-ff361ddeb5b97dcb912da2faa065ccee20607752.zip |
Some more minor fixes and improvements
Diffstat (limited to 'pomu')
-rw-r--r-- | pomu/package.py | 16 | ||||
-rw-r--r-- | pomu/repo/remote/git.py | 2 | ||||
-rw-r--r-- | pomu/repo/remote/remote.py | 3 | ||||
-rw-r--r-- | pomu/repo/repo.py | 2 | ||||
-rw-r--r-- | pomu/source/base.py | 3 | ||||
-rw-r--r-- | pomu/util/misc.py | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/pomu/package.py b/pomu/package.py index 4b2ee5f..a5b984c 100644 --- a/pomu/package.py +++ b/pomu/package.py @@ -104,15 +104,15 @@ class Package(): for p in self.patches: ps.parse(open(p, 'r')) for patch in ps: - if '.ebuild' in ps.target: - ps.source = self.ebuild_path - ps.target = self.ebuild_path - elif '/files/' in ps.target: - comps = ps.target.split('/') + if '.ebuild' in patch.target: + patch.source = self.ebuild_path + patch.target = self.ebuild_path + elif '/files/' in patch.target: + comps = patch.target.split('/') comps = [self.category, self.name] + comps[comps.index('files'):] - ps.target = '/'.join(comps) - if not ps.source.split('/'[-2:] == ['dev', 'null']): - ps.source = '/'.join(comps) + patch.target = '/'.join(comps) + if not patch.source.split('/'[-2:] == ['dev', 'null']): + patch.source = '/'.join(comps) else: pass diff --git a/pomu/repo/remote/git.py b/pomu/repo/remote/git.py index 2738c1a..b6142b0 100644 --- a/pomu/repo/remote/git.py +++ b/pomu/repo/remote/git.py @@ -1,5 +1,5 @@ """A class for remote git repos""" -from os import chdir, path +from os import path from shutil import rmtree from subprocess import call from tempfile import mkdtemp diff --git a/pomu/repo/remote/remote.py b/pomu/repo/remote/remote.py index 1c2a6df..0b216c1 100644 --- a/pomu/repo/remote/remote.py +++ b/pomu/repo/remote/remote.py @@ -15,7 +15,8 @@ class RemoteRepo(): tp = RemoteRepo.type_for_name(type_) if not tp: from pomu.repo.remote.git import RemoteGitRepo - from pomu.repo.remote.hg import RemoteHgRepo + # no custom schemes for hg, assume git for common ones + #from pomu.repo.remote.hg import RemoteHgRepo from pomu.repo.remote.rsync import RemoteRsyncRepo from pomu.repo.remote.svn import RemoteSvnRepo try: diff --git a/pomu/repo/repo.py b/pomu/repo/repo.py index ef7e784..db6b607 100644 --- a/pomu/repo/repo.py +++ b/pomu/repo/repo.py @@ -1,5 +1,5 @@ """Subroutines with repositories""" -123 + from os import path, rmdir, makedirs from shutil import copy2 diff --git a/pomu/source/base.py b/pomu/source/base.py index e425420..fe4543d 100644 --- a/pomu/source/base.py +++ b/pomu/source/base.py @@ -18,9 +18,8 @@ class PackageBase(): It shall be subclassed explicitely. The class is responsible for fetching the package, and reading/writing the package-specific metadata. - """ - """The implementation shall provide a name for the package type""" + The implementation shall provide a name for the package type""" __cname__ = None def __init__(self, category, name, version, slot='0'): diff --git a/pomu/util/misc.py b/pomu/util/misc.py index de297af..7cb1781 100644 --- a/pomu/util/misc.py +++ b/pomu/util/misc.py @@ -34,7 +34,7 @@ def extract_urls(text): def parse_range(text, max_num=None): """Parses a numeric range (e.g. 1-2,5-16)""" - text = re.sub('\s*-\s*', '-', text) + text = re.sub(r'\s*-\s*', '-', text) subranges = [x.strip() for x in text.split(',')] subs = [] maxint = -1 |