[Fai-commit] r5585 - in trunk: bin debian man
Thomas Lange
lange at alioth.debian.org
Thu Oct 22 13:29:29 UTC 2009
Author: lange
Date: 2009-10-22 13:29:28 +0000 (Thu, 22 Oct 2009)
New Revision: 5585
Modified:
trunk/bin/fai-mirror
trunk/debian/changelog
trunk/man/fai-mirror.1
Log:
add option -a (closes: #343344, #412889)
* fai-mirror.8: add option -a
Modified: trunk/bin/fai-mirror
===================================================================
--- trunk/bin/fai-mirror 2009-10-21 14:56:30 UTC (rev 5584)
+++ trunk/bin/fai-mirror 2009-10-22 13:29:28 UTC (rev 5585)
@@ -25,7 +25,7 @@
# MA 02111-1307, USA.
#*********************************************************************
-version="Version 1.10, 19-july-2009"
+version="Version 1.11, 19-july-2009"
# variables: NFSROOT, FAI_CONFIGDIR, FAI_ETC_DIR
@@ -69,7 +69,6 @@
classes="$newclass"
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
umount_dirs() {
[ "$FAI_DEBMIRROR" ] && umount $MNTPOINT 2>/dev/null 1>&2 || true
@@ -111,6 +110,10 @@
-o Dir::Etc=$aptcache/etc/apt/ \
-o Dir::State::Lists=$aptcache/var/lib/apt/lists/"
+ if [ -n "$arch" ]; then
+ aptoptions="$aptoptions -o APT::Architecture=$arch" # add architecture
+ fi
+
# not needed
# -o APT::Get::ReInstall
# ."-o APT::Get::Download-Only=true -o Aptitude::Cmd-Line::Download-Only=true "
@@ -197,8 +200,9 @@
verbose=0
add=1
qflag=-qq
-while getopts "Bvhx:pc:C:" opt ; do
+while getopts "a:Bvhx:pc:C:" opt ; do
case "$opt" in
+ a) arch=$OPTARG ;;
B) add=0 ;;
C) cfdir=$OPTARG ;;
h) usage ;;
@@ -286,6 +290,7 @@
CONTENTS=no
PKGCOMP='none gzip'
EOF
+[ -n "$arch" ] && echo "ARCH=$arch" >> $aptmovefile # append architecture
apt-move $qflag -c $aptmovefile update
# since Packages.gz from apt-move does not include packages from my
# repository, let's use apt-ftparchive for generiating correct index
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-10-21 14:56:30 UTC (rev 5584)
+++ trunk/debian/changelog 2009-10-22 13:29:28 UTC (rev 5585)
@@ -38,6 +38,8 @@
* fai-savelog: cd to the right place if LOGREMOTEDIR is set, thanks to
Robin Powell for the patch (closes: #515704)
* fai-mirror: remove use of $addpackages (closes: #537544)
+ add option -a (closes: #343344, #412889)
+ * fai-mirror.8: add option -a
* fai.conf, make-fai-nfsroot.conf: move FAI_CONFIGDIR to m-f-n.conf,
because it's only needed on an install server
add comment, rearrange variables, important variables first
Modified: trunk/man/fai-mirror.1
===================================================================
--- trunk/man/fai-mirror.1 2009-10-21 14:56:30 UTC (rev 5584)
+++ trunk/man/fai-mirror.1 2009-10-22 13:29:28 UTC (rev 5585)
@@ -1,7 +1,7 @@
.\" Hey, EMACS: -*- nroff -*-
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH fai-mirror 1 "1 December 2008" "FAI 3.2"
+.TH fai-mirror 1 "22 October 2009" "FAI 3.3"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -51,6 +51,10 @@
.SH OPTIONS
.TP
+.B \-a ARCH
+Download packages from architecture ARCH. If not specified, use native
+architecture of host.
+.TP
.BI \-B
Do not add packages included in base.tgz and packages defined in
make-fai-nfsroot.conf to the mirror. By default all these packages are
@@ -89,7 +93,11 @@
Creates a partial mirror containing all packages used in the classes
DEFAULT and DEMO.
+ # fai-mirror \-v \-cDEFAULT,AMD64 /srv/debmirrir-amd64
+Will create a mirror including packages for amd64 architecture defined
+for classes DEFAULT and AMD64. You can also run this on a non amd64 host.
+
.SH NOTES
You only need root permissions if you access the official Debian
mirror via NFS. By default, the variable MAXPACKAGES is set to 1, so
More information about the Fai-commit
mailing list