build_deb.sh no longer needs to rm hg

Reviewed By: liubov-dmitrieva

Differential Revision: D41062428

fbshipit-source-id: 78c7f9e72f9967e62961386d908eb5018ecb63a9
This commit is contained in:
Michael Bolin 2022-11-06 10:41:11 -08:00 committed by Facebook GitHub Bot
parent c2804f0d24
commit 657b03187e

View File

@ -56,14 +56,9 @@ cp --recursive install "$pkg_dir"
mkdir "${pkg_dir}/install/debian"
cp packaging/debian/control "${pkg_dir}/install/debian/control"
# Ultimately, we will add configuration to prevent setup.py from producing
# this hg file.
pushd "$pkg_dir"
rm install/usr/bin/hg
# dpkg-shlibdeps requires the file `debian/control` to exist in the folder
# in which it is run.
pushd install
pushd "$pkg_dir/install"
DEB_DEPS=$(dpkg-shlibdeps -O -e usr/bin/*)
# dpkg-shlibdeps does not know about the runtime dependency on Git,
# so it must be added explicitly.
@ -72,12 +67,12 @@ popd
# In contrast to dpkg-shlibdeps, dpkg-deb requires the file to be named
# `DEBIAN/control`, so we rename the directory and proceed.
pushd "$pkg_dir"
mv install/debian install/DEBIAN
echo "$DEB_DEPS" | sed -e 's/shlibs:Depends=/Depends: /' >> install/DEBIAN/control
sed -i "s/%VERSION%/$VERSION/g" install/DEBIAN/control
dpkg-deb --build --root-owner-group install
popd
cp "${pkg_dir}/install.deb" .
dpkg-name install.deb