Adding back legacy filtering for firmware packages on squeeze when contrib or non...
authorDaniel Baumann <daniel@debian.org>
Thu, 6 Dec 2012 19:59:35 +0000 (20:59 +0100)
committerDaniel Baumann <daniel@debian.org>
Thu, 6 Dec 2012 19:59:35 +0000 (20:59 +0100)
scripts/build/binary_debian-installer
scripts/build/chroot_linux-image

index 7b49c83..c72122f 100755 (executable)
@@ -463,6 +463,35 @@ then
                        done
                fi
 
+               if [ "${LB_PARENT_DISTRIBUTION}" = "squeeze" ]
+               then
+                       # Filter out contrib packages if contrib is not enabled
+                       if ! echo ${LB_ARCHIVE_AREAS} | grep -qs contrib
+                       then
+                               _FIRMWARE_PACKAGES=""
+
+                               for _PACKAGE in ${FIRMWARE_PACKAGES}
+                               do
+                                       _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^contrib/.*$||')"
+                               done
+
+                               FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}"
+                       fi
+
+                       # Filter out non-free packages if non-free is not enabled
+                       if ! echo ${LB_ARCHIVE_AREAS} | grep -qs non-free
+                       then
+                               _FIRMWARE_PACKAGES=""
+
+                               for _PACKAGE in ${FIRMWARE_PACKAGES}
+                               do
+                                       _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^non-free/.*$||')"
+                               done
+
+                               FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}"
+                       fi
+               fi
+
                # Drop section and keep package names only
                for _PACKAGE in ${FIRMWARE_PACKAGES}
                do
index 7e6461c..10b3fd9 100755 (executable)
@@ -107,6 +107,35 @@ then
                        done
                fi
 
+               if [ "${LB_PARENT_DISTRIBUTION}" = "squeeze" ]
+               then
+                       # Filter out contrib packages if contrib is not enabled
+                       if ! echo ${LB_ARCHIVE_AREAS} | grep -qs contrib
+                       then
+                               _FIRMWARE_PACKAGES=""
+
+                               for _PACKAGE in ${FIRMWARE_PACKAGES}
+                               do
+                                       _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^contrib/.*$||')"
+                               done
+
+                               FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}"
+                       fi
+
+                       # Filter out non-free packages if non-free is not enabled
+                       if ! echo ${LB_ARCHIVE_AREAS} | grep -qs non-free
+                       then
+                               _FIRMWARE_PACKAGES=""
+
+                               for _PACKAGE in ${FIRMWARE_PACKAGES}
+                               do
+                                       _FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | sed -e 's|^non-free/.*$||')"
+                               done
+
+                               FIRMWARE_PACKAGES="${_FIRMWARE_PACKAGES}"
+                       fi
+               fi
+
                # Drop section and keep package names only
                for _PACKAGE in ${FIRMWARE_PACKAGES}
                do