fix deb packaging
@@ -138,6 +138,7 @@ package() {
BATFISH_PATH="$(readlink -f ${BATFISH_TOOLS_PATH}/..)"
VERSION_FILE=$BATFISH_PATH/projects/batfish-common-protocol/src/org/batfish/common/Version.java
BATFISH_VERSION=$(grep 'private static final String VERSION' $VERSION_FILE | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/g')
+ SECONDARY_VERSION=$(echo $BATFISH_VERSION | cut -d'.' -f1,2)
ARCHITECTURE=$(architecture)
UBUNTU_VERSION=$(ubuntu_version)
VERSION="${BATFISH_VERSION}-ubuntu${UBUNTU_VERSION}"
@@ -268,7 +269,10 @@ package() {
write_init_scripts
cat > $CONTROL_FILE <<EOF
-Package: batfish
+Package: batfish-${SECONDARY_VERSION}
+Conflicts: batfish
+Replaces: batfish
+Provides: batfish
Version: $VERSION
Section: web
Priority: optional
