Loading
device/testing/*: split downstream ports into new downstream category
See #3516 (closed) for background / explanation.
Closes #3516 (closed)
The changes should be reproducible using these bash snippets:
$ mkdir device/upstream/ device/downstream/
### KERNEL PACKAGES
# Move 100% upstream (incl. upstream+downstream mix)
$ mv -v device/testing/linux-postmarketos-* device/upstream/
# Special case: pkgver=4.x upstream packages
$ mv -v device/testing/linux-asus-flo/ device/testing/linux-nokia-n9/ device/testing/linux-tokio-techbook/ device/upstream/
# Move pkgver=3.x and 4.x downstream
$ mv -v $(grep -l "^pkgver=[34]\." device/testing/linux-*/APKBUILD | xargs -r dirname) device/downstream/
# Find more upstream based on pkgver - exclude known downstream/LTS releases
$ grep "^pkgver=" device/testing/linux-*/APKBUILD | grep -vE '=(3\.[[:digit:]]{1,2}|4\.1|4\.4|4\.9|4\.14|4\.19|5\.4|5\.10|5\.15|6\.1|6\.6)(\.|$)'
# verify the above!
# Start moving them to upstream
$ mv -v $(grep "^pkgver=" device/testing/linux-*/APKBUILD | grep -vE '=(3\.[[:digit:]]{1,2}|4\.1|4\.4|4\.9|4\.14|4\.19|5\.4|5\.10|5\.15|6\.1|6\.6)(\.|$)' | xargs -r dirname) device/upstream/
# Special cases not covered by the rest
$ mv -v device/testing/linux-apple-iphone7/ device/testing/linux-clockworkpi-uconsole-cm4/ device/testing/linux-google-nyan/ device/upstream/
### DEVICE PACKAGES
# For all Alpine kernels, move devices to upstream
$ iter=(linux-asahi linux-edge linux-lts linux-rpi4 linux-rpi2 linux-rpi)
$ mv -v $(for i in ${iter[@]}; do grep -l $i device/testing/device-*/APKBUILD | xargs -r dirname; done) device/upstream/
For all upstream kernels (also existing community & main), find every device referencing that one -> move to upstream; done
$ iter=($(ls -d device/{upstream,community}/linux-* | cut -d'/' -f3))
$ mv -v $(for i in ${iter[@]}; do grep -l $i device/testing/device-*/APKBUILD | xargs -r dirname; done) device/upstream/
For all downstream kernels, find every device referencing that one in device/testing -> move to downstream
$ iter=($(ls -d device/downstream/linux-* | cut -d'/' -f3))
$ mv -v $(for i in ${iter[@]}; do grep -l $i device/testing/device-*/APKBUILD | xargs -r dirname; done) device/downstream/
### FIRMWARE/SOC/MISC PACKAGES
For all other packages, find where it belongs best
$ iter=($(ls -d device/testing/* | cut -d'/' -f3))
$ for i in ${iter[@]}; do
echo ----------; echo i=$i
deps=($(grep -l $i device/*/device-*/APKBUILD))
if echo "${deps[@]}" | grep -q /upstream/; then
mv -v device/testing/$i device/upstream/
else
mv -v device/testing/$i device/downstream/
fi
done
$ rmdir device/testing/
$ mv device/upstream/ device/testing/
$ sed -i '/device\/community/a \ \ \ \ "device\/downstream",' .ci/testcases/test_directory_structure.pyEdited by Luca Weiss