msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-25 21:03+0200\n"
+"POT-Creation-Date: 2011-11-02 11:14+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
for stage in ("prepare", "build", "test", "install"):
self.build_stage(stage)
+ # Run post-build stuff.
+ self.post_remove_static_libs()
+
# Package the result.
# Make all these little package from the build environment.
logging.info(_("Creating packages:"))
if os.path.exists(buildscript):
os.unlink(buildscript)
+ def post_remove_static_libs(self):
+ keep_libs = self.pkg.lexer.build.get_var("keep_libraries")
+ keep_libs = keep_libs.split()
+
+ try:
+ self.do("%s/remove-static-libs %s %s" % \
+ (SCRIPT_DIR, self.buildroot, " ".join(keep_libs)))
+ except Error, e:
+ logging.warning(_("Could not remove static libraries: %s") % e)
+
def cleanup(self):
if os.path.exists(self.buildroot):
util.rm(self.buildroot)
PAKFIRE_LEAST_COMPATIBLE_VERSION = PAKFIRE_VERSION
SYSCONFDIR = "/etc"
+SCRIPT_DIR = "/usr/lib/pakfire"
CONFIG_DIR = os.path.join(SYSCONFDIR, "pakfire.repos.d")
CONFIG_FILE = os.path.join(SYSCONFDIR, "pakfire.conf")
pakfire-multicall.py \
py-compile \
quality-agent \
+ remove-static-libs \
$(wildcard functions-*) \
$(wildcard *.prov) \
$(wildcard *.req)
+++ /dev/null
-#!/bin/bash
-
-. $(dirname ${0})/qa-include
-
-DESC="Removing unwanted files: *.a *.la"
-
-function check() {
- for file in $(find ${BUILDROOT} -name "*.a" -or -name "*.la"); do
-
- # Don't remove libc_nonshared.a. It is used by gcc/ld.
- [ "${file##*/}" = "libc_nonshared.a" ] && continue
- [ "${file##*/}" = "libpthread_nonshared.a" ] && continue
- [ "${file##*/}" = "libgcc.a" ] && continue
- [ "${file##*/}" = "libgcc_eh.a" ] && continue
- [ "${file##*/}" = "libfl_pic.a" ] && continue
- [ "${file##*/}" = "libpython2.6.a" ] && continue
- [ "${file##*/}" = "libiberty.a" ] && continue
-
- log DEBUG " Removing: ${file}"
- rm -f ${file} || exit $?
- done
-}
-
-run
-
--- /dev/null
+#!/bin/bash
+
+echo "Removing unwanted static libraries..."
+
+BUILDROOT=${1}
+shift
+
+for file in $(find ${BUILDROOT} -name "*.a" -or -name "*.la"); do
+ file=${file//${BUILDROOT}/}
+
+ keep=0
+ for skip in $@; do
+ if [ "${skip}" = "${file}" ]; then
+ keep=1
+ break
+ fi
+ done
+
+ if [ ${keep} -eq 0 ]; then
+ echo " Removing ${file}..."
+ rm -f ${BUILDROOT}/${file}
+ fi
+done
+
+exit 0