Merge commit 'HEAD@{1}' into develop

This commit is contained in:
Foo 2015-06-27 02:05:58 +03:00
commit 03195cf93f
1 changed files with 32 additions and 28 deletions

View File

@ -147,38 +147,42 @@ def create_ebuilds(version_string, overlay, user, **kwargs):
live_ebuild = None live_ebuild = None
for ebuild in os.listdir(pdir): for ebuild in os.listdir(pdir):
if ebuild.endswith('.ebuild') and '9999' in ebuild: if ebuild.endswith('.ebuild') and '9999' in ebuild:
live_ebuild_base = ebuild
live_ebuild = os.path.join(pdir, ebuild) live_ebuild = os.path.join(pdir, ebuild)
break break
assert(live_ebuild) assert(live_ebuild)
vcur = os.path.join(pdir, '{0}-{1}.ebuild'.format(pn, version_string)) vcur = os.path.join(pdir, '{0}-{1}.ebuild'.format(pn, version_string))
with open(live_ebuild) as LEF: if pn == 'powerline-vim':
with open(vcur, 'w') as F: with open(live_ebuild) as LEF:
dropnext = False with open(vcur, 'w') as F:
for line in LEF: dropnext = False
if line.startswith('EGIT'): for line in LEF:
# Drop all EGIT_… and the next empty line if line.startswith('EGIT'):
dropnext = True # Drop all EGIT_… and the next empty line
next_re = re.compile('^$') dropnext = True
continue next_re = re.compile('^$')
if dropnext: continue
assert(next_re.match(line)) if dropnext:
dropnext = False assert(next_re.match(line))
continue dropnext = False
if line.startswith('# Note the lack of an assignment to ${S}'): continue
next_re = re.compile('^#') if line.startswith('# Note the lack of an assignment to ${S}'):
dropnext = True next_re = re.compile('^#')
line = 'S="${WORKDIR}/${MY_P}"\n' dropnext = True
if line.startswith('inherit'): line = 'S="${WORKDIR}/${MY_P}"\n'
line = line.replace(' git-r3', '') if line.startswith('inherit'):
line += '\n' line = line.replace(' git-r3', '')
line += 'MY_PN="powerline-status"\n' line += '\n'
line += 'MY_P="${MY_PN}-${PV}"' line += 'MY_PN="powerline-status"\n'
line += '\n' line += 'MY_P="${MY_PN}-${PV}"'
elif line.startswith('HOMEPAGE'): line += '\n'
line += 'SRC_URI="mirror://pypi/p/${MY_PN}/${MY_P}.tar.gz"\n' elif line.startswith('HOMEPAGE'):
elif line.startswith('KEYWORDS'): line += 'SRC_URI="mirror://pypi/p/${MY_PN}/${MY_P}.tar.gz"\n'
line = 'KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"\n' elif line.startswith('KEYWORDS'):
F.write(line) line = 'KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"\n'
F.write(line)
else:
os.symlink(live_ebuild_base, vcur)
new_files.append(vcur) new_files.append(vcur)
check_call(['ebuild', vcur, 'manifest']) check_call(['ebuild', vcur, 'manifest'])
new_files.append(os.path.join(pdir, 'Manifest')) new_files.append(os.path.join(pdir, 'Manifest'))