Skip to content

Commit

Permalink
debian: changed package dependencies
Browse files Browse the repository at this point in the history
to get rid of a problem introduced when fixing #769536 (get rid of circular dependencies).
Now the package bareos-database-common can be installed and purged
without configure problems because of missing database backends.

Closes: #771870 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771870)
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Feb 17, 2015
1 parent efb0aba commit 53fa745
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 26 deletions.
10 changes: 5 additions & 5 deletions debian/bareos-database-common.postrm
Expand Up @@ -3,11 +3,11 @@
set -e

if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
. /usr/share/dbconfig-common/dpkg/postrm
dbc_go bareos-database-common $@
. /usr/share/debconf/confmodule
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
. /usr/share/dbconfig-common/dpkg/postrm
dbc_go bareos-database-common $@
fi
fi

#DEBHELPER#
10 changes: 6 additions & 4 deletions debian/bareos-database-common.prerm
Expand Up @@ -2,10 +2,12 @@

set -e

. /usr/share/debconf/confmodule
if [ -f /usr/share/dbconfig-common/dpkg/prerm ]; then
. /usr/share/dbconfig-common/dpkg/prerm
dbc_go bareos-database-common $@
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
if [ -f /usr/share/dbconfig-common/dpkg/prerm ]; then
. /usr/share/dbconfig-common/dpkg/prerm
dbc_go bareos-database-common $@
fi
fi

#DEBHELPER#
14 changes: 7 additions & 7 deletions debian/control
Expand Up @@ -109,7 +109,7 @@ Description: Backup Archiving Recovery Open Sourced - common files
Package: bareos-database-common
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-common (= ${binary:Version}), dbconfig-common, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), dbconfig-common, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Description: Backup Archiving Recovery Open Sourced - common catalog files
Bareos is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
Expand All @@ -121,7 +121,7 @@ Description: Backup Archiving Recovery Open Sourced - common catalog files
Package: bareos-database-postgresql
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-database-common (= ${binary:Version}), lsb-base (>= 3.2-13), postgresql-client, ${shlibs:Depends}, ${misc:Depends}
Depends: lsb-base (>= 3.2-13), postgresql-client, ${shlibs:Depends}, ${misc:Depends}
Suggests: postgresql
Description: Backup Archiving Recovery Open Sourced - PostgreSQL backend
Bareos is a set of programs to manage backup, recovery and verification of
Expand All @@ -134,7 +134,7 @@ Description: Backup Archiving Recovery Open Sourced - PostgreSQL backend
Package: bareos-database-mysql
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-database-common (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Depends: lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Suggests: mysql-server
Description: Backup Archiving Recovery Open Sourced - MySQL backend
Bareos is a set of programs to manage backup, recovery and verification of
Expand All @@ -147,7 +147,7 @@ Description: Backup Archiving Recovery Open Sourced - MySQL backend
Package: bareos-database-sqlite3
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-database-common (= ${binary:Version}), sqlite3, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Depends: sqlite3, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Description: Backup Archiving Recovery Open Sourced - SQLite backend
Bareos is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
Expand All @@ -159,8 +159,8 @@ Description: Backup Archiving Recovery Open Sourced - SQLite backend
Package: bareos-database-tools
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Conflicts: bacula-sd-mysql, bacula-sd-pgsql, bacula-sd-sqlite3
Depends: bareos-common (= ${binary:Version}), bareos-database-common (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Conflicts: bacula-sd-mysql, bacula-sd-pgsql, bacula-sd-sqlite3
Description: Backup Archiving Recovery Open Sourced - database tools
Bareos is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
Expand Down Expand Up @@ -197,7 +197,7 @@ Description: Backup Archiving Recovery Open Sourced - development files
Package: bareos-director
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0, adduser
Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), bareos-database-tools, lsb-base (>= 3.2-13), lsof, bsd-mailx | mailx, ${shlibs:Depends}, ${misc:Depends}
Depends: bareos-common (= ${binary:Version}), bareos-database-common (= ${binary:Version}), bareos-database-tools, lsb-base (>= 3.2-13), lsof, bsd-mailx | mailx, ${shlibs:Depends}, ${misc:Depends}
Recommends: logrotate
Conflicts: bacula-director
Replaces: bacula-director
Expand Down
14 changes: 7 additions & 7 deletions debian/control.in
Expand Up @@ -109,7 +109,7 @@ Description: Backup Archiving Recovery Open Sourced - common files
Package: bareos-database-common
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-common (= ${binary:Version}), dbconfig-common, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), dbconfig-common, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Description: Backup Archiving Recovery Open Sourced - common catalog files
Bareos is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
Expand All @@ -121,7 +121,7 @@ Description: Backup Archiving Recovery Open Sourced - common catalog files
Package: bareos-database-postgresql
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-database-common (= ${binary:Version}), lsb-base (>= 3.2-13), postgresql-client, ${shlibs:Depends}, ${misc:Depends}
Depends: lsb-base (>= 3.2-13), postgresql-client, ${shlibs:Depends}, ${misc:Depends}
Suggests: postgresql
Description: Backup Archiving Recovery Open Sourced - PostgreSQL backend
Bareos is a set of programs to manage backup, recovery and verification of
Expand All @@ -134,7 +134,7 @@ Description: Backup Archiving Recovery Open Sourced - PostgreSQL backend
Package: bareos-database-mysql
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-database-common (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Depends: lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Suggests: mysql-server
Description: Backup Archiving Recovery Open Sourced - MySQL backend
Bareos is a set of programs to manage backup, recovery and verification of
Expand All @@ -147,7 +147,7 @@ Description: Backup Archiving Recovery Open Sourced - MySQL backend
Package: bareos-database-sqlite3
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-database-common (= ${binary:Version}), sqlite3, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Depends: sqlite3, lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Description: Backup Archiving Recovery Open Sourced - SQLite backend
Bareos is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
Expand All @@ -159,8 +159,8 @@ Description: Backup Archiving Recovery Open Sourced - SQLite backend
Package: bareos-database-tools
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Conflicts: bacula-sd-mysql, bacula-sd-pgsql, bacula-sd-sqlite3
Depends: bareos-common (= ${binary:Version}), bareos-database-common (= ${binary:Version}), lsb-base (>= 3.2-13), ${shlibs:Depends}, ${misc:Depends}
Conflicts: bacula-sd-mysql, bacula-sd-pgsql, bacula-sd-sqlite3
Description: Backup Archiving Recovery Open Sourced - database tools
Bareos is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
Expand Down Expand Up @@ -197,7 +197,7 @@ Description: Backup Archiving Recovery Open Sourced - development files
Package: bareos-director
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0, adduser
Depends: bareos-common (= ${binary:Version}), bareos-database-postgresql (= ${binary:Version}) | bareos-database-mysql (= ${binary:Version}) | bareos-database-sqlite3 (= ${binary:Version}), bareos-database-tools, lsb-base (>= 3.2-13), lsof, bsd-mailx | mailx, ${shlibs:Depends}, ${misc:Depends}
Depends: bareos-common (= ${binary:Version}), bareos-database-common (= ${binary:Version}), bareos-database-tools, lsb-base (>= 3.2-13), lsof, bsd-mailx | mailx, ${shlibs:Depends}, ${misc:Depends}
Recommends: logrotate
Conflicts: bacula-director
Replaces: bacula-director
Expand Down
11 changes: 8 additions & 3 deletions scripts/bareos-config-lib.sh.in
Expand Up @@ -375,11 +375,11 @@ get_database_param()

# use || to prevent errors
rc=0
DBCHECK_OUTPUT=`$DBCHECK` || rc=$?
temp_log="/tmp/bareos-config.$$.log"
DBCHECK_OUTPUT=`$DBCHECK 2>> $temp_log` || rc=$?
if [ $rc != 0 ]; then
temp_log="/tmp/bareos-config.$$.log"
echo "executing: $DBCHECK" >> $temp_log
echo "${DBCHECK_OUTPUT}" >> $temp_log
echo "Error: executing $DBCHECK" >> $temp_log
echo "" >> $temp_log

# if default value is given, return it anyway
Expand All @@ -393,6 +393,11 @@ get_database_param()
return 1
fi

# if $temp_log exists, but have only size 0, remove it.
if [ -e $temp_log ] && ! [ -s $temp_log ]; then
rm $temp_log
fi

# DBCHECK gets the database parameter from the Director config file in a standard format,
# however, it writes "db_name" (like the environment variables)
# instead of "dbname" like in the config file.
Expand Down

0 comments on commit 53fa745

Please sign in to comment.