r4473 - dists/trunk/utils/yaird/debian
Sven Luther
luther at costa.debian.org
Sun Oct 16 09:51:26 UTC 2005
Author: luther
Date: 2005-10-16 09:51:26 +0000 (Sun, 16 Oct 2005)
New Revision: 4473
Modified:
dists/trunk/utils/yaird/debian/changelog
dists/trunk/utils/yaird/debian/control
dists/trunk/utils/yaird/debian/mkinitrd.yaird
dists/trunk/utils/yaird/debian/mkinitrd.yaird.8
Log:
Checked in patch posted by Erik and Jonas, fixed manpage and added linux-ramdisk-tool Provides.
Modified: dists/trunk/utils/yaird/debian/changelog
===================================================================
--- dists/trunk/utils/yaird/debian/changelog 2005-10-16 09:41:17 UTC (rev 4472)
+++ dists/trunk/utils/yaird/debian/changelog 2005-10-16 09:51:26 UTC (rev 4473)
@@ -1,3 +1,11 @@
+yaird (0.0.11-5) UNRELEASED; urgency=low
+
+ * Added --supported-(host|target)-version support for the new post-2.6.13
+ ramdisk-tool policy. Added linux-ramdisk-tool virtual package too.
+ (Sven Luther) (Closes: #333858)
+
+ -- Sven Luther <luther at debian.org> Sun, 16 Oct 2005 11:46:07 +0200
+
yaird (0.0.11-4) unstable; urgency=low
* Patch perl/Parser.pm to allow identifiers with leading digit or
Modified: dists/trunk/utils/yaird/debian/control
===================================================================
--- dists/trunk/utils/yaird/debian/control 2005-10-16 09:41:17 UTC (rev 4472)
+++ dists/trunk/utils/yaird/debian/control 2005-10-16 09:51:26 UTC (rev 4473)
@@ -8,6 +8,7 @@
Package: yaird
Architecture: any
Depends: ${shlibs:Depends}, ${perl:Depends}, libhtml-template-perl, dash, libparse-recdescent-perl
+Provides: linux-ramdisk-tool
Suggests: doc-base
Description: Yet Another mkInitRD
Yaird generates initial boot images in initramfs format.
Modified: dists/trunk/utils/yaird/debian/mkinitrd.yaird
===================================================================
--- dists/trunk/utils/yaird/debian/mkinitrd.yaird 2005-10-16 09:41:17 UTC (rev 4472)
+++ dists/trunk/utils/yaird/debian/mkinitrd.yaird 2005-10-16 09:51:26 UTC (rev 4473)
@@ -24,40 +24,78 @@
PROG=mkinitrd.yaird
outfile=''
-while getopts "d:km:o:r:" flag; do
- case $flag in
- d)
- echo "$PROG: $flag unsupported"
+TEMP=`getopt -o d:km:o:r: --long supported-host-version:,supported-target-version: -n "$prg" -- "$@"`
+
+# Check for non-GNU getopt
+if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+
+eval set -- "$TEMP"
+
+while true ; do
+ case "$1" in
+ -d)
+ echo "$PROG: $1 unsupported" >&2
exit 1
;;
- k)
- echo "$PROG: $flag unsupported"
+ -k)
+ echo "$PROG: $1 unsupported" >&2
exit 1
;;
- m)
- # ignore
+ -m)
+ # ignore
+ shift 2
;;
- o)
- outfile="$OPTARG"
+ -o)
+ outfile="$2"
+ shift 2
;;
- r)
- echo "$PROG: $flag unsupported"
+ -r)
+ echo "$PROG: $1 unsupported" >&2
exit 1
;;
+ --supported-host-version)
+ supported_host_version="$2"
+ shift 2
+ ;;
+ --supported-target-version)
+ supported_target_version="$2"
+ shift 2
+ ;;
+ --)
+ shift
+ break
+ ;;
*)
- echo "$PROG: unknown option $flag"
+ echo "Internal error!" >&2
exit 1
;;
esac
done
-shift $(($OPTIND - 1))
+if [ -n "$supported_host_version" ] || [ -n "$supported_target_version" ]; then
+ if [ -n "$supported_host_version" ]; then
+ host_upstream_version=${supported_host_version%%-*}
+ if dpkg --compare-versions "$host_upstream_version" lt "2.6.8"; then
+ echo "$PROG: host version too old" >&2
+ exit 1
+ fi
+ fi
+ if [ -n "$supported_target_version" ]; then
+ target_upstream_version=${supported_target_version%%-*}
+ if dpkg --compare-versions "$target_upstream_version" lt "2.6.8"; then
+ echo "$PROG: target version too old" >&2
+ exit 1
+ fi
+ fi
+ exit 0
+fi
+
if [ "$outfile" = "" ]; then
- echo "$PROG: no output file specified"
+ echo "$PROG: no output file specified" >&2
exit 1
fi
if [ $# -gt 1 ]; then
- echo "$PROG: extra arguments found"
+ echo "$PROG: extra arguments found" >&2
exit 1
fi
@@ -76,7 +114,7 @@
case $VERSION in
*/*)
- echo $PROG: $VERSION is not a valid kernel version >&2
+ echo "$PROG: $VERSION is not a valid kernel version" >&2
exit 1
;;
esac
Modified: dists/trunk/utils/yaird/debian/mkinitrd.yaird.8
===================================================================
--- dists/trunk/utils/yaird/debian/mkinitrd.yaird.8 2005-10-16 09:41:17 UTC (rev 4472)
+++ dists/trunk/utils/yaird/debian/mkinitrd.yaird.8 2005-10-16 09:51:26 UTC (rev 4473)
@@ -5,6 +5,14 @@
.B mkinitrd.yaird
.BI -o destination
.RI [ version ]
+
+
+.B mkinitrd.yaird
+.RB [ \-\-supported-host-version=
+.IR hversion ]
+.RB [ \-\-supported-target-version=
+.IR tversion ]
+
.SH DESCRIPTION
.I Mkinitrd.yaird
is a wrapper around
@@ -27,19 +35,43 @@
Support for the ramdisk variable is built into the kernel package;
it is available in Debian kernels packaged since june 2005.
+
+.PP
+
+The second syntax returns 0 if mkinitrd can create a ramdisk running on a kernel
+of the given host version (
+.IR hversion
+) and for a kernel of the given target version (
+.IR tversions
+), and 1 otherwise.
+
.SH OPTIONS
+
.TP
.BI "-o" destination
Place result here.
The destination must not exist yet.
There is no default for this option.
+
.TP
.BI "-m" command
This option is ignored.
+
.TP
+\fB\-\-supported-host-version=\fIhversion
+This option queries if mkinitrd can create ramdisks on a running kernel of version
+.IR hversion .
+
+.TP
+\fB\-\-supported-target-version=\fItversion
+This option queries if mkinitrd can create ramdisks for kernel version
+.IR tversion .
+
+.TP
version
The kernel version for which the initial boot image
is to be generated.
+
.SH AUTHOR
Erik van Konijnenburg <ekonijn at xs4all.nl>
.SH SEE ALSO
More information about the Kernel-svn-changes
mailing list