Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / classes / package.bbclass
index 53042bc..bcd9c98 100644 (file)
@@ -166,7 +166,7 @@ def runstrip(file, d):
     # If the file is in a .debug directory it was already stripped,
     # don't do it again...
     if os.path.dirname(file).endswith(".debug"):
-        bb.note("Already ran strip")
+        bb.debug(2, "Already ran strip on %s" % file)
         return 0
 
     strip = bb.data.getVar("STRIP", d, 1)
@@ -293,16 +293,6 @@ python package_do_split_locales() {
                bb.data.setVar('DESCRIPTION_' + pkg, '%s translation for %s' % (l, pn), d)
 
        bb.data.setVar('PACKAGES', ' '.join(packages), d)
-
-       # Disabled by RP 18/06/07
-       # Wildcards aren't supported in debian
-       # They break with ipkg since glibc-locale* will mean that 
-       # glibc-localedata-translit* won't install as a dependency
-       # for some other package which breaks meta-toolchain
-       # Probably breaks since virtual-locale- isn't provided anywhere
-       #rdep = (bb.data.getVar('RDEPENDS_%s' % mainpkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "").split()
-       #rdep.append('%s-locale*' % pn)
-       #bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d)
 }
 
 python populate_packages () {
@@ -394,11 +384,15 @@ python populate_packages () {
                        globbed = glob.glob(file)
                        if globbed:
                                if [ file ] != globbed:
-                                       files += globbed
-                                       continue
+                                       if not file in globbed:
+                                               files += globbed
+                                               continue
+                                       else:
+                                               globbed.remove(file)
+                                               files += globbed
                        if (not os.path.islink(file)) and (not os.path.exists(file)):
                                continue
-                       if file[-4:] == '.pyo':
+                       if file[-4:] == '.pyc':
                                continue
                        if file in seen:
                                continue
@@ -461,7 +455,7 @@ python populate_packages () {
        for pkg in package_list:
                rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
 
-               remstr = "${PN} (= ${DEBPV})"
+               remstr = "${PN} (= ${EXTENDPV})"
                if main_is_empty and remstr in rdepends:
                        rdepends.remove(remstr)
                for l in dangling_links[pkg]:
@@ -495,6 +489,11 @@ python emit_pkgdata() {
                val = bb.data.getVar('%s_%s' % (var, pkg), d, 1)
                if val:
                        f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
+                       return
+               val = bb.data.getVar('%s' % (var), d, 1)
+               if val:
+                       f.write('%s: %s\n' % (var, encode(val)))
+               return
 
        packages = bb.data.getVar('PACKAGES', d, True)
        pkgdatadir = bb.data.getVar('PKGDATA_DIR', d, True)
@@ -515,6 +514,7 @@ python emit_pkgdata() {
                subdata_file = pkgdatadir + "/runtime/%s" % pkg
                sf = open(subdata_file, 'w')
                write_if_exists(sf, pkg, 'PN')
+               write_if_exists(sf, pkg, 'PV')
                write_if_exists(sf, pkg, 'PR')
                write_if_exists(sf, pkg, 'DESCRIPTION')
                write_if_exists(sf, pkg, 'RDEPENDS')
@@ -553,7 +553,9 @@ emit_pkgdata[dirs] = "${PKGDATA_DIR}/runtime"
 
 ldconfig_postinst_fragment() {
 if [ x"$D" = "x" ]; then
-       [ -x /sbin/ldconfig ] && /sbin/ldconfig
+       if [ -e /etc/ld.so.conf ] ; then
+               [ -x /sbin/ldconfig ] && /sbin/ldconfig
+       fi
 fi
 }
 
@@ -564,7 +566,7 @@ python package_do_shlibs() {
 
        exclude_shlibs = bb.data.getVar('EXCLUDE_FROM_SHLIBS', d, 0)
        if exclude_shlibs:
-               bb.note("not generating shlibs")
+               bb.debug(1, "not generating shlibs")
                return
                
        lib_re = re.compile("^lib.*\.so")
@@ -615,7 +617,7 @@ python package_do_shlibs() {
                        for file in files:
                                soname = None
                                path = os.path.join(root, file)
-                               if os.access(path, os.X_OK) or lib_re.match(file):
+                               if (os.access(path, os.X_OK) or lib_re.match(file)) and not os.path.islink(path):
                                        cmd = bb.data.getVar('OBJDUMP', d, 1) + " -p " + path + " 2>/dev/null"
                                        cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', d, 1), cmd)
                                        fd = os.popen(cmd)