Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debian] check repo release files existence before deletion #630

Merged
merged 1 commit into from
Nov 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion packaging/debian_scripts/publish_debian_cern.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ for dist in artful xenial; do
(cd $prefix && apt-ftparchive --arch amd64 packages pool/$dist/$comp/ > dists/$dist/$comp/binary-amd64/Packages);
gzip -c $prefix/dists/$dist/$comp/binary-amd64/Packages > $prefix/dists/$dist/$comp/binary-amd64/Packages.gz;
components=$(find $prefix/dists/$dist/ -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | tr '\n' ' ')
rm $prefix/dists/$dist/Release $prefix/dists/$dist/InRelease $prefix/dists/$dist/Release.gpg
if [ -e $prefix/dists/$dist/Release ]; then
rm $prefix/dists/$dist/Release
fi
if [ -e $prefix/dists/$dist/InRelease ]; then
rm $prefix/dists/$dist/InRelease
fi
if [ -e $prefix/dists/$dist/Release.gpg ]; then
rm $prefix/dists/$dist/Release.gpg
fi
apt-ftparchive -o APT::FTPArchive::Release::Origin=CERN -o APT::FTPArchive::Release::Label=XrootD -o APT::FTPArchive::Release::Codename=artful -o APT::FTPArchive::Release::Architectures=amd64 -o APT::FTPArchive::Release::Components="$components" release $prefix/dists/$dist/ > $prefix/dists/$dist/Release;
gpg --homedir /home/stci/ --clearsign -o $prefix/dists/$dist/InRelease $prefix/dists/$dist/Release;
gpg --homedir /home/stci/ -abs -o $prefix/dists/$dist/Release.gpg $prefix/dists/$dist/Release;
Expand Down