From e7a1d090b86f3e99145a255967b4d49cbaf36087 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 16:30:43 -0300 Subject: Option disabling should be recursive. Fixing it. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'v4l/scripts') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 33a53d772..5f8866220 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -400,6 +400,19 @@ close OUT; disable_config('DVB_AV7110_FIRMWARE'); disable_config('DVB_CINERGYT2_TUNING'); +my $i; +do { + $i=0; + while ( my ($key,$value) = each(%kernopts) ) { + if ($value ne 'n') { + if (!deps_ok($key)) { + $kernopts{$key}='n'; + } + $i=$i+1; + } + } +} until (!$disable); + # Produce a .config file if it's forced or one doesn't already exist if (($force_kconfig eq 1) || !open IN,".config") { open OUT,">.config" or die; @@ -407,14 +420,6 @@ if (($force_kconfig eq 1) || !open IN,".config") { if (!$config{$key}) { print OUT "# CONFIG_$key is not set\n"; } elsif ($kernopts{$key}) { - my $ok=deps_ok($key); - - # If deps are not ok, mark default as n - if (!$ok) { -# print "$key disabled due to missing kernel required prereq\n"; - $kernopts{$key}='n'; - } - if ($kernopts{$key} eq 'n') { print OUT "# CONFIG_$key is not set\n"; } else { -- cgit v1.2.3 From 6ed34e3a513dd73f39d804e9416524bf5eb54be6 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 21 Jun 2006 19:07:45 -0300 Subject: building system fix: miropcm20 depends on sound/oss/aci.h From: Mauro Carvalho Chehab Most V4L/DVB hg tree users are just compiling using kernel headers. This is bad, due to: 1) the lack of support for make *config 2) the kernel itself have unknown patches from the distros Anyway, it is useful to provide they some support. This patch provides a "hack" for such users, by checking if the sound/oss/aci.h file is present under kernel tree. If not, it will disable miropcm20 and print a warning about the usage of a kernel-headers only package. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'v4l/scripts') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 5f8866220..807fea2e6 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -400,6 +400,20 @@ close OUT; disable_config('DVB_AV7110_FIRMWARE'); disable_config('DVB_CINERGYT2_TUNING'); +# Hack for check sound/oss/aci.h header + +my $mirodep="$kernel/sound/oss/aci.h"; +if (!open IN, $mirodep) { + my $key="RADIO_MIROPCM20"; + printf "$key: $mirodep is missing.\n"; + printf "It seems that you are using a kernel-headers only package\n"; + printf "kernel-headers only won't provide you make menuconfig/xconfig/qconfig\n"; + + $kernopts{$key}='n'; +} +close IN; + +# Recursively check for broken dependencies my $i; do { $i=0; -- cgit v1.2.3 From 78d2d7a1fea8c058e3ffa9dae7b6f96c3491a7ac Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 22 Jun 2006 11:47:13 -0300 Subject: Adjust filenames in the strip whitespace script output From: Trent Piepho Before: --- Makefile +++ - 2006-06-20 22:16:36.320564000 -0700 Now: --- Makefile +++ Makefile patch handles both correctly, but diffstat will use the "+++" filename rather than the "---" filename, making diffstat output rather useless. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/strip-trailing-whitespaces.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'v4l/scripts') diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh index 5bd7784e4..a546a0b9f 100755 --- a/v4l/scripts/strip-trailing-whitespaces.sh +++ b/v4l/scripts/strip-trailing-whitespaces.sh @@ -23,5 +23,6 @@ for file in `eval $files`; do s<^ {8}> <\t>; s<^ {1,7}\t> <\t>; while( s<\t {8}> <\t\t>g || s<\t {1,7}\t> <\t\t>g ) {}; - print' < "${file}" | diff -u "${file}" - + print' < "${file}" | \ + diff -u --label="$file" "$file" --label="$file" - done -- cgit v1.2.3 From 9a9c8e49eea524960d5fbead3d5794a0bd936500 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 22 Jun 2006 11:51:24 -0300 Subject: Have the commit auto-check code tell you when it does something From: Trent Piepho When the make commit checks for whitespace errors, it will save a copy of the changes it makes to $(TMP)/v4l_hg_whitespace. The prep_commit_msg.pl script will look for this file and include a note in the prepared commit message with diffstat output. The changes that scripts/cardlist might make are not included, but that can be added later. The prep_commit_msg.pl script is effectively totally re-written. This one will try some extra stuff to some up with the user's e-mail, such as looking in the ~/.hgrc file. The Makefile is changed so that temporary files created by make commit and make whitespace will honor the $TMP environment variable, if set. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/prep_commit_msg.pl | 73 ++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 24 deletions(-) (limited to 'v4l/scripts') diff --git a/v4l/scripts/prep_commit_msg.pl b/v4l/scripts/prep_commit_msg.pl index ac958667b..a4594c7f9 100755 --- a/v4l/scripts/prep_commit_msg.pl +++ b/v4l/scripts/prep_commit_msg.pl @@ -1,34 +1,59 @@ #!/usr/bin/perl -$f=shift; -open IN,"hg diff|diffstat -p1 |"; -my $n=2; -my $from=""; -my $first=""; -my $changed=""; -$out=""; -while () { - $changed="$changed#$_"; -} +my $autopatch = shift; +# Get Hg username from environment my $user = $ENV{HGUSER}; -if ( $user eq "" ) { +# Didn't work? Try the .hgrc file +if ($user eq "") { + open IN, "<$ENV{HOME}/.hgrc"; + while () { + if(/^\s*username\s*=\s*(\S.*)$/) { + $user = $1; + last; + } + } + close IN; +} + +# Still no luck? Try some other environment variables +if ($user eq "") { my $name = $ENV{CHANGE_LOG_NAME}; my $email = $ENV{CHANGE_LOG_EMAIL_ADDRESS}; + $user = "$name <$email>" if ($name ne "" || $email ne ""); +} + +# Last try to come up with something +if ($user eq "") { + $user = "$ENV{USER} <>"; +} - $user="$name <$email>"; +print "# Added/removed/changed files:\n"; +system "hg diff | diffstat -p1 -c"; +if (-s $autopatch) { + print "#\n# Note, a problem with your patch was detected! These changes were made\n"; + print "# automatically: $autopatch\n"; + system "diffstat -p0 -c $autopatch"; + print "#\n# Please review these changes and see if they belong in your patch or not.\n"; } +print <<"EOF"; +# +# For better log display, please keep a blank line after subject, after from, +# and before signed-off-by. +# First line should be the subject, without Subject: +# + + +# Now, patch author (just the main one), on a From: field +# Please change below if the committer is not the patch author. +# +From: $user + +# Then a detailed description: + -$first= "# Please change below if you are not patch author\n#\nFrom: $user"; -$out= "# At the end Signed-off-by: fields by patch author and committer, at least\n#\nSigned-off-by: $user"; -$from= "From: $user"; - -printf "#Added/removed/changed files:\n%s#\n" . - "# For better log display, please keep a blank line after subject, after from\n" . - "# and before signed-off-by\n" . - "# First line should be the subject, without Subject:\n#\n\n\n" . - "# Now, patch author (just the main one), on a From: field\n" . - "# Please change below if the committer is not the patch author\n#\n%s\n\n" . - "# Then a detailed description:\n\n\n%s", - $changed,$from,$out; +# At the end Signed-off-by: fields by patch author and committer, at least. +# +Signed-off-by: $user +EOF -- cgit v1.2.3 From b00987276ad2c4bef7891591a6ca2081a7d1e1d4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 22 Jun 2006 18:52:04 -0300 Subject: Improved message when only kernel headers are found From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_kconfig.pl | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'v4l/scripts') diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 807fea2e6..c58f5b028 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -405,10 +405,27 @@ disable_config('DVB_CINERGYT2_TUNING'); my $mirodep="$kernel/sound/oss/aci.h"; if (!open IN, $mirodep) { my $key="RADIO_MIROPCM20"; - printf "$key: $mirodep is missing.\n"; - printf "It seems that you are using a kernel-headers only package\n"; - printf "kernel-headers only won't provide you make menuconfig/xconfig/qconfig\n"; +print <<"EOF2"; +$key: $mirodep is missing. +***WARNING:*** You do not have the full kernel sources installed. +This does not prevent you from building the v4l-dvb tree if you have the +kernel headers, but the full kernel source is required in order to use +make menuconfig / xconfig / qconfig. + +If you are experiencing problems building the v4l-dvb tree, please try +building against a vanilla kernel before reporting a bug. + +Vanilla kernels are available at http://kernel.org. +On most distros, this will compile a newly downloaded kernel: + +cp /boot/config-`uname -r` /.config +cd +make all modules_install install + +Please see your distro's web site for instructions to build a new kernel. + +EOF2 $kernopts{$key}='n'; } close IN; -- cgit v1.2.3