[Pkg-xfce-commits] r2902 - scripts/pbuilder/hooks

corsac at alioth.debian.org corsac at alioth.debian.org
Thu Mar 5 06:33:13 UTC 2009


Author: corsac
Date: 2009-03-05 06:33:12 +0000 (Thu, 05 Mar 2009)
New Revision: 2902

Modified:
   scripts/pbuilder/hooks/D10aptupdate.sh
Log:
try to be smarter about cached mirrors


Modified: scripts/pbuilder/hooks/D10aptupdate.sh
===================================================================
--- scripts/pbuilder/hooks/D10aptupdate.sh	2009-03-04 07:04:12 UTC (rev 2901)
+++ scripts/pbuilder/hooks/D10aptupdate.sh	2009-03-05 06:33:12 UTC (rev 2902)
@@ -1,6 +1,8 @@
 #we use the first apt line to detect the bind-mounted archive folder
 ARCHIVE=$(awk 'NR==1 { print $2 }' /etc/apt/sources.list|sed 's/file\:\/\///')
-pushd $ARCHIVE
-dpkg-scanpackages -m . /dev/null > Packages
-popd
+if [ -d "$ARCHIVE" ]; then
+  pushd "$ARCHIVE"
+  dpkg-scanpackages -m . /dev/null > Packages
+  popd
+fi
 apt-get update




More information about the Pkg-xfce-commits mailing list