Unified · Split
| @@ -149,32 +149,23 @@ fi · 148 unmodified lines | ||
| 149 | 149 | # the target architecture. Since the target isn't garanteed to be the |
| 150 | 150 | # same as the host, this needs to be done via qemu. |
| 151 | 151 | info_msg "Reconfiguring packages for ${XBPS_TARGET_ARCH} ..." |
| 152 | −case "$XBPS_TARGET_ARCH" in | |
| 153 | − # TODO: Rather than asserting that x86 code will work, check | |
| 154 | − # instead if the system that is hosting this script is the same as | |
| 155 | − # the target, using binfmt if it is not. | |
| 156 | − i686*|x86_64*) | |
| 157 | − run_cmd "XBPS_ARCH=${XBPS_TARGET_ARCH} xbps-reconfigure -r $ROOTFS base-files" | |
| 158 | − ;; | |
| 159 | − *) | |
| 160 | − # This step sets up enough of the base-files that the chroot | |
| 161 | − # will work and they can be reconfigured natively. Without | |
| 162 | − # this step there isn't enough configured for ld to work. | |
| 163 | − # This step runs as the host architecture. | |
| 164 | − run_cmd "xbps-reconfigure -r $ROOTFS base-files" | |
| 165 | − | |
| 166 | − # Now running as the target system, this step reconfigures the | |
| 167 | − # base-files completely. Certain things just won't work in | |
| 168 | − # the first pass, so this cleans up any issues that linger. | |
| 169 | − run_cmd_chroot "$ROOTFS" "env -i xbps-reconfigure -f base-files" | |
| 170 | − | |
| 171 | − # TODO: determine why these lines are here. What is the harm | |
| 172 | − # in having them and what do they remove. Do they interact | |
| 173 | − # adversely with the alien build support discussed above. | |
| 174 | − rmdir "$ROOTFS/usr/lib32" 2>/dev/null | |
| 175 | − rm -f "$ROOTFS/lib32" "$ROOTFS/lib64" "$ROOTFS/usr/lib64" | |
| 176 | − ;; | |
| 177 | −esac | |
| 152 | + | |
| 153 | +# This step sets up enough of the base-files that the chroot will work | |
| 154 | +# and they can be reconfigured natively. Without this step there | |
| 155 | +# isn't enough configured for ld to work. This step runs as the host | |
| 156 | +# architecture. | |
| 157 | +run_cmd "xbps-reconfigure -r $ROOTFS base-files" | |
| 158 | + | |
| 159 | +# Now running as the target system, this step reconfigures the | |
| 160 | +# base-files completely. Certain things just won't work in the first | |
| 161 | +# pass, so this cleans up any issues that linger. | |
| 162 | +run_cmd_chroot "$ROOTFS" "env -i xbps-reconfigure -f base-files" | |
| 163 | + | |
| 164 | +# TODO: determine why these lines are here. What is the harm in | |
| 165 | +# having them and what do they remove. Do they interact adversely | |
| 166 | +# with the alien build support discussed above. | |
| 167 | +rmdir "$ROOTFS/usr/lib32" 2>/dev/null | |
| 168 | +rm -f "$ROOTFS/lib32" "$ROOTFS/lib64" "$ROOTFS/usr/lib64" | |
| 178 | 169 | |
| 179 | 170 | # Once base-files is configured and functional its possible to |
| 180 | 171 | # configure the rest of the system. |