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