mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -8,26 +8,26 @@ USE_NLS = "yes"
|
||||
SRC_URI += "file://db_linking_hack.patch"
|
||||
|
||||
python do_install () {
|
||||
bb.build.exec_func('do_install_base', d)
|
||||
bb.build.exec_func('do_install_config', d)
|
||||
bb.build.exec_func('do_install_base', d)
|
||||
bb.build.exec_func('do_install_config', d)
|
||||
}
|
||||
|
||||
python do_install_config () {
|
||||
indir = os.path.dirname(d.getVar('FILE',1))
|
||||
infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
|
||||
data = infile.read()
|
||||
infile.close()
|
||||
indir = os.path.dirname(d.getVar('FILE',1))
|
||||
infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
|
||||
data = infile.read()
|
||||
infile.close()
|
||||
|
||||
data = d.expand(data)
|
||||
data = d.expand(data)
|
||||
|
||||
outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
|
||||
if not os.path.exists(outdir):
|
||||
os.makedirs(outdir)
|
||||
outpath = os.path.join(outdir, 'apt.conf.sample')
|
||||
outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
|
||||
if not os.path.exists(outdir):
|
||||
os.makedirs(outdir)
|
||||
outpath = os.path.join(outdir, 'apt.conf.sample')
|
||||
|
||||
outfile = file(outpath, 'w')
|
||||
outfile.write(data)
|
||||
outfile.close()
|
||||
outfile = file(outpath, 'w')
|
||||
outfile.write(data)
|
||||
outfile.close()
|
||||
}
|
||||
|
||||
do_install_base () {
|
||||
|
||||
@@ -34,23 +34,23 @@ apt-utils-manpages="doc/apt-extracttemplates.1 \
|
||||
# doc/apt-ftparchive.1
|
||||
|
||||
def get_files_apt_doc(d, bb, manpages):
|
||||
import re
|
||||
manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
|
||||
manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
|
||||
return manpages
|
||||
import re
|
||||
manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
|
||||
manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
|
||||
return manpages
|
||||
|
||||
def get_commands_apt_doc(d, bb, manpages):
|
||||
import os
|
||||
s = list()
|
||||
__dir_cache__ = list()
|
||||
for m in manpages.split():
|
||||
dest = get_files_apt_doc(d, bb, m)
|
||||
dir = os.path.dirname(dest)
|
||||
if not dir in __dir_cache__:
|
||||
s.append("install -d ${D}/%s" % dir)
|
||||
__dir_cache__.append(dir)
|
||||
s.append("install -m 0644 %s ${D}/%s" % (m, dest))
|
||||
return "\n".join(s)
|
||||
import os
|
||||
s = list()
|
||||
__dir_cache__ = list()
|
||||
for m in manpages.split():
|
||||
dest = get_files_apt_doc(d, bb, m)
|
||||
dir = os.path.dirname(dest)
|
||||
if not dir in __dir_cache__:
|
||||
s.append("install -d ${D}/%s" % dir)
|
||||
__dir_cache__.append(dir)
|
||||
s.append("install -m 0644 %s ${D}/%s" % (m, dest))
|
||||
return "\n".join(s)
|
||||
|
||||
PACKAGES += "${PN}-utils ${PN}-utils-doc"
|
||||
FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
|
||||
|
||||
Reference in New Issue
Block a user