On Fri, Oct 14, 2005 at 12:53:41PM +0200, Jonas Smedegaard wrote: > That said, I also think I should be able to implement those options to > the mkinitrd.yaird wrapper - if upstream doesn't beat me to it ;-).
Is that an invitation :-? Here's a concept yaird patch; basically Sven's patch with a bit of extra error checking and a minimal host version. The patch claims support for 2.6.8, which is where development started, but later yaird versions only have had testing with newer kernels. If we could get away with claiming a later version, that can only reduce number of bug reports. BTW: I'm happy to see you'll move the yaird packaging to Alioth, that should give more continuity than a TLA archive I keep at home. Given the move to Aliot, I think further contributions from me could better be done as simple patches than as full packages. The combination of debian packaging and TLA I now use is cumbersome to say the least, so I'm eager to drop it. On a related note, there are some smallish fixes in the (offline) upstream archive; suggestions on how to make that better visible to you are welcome. Regards, Erik
Index: debian/mkinitrd.yaird =================================================================== --- debian.orig/mkinitrd.yaird 2005-09-17 17:02:26.000000000 +0200 +++ debian/mkinitrd.yaird 2005-10-15 08:03:30.000000000 +0200 @@ -24,7 +24,7 @@ PROG=mkinitrd.yaird outfile='' -while getopts "d:km:o:r:" flag; do +while getopts "d:km:o:r:-:" flag; do case $flag in d) echo "$PROG: $flag unsupported" @@ -44,6 +44,21 @@ echo "$PROG: $flag unsupported" exit 1 ;; + -) + case ${OPTARG%=*} in + supported-host-version) + supported_host_version=${OPTARG#*=} + ;; + supported-target-version) + supported_target_version=${OPTARG#*=} + ;; + *) + echo "$PROG: $OPTARG unsupported" + exit 1 + ;; + esac + ;; + *) echo "$PROG: unknown option $flag" exit 1 @@ -52,6 +67,26 @@ done shift $(($OPTIND - 1)) +if [ "$supported_host_version" != "" ] || [ "$supported_target_version" != "" ] +then + if [ "$supported_host_version" != "" ]; then + host_upstream_version=${supported_host_version%%-*} + if dpkg --compare-versions "$host_upstream_version" lt "2.6.8" + then + exit 1 + fi + fi + if [ "$supported_target_version" != "" ]; then + target_upstream_version=${supported_target_version%%-*} + if dpkg --compare-versions "$target_upstream_version" lt "2.6.8" + then + exit 1 + fi + + fi + exit 0 +fi + if [ "$outfile" = "" ]; then echo "$PROG: no output file specified" exit 1