Add conflicts for default and oss packages
This commit adds conflicts between the default and oss packages so that a user can not install both via a package manager (as they share paths).
This commit is contained in:
parent
e64e6d8996
commit
0750f5d6f3
|
@ -199,6 +199,9 @@ Closure commonPackageConfig(String type, boolean oss) {
|
|||
copyEmptyDir('/var/log/elasticsearch', 'elasticsearch', 'elasticsearch', 0750)
|
||||
copyEmptyDir('/var/lib/elasticsearch', 'elasticsearch', 'elasticsearch', 0750)
|
||||
copyEmptyDir('/usr/share/elasticsearch/plugins', 'root', 'root', 0755)
|
||||
|
||||
// the oss package conflicts with the default distribution and vice versa
|
||||
conflicts('elasticsearch' + (oss ? '' : '-oss'))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,11 @@ setup() {
|
|||
dpkg -I elasticsearch-oss-$(cat version).deb | grep "Depends:.*bash.*"
|
||||
}
|
||||
|
||||
@test "[DEB] package conflicts" {
|
||||
dpkg -I elasticsearch-oss-$(cat version).deb | grep "^ Conflicts: elasticsearch$"
|
||||
dpkg -I elasticsearch-$(cat version).deb | grep "^ Conflicts: elasticsearch-oss$"
|
||||
}
|
||||
|
||||
##################################
|
||||
# Install DEB package
|
||||
##################################
|
||||
|
|
|
@ -48,6 +48,11 @@ setup() {
|
|||
rpm -qpR elasticsearch-oss-$(cat version).rpm | grep '/bin/bash'
|
||||
}
|
||||
|
||||
@test "[RPM] package conflicts" {
|
||||
rpm -qp --conflicts elasticsearch-oss-$(cat version).rpm | grep "^elasticsearch\s*$"
|
||||
rpm -qp --conflicts elasticsearch-$(cat version).rpm | grep "^elasticsearch-oss\s*$"
|
||||
}
|
||||
|
||||
##################################
|
||||
# Install RPM package
|
||||
##################################
|
||||
|
|
Loading…
Reference in New Issue