diff options
Diffstat (limited to 'meta/classes/package_ipk.bbclass')
-rw-r--r-- | meta/classes/package_ipk.bbclass | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index 526c3aecb1..094ba09fcf 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -14,62 +14,6 @@ OPKG_ARGS = "-f $INSTALL_CONF_IPK -o $INSTALL_ROOTFS_IPK --force_postinstall --p | |||
14 | 14 | ||
15 | OPKGLIBDIR = "${localstatedir}/lib" | 15 | OPKGLIBDIR = "${localstatedir}/lib" |
16 | 16 | ||
17 | python package_ipk_fn () { | ||
18 | d.setVar('PKGFN', d.getVar('PKG')) | ||
19 | } | ||
20 | |||
21 | python package_ipk_install () { | ||
22 | import subprocess | ||
23 | |||
24 | pkg = d.getVar('PKG', True) | ||
25 | pkgfn = d.getVar('PKGFN', True) | ||
26 | rootfs = d.getVar('IMAGE_ROOTFS', True) | ||
27 | ipkdir = d.getVar('DEPLOY_DIR_IPK', True) | ||
28 | stagingdir = d.getVar('STAGING_DIR', True) | ||
29 | tmpdir = d.getVar('TMPDIR', True) | ||
30 | |||
31 | if None in (pkg,pkgfn,rootfs): | ||
32 | raise bb.build.FuncFailed("missing variables (one or more of PKG, PKGFN, IMAGEROOTFS)") | ||
33 | try: | ||
34 | bb.mkdirhier(rootfs) | ||
35 | os.chdir(rootfs) | ||
36 | except OSError: | ||
37 | import sys | ||
38 | (type, value, traceback) = sys.exc_info() | ||
39 | print value | ||
40 | raise bb.build.FuncFailed | ||
41 | |||
42 | # Generate ipk.conf if it or the stamp doesnt exist | ||
43 | conffile = os.path.join(stagingdir,"ipkg.conf") | ||
44 | if not os.access(conffile, os.R_OK): | ||
45 | ipkg_archs = d.getVar('PACKAGE_ARCHS') | ||
46 | if ipkg_archs is None: | ||
47 | bb.error("PACKAGE_ARCHS missing") | ||
48 | raise FuncFailed | ||
49 | ipkg_archs = ipkg_archs.split() | ||
50 | arch_priority = 1 | ||
51 | |||
52 | f = open(conffile,"w") | ||
53 | for arch in ipkg_archs: | ||
54 | f.write("arch %s %s\n" % ( arch, arch_priority )) | ||
55 | arch_priority += 1 | ||
56 | f.write("src local file:%s" % ipkdir) | ||
57 | f.close() | ||
58 | |||
59 | |||
60 | if not os.access(os.path.join(ipkdir,"Packages"), os.R_OK) or not os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"),os.R_OK): | ||
61 | ret = subprocess.call('opkg-make-index -p %s %s ' % (os.path.join(ipkdir, "Packages"), ipkdir), shell=True) | ||
62 | if (ret != 0 ): | ||
63 | raise bb.build.FuncFailed | ||
64 | f = open(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"),"w") | ||
65 | f.close() | ||
66 | |||
67 | ret = subprocess.call('opkg-cl -o %s -f %s update' % (rootfs, conffile), shell=True) | ||
68 | ret = subprocess.call('opkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn), shell=True) | ||
69 | if (ret != 0 ): | ||
70 | raise bb.build.FuncFailed | ||
71 | } | ||
72 | |||
73 | package_tryout_install_multilib_ipk() { | 17 | package_tryout_install_multilib_ipk() { |
74 | #try install multilib | 18 | #try install multilib |
75 | multilib_tryout_dirs="" | 19 | multilib_tryout_dirs="" |