Hello community, here is the log from the commit of package mkinitrd for openSUSE:Factory checked in at 2011-11-23 19:36:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mkinitrd (Old) and /work/SRC/openSUSE:Factory/.mkinitrd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "mkinitrd", Maintainer is "MMarek@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/mkinitrd/mkinitrd.changes 2011-11-14 13:17:08.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.mkinitrd.new/mkinitrd.changes 2011-11-23 19:36:57.000000000 +0100 @@ -1,0 +2,12 @@ +Tue Nov 22 12:29:02 UTC 2011 - mmarek@suse.cz + +- setup-modules: Allow aliases as dependencies in the SUSE INITRD + REQUIRES syntax (bnc#730617). + +------------------------------------------------------------------- +Tue Nov 22 11:02:18 UTC 2011 - mmarek@suse.cz + +- setup-modules: Fix adding more than one additional dependency to + modules (bnc#730617). + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mkinitrd.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.7.0/mkinitrd.changes new/mkinitrd-2.7.0/mkinitrd.changes --- old/mkinitrd-2.7.0/mkinitrd.changes 2011-11-09 23:19:02.000000000 +0100 +++ new/mkinitrd-2.7.0/mkinitrd.changes 2011-11-22 13:49:46.000000000 +0100 @@ -1,4 +1,16 @@ ------------------------------------------------------------------- +Tue Nov 22 12:29:02 UTC 2011 - mmarek@suse.cz + +- setup-modules: Allow aliases as dependencies in the SUSE INITRD + REQUIRES syntax (bnc#730617). + +------------------------------------------------------------------- +Tue Nov 22 11:02:18 UTC 2011 - mmarek@suse.cz + +- setup-modules: Fix adding more than one additional dependency to + modules (bnc#730617). + +------------------------------------------------------------------- Mon Nov 7 12:54:16 UTC 2011 - mmarek@suse.cz - Revert the NO_KMS_IN_INITRD -> KMS_IN_INITRD rename, it breaks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mkinitrd-2.7.0/scripts/setup-modules.sh new/mkinitrd-2.7.0/scripts/setup-modules.sh --- old/mkinitrd-2.7.0/scripts/setup-modules.sh 2011-11-09 23:19:02.000000000 +0100 +++ new/mkinitrd-2.7.0/scripts/setup-modules.sh 2011-11-22 13:49:46.000000000 +0100 @@ -150,7 +150,7 @@ else number=0 added=0 - for entry in ${additional_module_dependencies[@]} ; do + for entry in "${additional_module_dependencies[@]}" ; do local module2 requirements2 val module2=${entry/:*} requirements2=${entry/*:} @@ -181,52 +181,25 @@ # Checks for a given kernel modules if there are additional dependencies # found by load_additional_dependencies. # -# Prints a list (separated by ' ') of modules if there are additional -# dependencies. +# Prints a list (separated by whitespace or newlines) of modules +# if there are additional dependencies. # # Parameters # mod: the module for which additional depdencies should be found -# ver: the kernel version -# recursive: recursive call if 1, don't print the final newline -# -# Return value -# 0 (true) if there are additional dependencies, 1 (false) otherwise get_add_module_deps() { local mod=${1##*/} - local version=$2 - local recursive=$3 - local printed=0 mod=${mod%.ko} for entry in "${additional_module_dependencies[@]}" ; do - local module requirements m + local module requirements module=${entry/:*} requirements=${entry/*:} if [ "$module" = "$mod" ] ; then - for m in $requirements ; do - filename=$(modinfo -k "$version" -F filename $m) - if [ -z "$filename" ] ; then - echo >&2 "Ignoring additional requirement $mod REQUIRES $m" - else - echo -n "$filename " - get_add_module_deps "$m" "$version" 1 - printed=$[printed+1] - fi - done + echo $requirements fi done - - # build the return value - if [ $printed -ne 0 ] ; then - if [ "$recursive" -ne 1 ] ; then - echo "" - fi - return 0 - fi - - return 1 } # Resolve module dependencies and parameters. Returns a list of modules and @@ -236,6 +209,7 @@ local module= local supported= local additional_args= + local seen= shift if ! check_supported_kernel $kernel_version ; then @@ -248,6 +222,7 @@ module=${module##*/} shift + seen="$seen $module" # don't use a modprobe.conf to get rid of the install lines module_list=$(/sbin/modprobe \ -C /dev/null \ @@ -267,18 +242,16 @@ # check for additional requirements specified by # SUSE INITRD comments in /etc/modprobe.conf{,local,.d/*} - additional_reqs=$(get_add_module_deps "$mod" "$kernel_version" 0) - if [ $? -eq 0 ] ; then - local req - - for req in $additional_reqs ; do - if ! $(echo $resolved_modules | grep -qF $req) ; then - # put $req on the todo list to check for it's - # dependencies - set -- "$@" "$req" - fi - done - fi + local additional_reqs req + + additional_reqs=$(get_add_module_deps "$mod" "$kernel_version") + for req in $additional_reqs ; do + if ! printf '%s\n' "$@" $seen | grep -qFx "$req"; then + # put $req on the todo list to check for its + # dependencies + set -- "$@" "$req" + fi + done fi done done -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org