diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-11 17:33:43 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-19 10:24:50 +0100 |
| commit | bfd279de3275abbfaf3e630383ec244131e0375f (patch) | |
| tree | 0d1c90461a890d21444f5d2afb13c52b302427f1 /meta/recipes-devtools/apt | |
| parent | 99203edda6f0b09d817454d656c100b7a8806b18 (diff) | |
| download | poky-bfd279de3275abbfaf3e630383ec244131e0375f.tar.gz | |
Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/apt')
| -rw-r--r-- | meta/recipes-devtools/apt/apt-native.inc | 28 | ||||
| -rw-r--r-- | meta/recipes-devtools/apt/apt-package.inc | 30 |
2 files changed, 29 insertions, 29 deletions
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc index 51e1e3b5c4..ab89f71c4b 100644 --- a/meta/recipes-devtools/apt/apt-native.inc +++ b/meta/recipes-devtools/apt/apt-native.inc | |||
| @@ -8,26 +8,26 @@ USE_NLS = "yes" | |||
| 8 | SRC_URI += "file://db_linking_hack.patch" | 8 | SRC_URI += "file://db_linking_hack.patch" |
| 9 | 9 | ||
| 10 | python do_install () { | 10 | python do_install () { |
| 11 | bb.build.exec_func('do_install_base', d) | 11 | bb.build.exec_func('do_install_base', d) |
| 12 | bb.build.exec_func('do_install_config', d) | 12 | bb.build.exec_func('do_install_config', d) |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | python do_install_config () { | 15 | python do_install_config () { |
| 16 | indir = os.path.dirname(d.getVar('FILE',1)) | 16 | indir = os.path.dirname(d.getVar('FILE',1)) |
| 17 | infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r') | 17 | infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r') |
| 18 | data = infile.read() | 18 | data = infile.read() |
| 19 | infile.close() | 19 | infile.close() |
| 20 | 20 | ||
| 21 | data = d.expand(data) | 21 | data = d.expand(data) |
| 22 | 22 | ||
| 23 | outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt') | 23 | outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt') |
| 24 | if not os.path.exists(outdir): | 24 | if not os.path.exists(outdir): |
| 25 | os.makedirs(outdir) | 25 | os.makedirs(outdir) |
| 26 | outpath = os.path.join(outdir, 'apt.conf.sample') | 26 | outpath = os.path.join(outdir, 'apt.conf.sample') |
| 27 | 27 | ||
| 28 | outfile = file(outpath, 'w') | 28 | outfile = file(outpath, 'w') |
| 29 | outfile.write(data) | 29 | outfile.write(data) |
| 30 | outfile.close() | 30 | outfile.close() |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | do_install_base () { | 33 | do_install_base () { |
diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc index 736672c26c..26f3d74943 100644 --- a/meta/recipes-devtools/apt/apt-package.inc +++ b/meta/recipes-devtools/apt/apt-package.inc | |||
| @@ -34,23 +34,23 @@ apt-utils-manpages="doc/apt-extracttemplates.1 \ | |||
| 34 | # doc/apt-ftparchive.1 | 34 | # doc/apt-ftparchive.1 |
| 35 | 35 | ||
| 36 | def get_files_apt_doc(d, bb, manpages): | 36 | def get_files_apt_doc(d, bb, manpages): |
| 37 | import re | 37 | import re |
| 38 | manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages) | 38 | manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages) |
| 39 | manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages) | 39 | manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages) |
| 40 | return manpages | 40 | return manpages |
| 41 | 41 | ||
| 42 | def get_commands_apt_doc(d, bb, manpages): | 42 | def get_commands_apt_doc(d, bb, manpages): |
| 43 | import os | 43 | import os |
| 44 | s = list() | 44 | s = list() |
| 45 | __dir_cache__ = list() | 45 | __dir_cache__ = list() |
| 46 | for m in manpages.split(): | 46 | for m in manpages.split(): |
| 47 | dest = get_files_apt_doc(d, bb, m) | 47 | dest = get_files_apt_doc(d, bb, m) |
| 48 | dir = os.path.dirname(dest) | 48 | dir = os.path.dirname(dest) |
| 49 | if not dir in __dir_cache__: | 49 | if not dir in __dir_cache__: |
| 50 | s.append("install -d ${D}/%s" % dir) | 50 | s.append("install -d ${D}/%s" % dir) |
| 51 | __dir_cache__.append(dir) | 51 | __dir_cache__.append(dir) |
| 52 | s.append("install -m 0644 %s ${D}/%s" % (m, dest)) | 52 | s.append("install -m 0644 %s ${D}/%s" % (m, dest)) |
| 53 | return "\n".join(s) | 53 | return "\n".join(s) |
| 54 | 54 | ||
| 55 | PACKAGES += "${PN}-utils ${PN}-utils-doc" | 55 | PACKAGES += "${PN}-utils ${PN}-utils-doc" |
| 56 | FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \ | 56 | FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \ |
