diff --git a/scripts/deploy-packages.sh b/scripts/deploy-packages.sh index bb2fa82723f6b9efd2756e97e3f9a9f7bc2d4a71..1c96d4514afa5d6c0b1836327da5c6e9268e3e03 100755 --- a/scripts/deploy-packages.sh +++ b/scripts/deploy-packages.sh @@ -83,26 +83,30 @@ EOF ## Add packages to the repository ## #################################### -# Sign the debs -echo "##################" -echo "## signing debs ##" -echo "##################" - for package in packages/${DISTRIBUTION}*/*.deb; do + + # Sign the deb + echo "## signing: ${package} ##" dpkg-sig -k ${KEYID} --sign builder ${package} -done -# Include the debs -echo "####################" -echo "## including debs ##" -echo "####################" -for package in packages/${DISTRIBUTION}*/*.deb; do + # Include the deb + echo "## including ${package} ##" + package_name=$(dpkg -I ${package} | grep -m 1 Package: | awk '{print $2}') + package_arch=$(dpkg -I ${package} | grep -m 1 Architecture: | awk '{print $2}') + if [ ${package_arch} = "all" ]; then + # Removing to avoid the error of adding the same deb twice. + # This happens with arch all packages, which are generated in amd64 and i386. + reprepro --verbose --basedir ${DISTRIBUTION_REPOSITOIRY_FOLDER} remove ring ${package_name} + fi reprepro --verbose --basedir ${DISTRIBUTION_REPOSITOIRY_FOLDER} includedeb ring ${package} done # Rebuild the index reprepro --verbose --basedir ${DISTRIBUTION_REPOSITOIRY_FOLDER} export ring +# Show the contents +reprepro --verbose --basedir ${DISTRIBUTION_REPOSITOIRY_FOLDER} list ring + ####################################### ## create the manual download folder ## #######################################