Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / classes / package.bbclass
index a12bfb0..d98692c 100644 (file)
@@ -4,6 +4,13 @@
 
 PKGDEST = "${WORKDIR}/install"
 
+def build_package_revision(d):
+       import bb
+       file_pr = bb.data.getVar('PR', d, True)
+       distro_pr = bb.data.getVar('DISTRO_PR', d, True) or ""
+       return "%s%s" % (file_pr, distro_pr)
+
+
 def legitimize_package_name(s):
        """
        Make sure package names are legitimate strings
@@ -398,6 +405,8 @@ python populate_packages () {
                                        continue
                        if (not os.path.islink(file)) and (not os.path.exists(file)):
                                continue
+                       if file[-4:] == '.pyo':
+                               continue
                        if file in seen:
                                continue
                        seen.append(file)
@@ -594,6 +603,11 @@ python package_do_shlibs() {
        else:
                snap_symlinks = False
 
+       if (bb.data.getVar('USE_LDCONFIG', d, True) or "1") == "1":
+               use_ldconfig = True
+       else:
+               use_ldconfig = False
+
        needed = {}
        private_libs = bb.data.getVar('PRIVATE_LIBS', d, 1)
        for pkg in packages.split():
@@ -647,7 +661,7 @@ python package_do_shlibs() {
                        fd.write(ver + '\n')
                        fd.close()
                        package_stagefile(shver_file, d)
-               if needs_ldconfig:
+               if needs_ldconfig and use_ldconfig:
                        bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
                        postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
                        if not postinst: