[25590] in Source-Commits
/svn/athena r25108 - trunk/debathena/third/openafs
daemon@ATHENA.MIT.EDU (Liz Denys)
Wed Apr 27 05:20:45 2011
Date: Wed, 27 Apr 2011 05:20:38 -0400
From: Liz Denys <lizdenys@MIT.EDU>
Message-Id: <201104270920.p3R9Kc6V032748@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: lizdenys
Date: 2011-04-27 05:20:38 -0400 (Wed, 27 Apr 2011)
New Revision: 25108
Modified:
trunk/debathena/third/openafs/debathenify-openafs
Log:
force installation of openafs-modules-dkms with bumped epoch
Modified: trunk/debathena/third/openafs/debathenify-openafs
===================================================================
--- trunk/debathena/third/openafs/debathenify-openafs 2011-04-27 06:42:19 UTC (rev 25107)
+++ trunk/debathena/third/openafs/debathenify-openafs 2011-04-27 09:20:38 UTC (rev 25108)
@@ -196,13 +196,6 @@
exit
fi
-if schq aptitude show openafs-modules-dkms > /dev/null; then
- # We don't need to build the metapackage if we already have
- # openafs-modules-dkms
- echo "*** Skipping metapackage creation as openafs-modules-dkms exists"
- exit
-fi
-
# For each upstream metapackage found, if we have an appropriate
# OpenAFS module, create and/or upload a metapackage tying the OpenAFS
# module to the current version of the upstream metapackage, if one
@@ -212,6 +205,12 @@
ver=$(echo "$info" | sed -ne 's/^Version: //p')
afs_mpkg=$(echo "$image_mpkg" | sed -e 's/^linux-image/openafs-modules/')
+ # Check if we have dkms
+ if schq aptitude show openafs-modules-dkms > /dev/null; then
+ # epoch
+ ver=1:1.0
+ fi
+
# Check if we already have an up-to-date OpenAFS metapackage.
repover=$(zcat $pkgfiles \
| dpkg-awk -f - "Package:^$(quote $afs_mpkg)\$" -- Version \
@@ -223,21 +222,31 @@
# Check if we have an OpenAFS module package, either in the apt
# repository or in the build directory.
- dep=$(echo "$info" | sed -ne 's/^Depends:.*\(linux-image-[^ ,]*\).*$/\1/p')
- module=$(echo "$dep" | sed -e 's/^linux-image/openafs-modules/')
- if ! zcat $pkgfiles | fgrep -qx "Package: $module"; then
- ch=$(ls "$dist_arch/$module"_*.changes 2>/dev/null)
- if [ -z "$ch" ]; then
- echo "*** No module: $dist_arch $afs_mpkg"
- continue
- fi
- fi
+ case $ver in
+ 1:*)
+ # using dkms
+ ;;
+ *)
+ dep=$(echo "$info" | sed -ne 's/^Depends:.*\(linux-image-[^ ,]*\).*$/\1/p')
+ module=$(echo "$dep" | sed -e 's/^linux-image/openafs-modules/')
+ if ! zcat $pkgfiles | fgrep -qx "Package: $module"; then
+ ch=$(ls "$dist_arch/$module"_*.changes 2>/dev/null)
+ if [ -z "$ch" ]; then
+ echo "*** No module: $dist_arch $afs_mpkg"
+ continue
+ fi
+ fi
+ ;;
+ esac
# Build the metapackage if requested.
if [ yes = "$do_binary" ]; then
echo "*** Creating: $dist_arch $afs_mpkg"
mkdir -p "meta/$dist_arch"
- cat > meta/$dist_arch/$afs_mpkg.equivs <<EOF
+ case $ver in
+ 1:*)
+ # using dkms
+ cat > meta/$dist_arch/$afs_mpkg.equivs <<EOF
Section: openafs
Priority: extra
Standards-Version: 3.6.2
@@ -245,6 +254,23 @@
Package: $afs_mpkg
Version: $ver$tag
Maintainer: Debathena Project <debathena@mit.edu>
+Depends: openafs-modules-dkms
+Copyright: ../common/copyright
+Readme: ../common/README.in
+Description: Transitional package to install dkms
+ Kernel specific openafs module packages are replaced with dkms
+ modules.
+EOF
+ ;;
+ *)
+ cat > meta/$dist_arch/$afs_mpkg.equivs <<EOF
+Section: openafs
+Priority: extra
+Standards-Version: 3.6.2
+
+Package: $afs_mpkg
+Version: $ver$tag
+Maintainer: Debathena Project <debathena@mit.edu>
Depends: $module, $image_mpkg (= $ver)
Copyright: ../common/copyright
Readme: ../common/README.in
@@ -253,6 +279,8 @@
kernel until there is a corresponding openafs-modules Debathena
package available.
EOF
+ ;;
+ esac
schr apt-get -y install equivs
(cd "meta/$dist_arch" && sch equivs-build -a "$arch" "$afs_mpkg.equivs") \
|| exit 1