]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/commitdiff
build-essentials: Add /usr/lib/python* to possibly orphaned directories.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 6 Jul 2011 19:39:41 +0000 (21:39 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 6 Jul 2011 19:40:43 +0000 (21:40 +0200)
pkgs/build-essentials/build-essentials.nm
pkgs/build-essentials/buildsystem-tools/cleanup [new file with mode: 0755]
pkgs/build-essentials/buildsystem-tools/functions-constants
pkgs/build-essentials/buildsystem-tools/functions-directories

index 3164b8e34db4f4f660a2e18e2764c73a374553a1..1034d6b509e5c8384683df9b25d55a7eb2002f54 100644 (file)
@@ -26,7 +26,7 @@ include $(PKGROOT)/Include
 
 PKG_NAME       = build-essentials
 PKG_VER        = $(DISTRO_VERSION)
-PKG_REL        = 18
+PKG_REL        = 19
 PKG_EPOCH      = 1
 PKG_ARCH       = noarch
 
diff --git a/pkgs/build-essentials/buildsystem-tools/cleanup b/pkgs/build-essentials/buildsystem-tools/cleanup
new file mode 100755 (executable)
index 0000000..49e7c1b
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+dirname=$(dirname ${0})
+
+. ${dirname}/common-functions
+
+directory_remove_orphans $@
index 396e045ed5180fd094a7d60b423a45e1179e5348..80256f9ff8dfbb0aeb154144d7f129a28282bd17 100644 (file)
@@ -17,4 +17,5 @@ for i in $(seq 0 9); do
        ORPHAN_CANDIDATES="${ORPHAN_CANDIDATES} /usr/share/man/man${i}"
 done
 ORPHAN_CANDIDATES="${ORPHAN_CANDIDATES} /usr/lib/pkgconfig"
+ORPHAN_CANDIDATES="${ORPHAN_CANDIDATES} /usr/lib/python*"
 
index 5b0867b7ab45a46471abd48f31764bce3b814ec2..e779d75b245d7c63e50d8605227386a4a9ec5eb0 100644 (file)
@@ -10,15 +10,19 @@ function directory_remove_orphans() {
        log DEBUG "Removing orphans in ${basedir}"
 
        local dir
-       for dir in ${ORPHAN_CANDIDATES}; do
-               dir="${basedir}/${dir}"
+       local dir_pattern
+       for dir_pattern in ${ORPHAN_CANDIDATES}; do
+               dir=$(echo ${basedir}/${dir_pattern})
 
-               [ -d "${dir}" ] || continue
+               for dir in ${dir}; do
+                       echo "DIR ${dir}" >&2
+                       [ -d "${dir}" ] || continue
 
-               if dir_is_empty ${dir}; then
-                       log DEBUG "  Found orphaned directory: ${dir}"
-                       rm -rf ${dir}
-               fi
+                       if dir_is_empty ${dir}; then
+                               log DEBUG "  Found orphaned directory: ${dir}"
+                               rm -rf ${dir}
+                       fi
+               done
        done
 }