# Remaining package name validity fixes
return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
-def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None):
+def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None, allow_links=False):
"""
Used in .bb files to split up dynamically generated subpackages of a
given package, usually plugins or modules.
continue
f = os.path.join(dvar + root, o)
mode = os.lstat(f).st_mode
- if not (stat.S_ISREG(mode) or (allow_dirs and stat.S_ISDIR(mode))):
+ if not (stat.S_ISREG(mode) or (allow_links and stat.S_ISLNK(mode)) or (allow_dirs and stat.S_ISDIR(mode))):
continue
on = legitimize_package_name(m.group(1))
pkg = output_pattern % on
# 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)
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 () {
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:] == '.pyc':
+ continue
if file in seen:
continue
seen.append(file)
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]:
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)
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')
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
}
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")
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():
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)
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: