Skip to content
Snippets Groups Projects
Unverified Commit dc67e9a6 authored by aviau's avatar aviau
Browse files

deploy-packages: Don't fail when adding the same deb

When adding the same deb twice to the repository, deploy-packages fails.
This is due to reprepro complaining about adding two times the same deb
to the same architecture. This happens because we generate arch all
packages on both i386 and amd64. This patch tries to remove the package
before adding it. This is safer than ignoring the error as there is no
option to only ignore this type of error.

Change-Id: I397148f9e8efe6ca1a089644abbd86395fa5eaf4
Tuleap: #872
parent f6b38eeb
No related branches found
No related tags found
No related merge requests found
......@@ -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 ##
#######################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment