[Apt-zip-devel] r74 - in trunk: . debian methods
eddyp-guest at alioth.debian.org
eddyp-guest at alioth.debian.org
Tue Mar 18 08:48:54 UTC 2008
Author: eddyp-guest
Date: 2008-03-18 08:48:53 +0000 (Tue, 18 Mar 2008)
New Revision: 74
Modified:
trunk/apt-zip-inst
trunk/apt-zip-list
trunk/apt-zip.sgml
trunk/common.sh.in
trunk/debian/changelog
trunk/debian/control
trunk/debian/rules
trunk/methods/wget
Log:
added files that made release 0.16
Modified: trunk/apt-zip-inst
===================================================================
--- trunk/apt-zip-inst 2006-07-24 00:18:52 UTC (rev 73)
+++ trunk/apt-zip-inst 2008-03-18 08:48:53 UTC (rev 74)
@@ -12,15 +12,7 @@
check_medium
az_mount
-if [ -r "${MEDIUM}/${APTZIPTARFILE}" ]
-then
- echo >&2 "Unpacking tarball..."
- ( cd /var/cache/apt/archive ; tar xf ${MEDIUM}/${APTZIPTARFILE} )
- APTZIPINSFILE="${MEDIUM}/${APTZIPINSFILE}"
-else
- APTGETCACHE="-o dir::cache::archives=${MEDIUM}"
- APTZIPINSFILE="${MEDIUM}/${APTZIPINSFILE}"
-fi
+APTZIPINSFILE="${MEDIUM}/${APTZIPINSFILE}"
if [ -r "${APTZIPINSFILE}" ] ; then
. "${APTZIPINSFILE}"
@@ -33,6 +25,35 @@
[ -z "$APTGETACTION" ] && APTGETACTION=${DEF_APTGETACTION}
[ -z "$APTGETEXTRAOPTS" ] && APTGETEXTRAOPTS=${DEF_APTGETEXTRAOPTS}
+if [ -r "${MEDIUM}/${APTZIPTARFILE}" ]
+then
+ if [ "$APTGETACTION" = "update" ]
+ then
+ EXTRACTDIR=/var/lib/apt/lists
+ echo >&2 "Uncompressing index archives..."
+ (
+ cd $EXTRACTDIR
+ tar xvf ${MEDIUM}/${APTZIPTARFILE} |
+ while read FILE
+ do
+ [ `basename "$FILE" .bz2` != "$FILE" ] && bunzip2 -f "$FILE"
+ [ `basename "$FILE" .gz` != "$FILE" ] && gunzip -f "$FILE"
+ done
+ rm -f foo-stamp
+ )
+ else
+ EXTRACTDIR=/var/cache/apt/archive
+ echo >&2 "Unpacking tarball..."
+ ( cd $EXTRACTDIR ; tar xvf ${MEDIUM}/${APTZIPTARFILE} )
+ fi
+else
+ [ "$APTGETACTION" = "update" ] \
+ && echo "Error: the \`tar' option should be set when using" \
+ "\`--aptgetaction update'" \
+ && exit 1
+ APTGETCACHE="-o dir::cache::archives=${MEDIUM}"
+fi
+
APTGETEXTRAOPTS="${APTGETEXTRAOPTS} ${APTGETCACHE}"
[ -n "$PACKAGES" ] && apt-get ${APTGETEXTRAOPTS} install $PACKAGES
Modified: trunk/apt-zip-list
===================================================================
--- trunk/apt-zip-list 2006-07-24 00:18:52 UTC (rev 73)
+++ trunk/apt-zip-list 2008-03-18 08:48:53 UTC (rev 74)
@@ -56,6 +56,7 @@
echo $_SZ
}
)
+[ "$DWLSIZE" -eq "0" ] && DWLSIZE=unknown
export DWLSIZE
PACKCOUNT=`cat "$TMP" | wc -l`
export PACKCOUNT
@@ -70,10 +71,28 @@
export SLEEPTIME
export SLEEPCMD=`eval "$SLEEPEVALCMD"`
export CHECK=`eval "$CHECKEVALCMD"`
+export APTGETACTION
# Write the script
SCRIPT="${MEDIUM}"/fetch-script-$METHOD-$(uname -n)
+if [ "$APTGETACTION" = "update" ]
+then
+ [ "$OPTION_TAR" = "0" ] \
+ && echo "Error: the \`tar' option should be set when using" \
+ "\`--aptgetaction update'" \
+ && exit 1
+
+ # Remove .bz2 and .gz extension from the `Packages' and
+ # `Sources' index files
+ perl -pn -i.bak \
+ -e 's/Packages\.bz2\s/Packages /;' \
+ -e 's/Packages\.gz\s/Packages /;' \
+ -e 's/Sources\.bz2\s/Sources /;' \
+ -e 's/Sources\.gz\s/Sources /;' \
+ $TEMP
+fi
+
# --print-uris shows: URI filename size-in-bytes md5
$FILTER < "$TEMP" >"$SCRIPT"
if [ $? != 0 ]
Modified: trunk/apt-zip.sgml
===================================================================
--- trunk/apt-zip.sgml 2006-07-24 00:18:52 UTC (rev 73)
+++ trunk/apt-zip.sgml 2008-03-18 08:48:53 UTC (rev 74)
@@ -44,7 +44,7 @@
<title>DESCRIPTION</title>
<simpara>
- This manpage should be up-to-date with version 0.14 of the
+ This manpage should be up-to-date with version 0.16 of the
programs.
</simpara>
Modified: trunk/common.sh.in
===================================================================
--- trunk/common.sh.in 2006-07-24 00:18:52 UTC (rev 73)
+++ trunk/common.sh.in 2008-03-18 08:48:53 UTC (rev 74)
@@ -8,7 +8,7 @@
SKIPMOUNT=no
APTGETEXTRAOPTS=""
-KNOWNAPTGETACTIONS=" dselect-upgrade upgrade dist-upgrade "
+KNOWNAPTGETACTIONS=" dselect-upgrade upgrade dist-upgrade update "
KNOWNOPTIONS="TAR GNUTAR SOLARISTAR RESTART"
DEFAULT_TAR=tar
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-07-24 00:18:52 UTC (rev 73)
+++ trunk/debian/changelog 2008-03-18 08:48:53 UTC (rev 74)
@@ -1,9 +1,17 @@
-apt-zip (0.16) UNRELEASED; urgency=low
+apt-zip (0.16) unstable; urgency=low
+ [Eddy Petrișor ]
* more indenting improvement in common.sh.in file
- -- Eddy Petrișor <eddy.petrisor at gmail.com> Mon, 5 Jun 2006 22:44:21 +0300
+ [François Févotte]
+ * add possibility to run update, too, thanks to François Févotte for the
+ patch (Closes: #43622, #133117, #223372)
+ [Giacomo Catenazzi]
+ * correct docbook dependencies, update doc version
+
+ -- Giacomo Catenazzi <cate at debian.org> Wed, 20 Jun 2007 17:42:19 +0200
+
apt-zip (0.15) unstable; urgency=low
[ Eddy Petrișor ]
Modified: trunk/debian/control
===================================================================
--- trunk/debian/control 2006-07-24 00:18:52 UTC (rev 73)
+++ trunk/debian/control 2008-03-18 08:48:53 UTC (rev 74)
@@ -1,11 +1,11 @@
Source: apt-zip
Section: admin
Priority: extra
-Build-Depends-Indep: docbook-utils
+Build-Depends-Indep: docbook-utils, docbook
Build-Depends: debhelper (>= 5)
Maintainer: Giacomo Catenazzi <cate at debian.org>
-Uploaders: Eddy Petrișor <eddy.petrisor at gmail.com>
-Standards-Version: 3.7.2
+Uploaders: Eddy Petrișor <eddy.petrisor at gmail.com>, François Févotte <francois.fevotte at ensta.org>
+Standards-Version: 3.7.2.2
Package: apt-zip
Architecture: all
Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules 2006-07-24 00:18:52 UTC (rev 73)
+++ trunk/debian/rules 2008-03-18 08:48:53 UTC (rev 74)
@@ -27,7 +27,7 @@
dh_testroot
rm -f build-stamp
- -$(MAKE) clean
+ [ ! -f Makefile ] || $(MAKE) clean
dh_clean
Modified: trunk/methods/wget
===================================================================
--- trunk/methods/wget 2006-07-24 00:18:52 UTC (rev 73)
+++ trunk/methods/wget 2008-03-18 08:48:53 UTC (rev 74)
@@ -31,6 +31,8 @@
[ ! "${USEMD5SUMS}" = 'no' ] && cat <<-EOF
check(){
[ ! -r "\$1" ] && return 1
+ [ "\$2" = "0" ] && return \$3
+ [ "\$2" = "" ] && return \$3
[ "\`type md5sum\`" ] &&
if [ "\`md5sum \$1 | cut -d' ' -f1\`" = \$2 ]
then return 0
@@ -125,6 +127,7 @@
fi
fi
+
###############
# Stuff dependant on TAR option
#
@@ -144,9 +147,34 @@
cat <<-EOF
getfile(){
- do_wget \$1 \$2 \$3 \$4 &&
- $TAR $TARADD $APTZIPTARFILE \$2 &&
- rm \$2
+EOF
+
+ #################
+ # Stuff dependent on the update action
+ #
+
+ if [ "$APTGETACTION" = "update" ] ; then
+ cat <<-EOF
+ FILE=""
+ for EXT in ".bz2" ".gz" ""
+ do
+ do_wget \$1\$EXT \$2\$EXT \$3 \$4 &&
+ FILE=\$2\$EXT &&
+ break
+ rm -f \$2\$EXT
+ done
+ [ "\$FILE" = "" ] && return 1
+EOF
+ else
+ cat <<-EOF
+ do_wget \$1 \$2 \$3 \$4 || return 1
+ FILE=\$2
+EOF
+ fi
+
+ cat <<-EOF
+ $TAR $TARADD $APTZIPTARFILE \$FILE &&
+ rm \$FILE
}
touch foo-stamp && "$OPTION_TAR" cf "$APTZIPTARFILE" foo-stamp && rm foo-stamp
More information about the apt-zip-devel
mailing list