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/rules] fail on script error during package build #1050

Merged
merged 3 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
set -ex
rm ../*.deb || true
./autogen.sh
fakeroot debian/rules DEB_CONFIGURE_EXTRA_FLAGS='--enable-code-coverage' CFLAGS="" CXXFLAGS="" binary-syncd-vs
DEB_BUILD_OPTIONS=nocheck fakeroot debian/rules DEB_CONFIGURE_EXTRA_FLAGS='--enable-code-coverage' CFLAGS="" CXXFLAGS="" binary-syncd-vs
mv ../*.deb .
displayName: "Compile sonic sairedis with coverage enabled"
- script: |
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Description: debugging symbols for libsaimetadata

Package: python-pysairedis
Architecture: any
Build-Profiles: <!nopython2>
Depends: ${shlibs:Depends}, ${misc:Pre-Depends}
Section: libs
Description: This package contains Switch State Service sairedis Python2 library.
Expand Down
2 changes: 1 addition & 1 deletion debian/python-pysairedis.install
Original file line number Diff line number Diff line change
@@ -1 +1 @@
usr/lib/python2.7/dist-packages/pysairedis/*
usr/lib/python2.7/dist-packages/sairedis/*
2 changes: 1 addition & 1 deletion debian/python3-pysairedis.install
Original file line number Diff line number Diff line change
@@ -1 +1 @@
usr/lib/python3/dist-packages/pysairedis/*
usr/lib/python3/dist-packages/sairedis/*
12 changes: 11 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -x
.SHELLFLAGS += -ex

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
Expand All @@ -29,6 +29,16 @@ endif
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

DOPACKAGES = $(shell dh_listpackages)

# For Debian jessie, stretch, and buster, and Ubuntu bionic and focal, build
# Python 2 bindings. This is controlled by the build profile being used.
ifneq (,$(filter python-pysairedis,$(DOPACKAGES)))
configure_opts += --enable-python2
else
configure_opts += --disable-python2
endif

clean:
dh $@ --with autotools-dev

Expand Down