Hello community,
here is the log from the commit of package yast2-devtools
checked in at Thu Oct 12 15:14:17 CEST 2006.
--------
--- yast2-devtools/yast2-devtools.changes 2006-09-25 15:57:59.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-devtools/yast2-devtools.changes 2006-10-12 11:03:25.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Oct 11 19:06:21 CEST 2006 - mvidner@suse.cz
+
+- "make dist" will honor CHECK_SYNTAX=false
+- 2.13.27
+
+-------------------------------------------------------------------
Old:
----
yast2-devtools-2.13.26.tar.bz2
New:
----
yast2-devtools-2.13.27.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-devtools.spec ++++++
--- /var/tmp/diff_new_pack.2ZcvMK/_old 2006-10-12 15:11:35.000000000 +0200
+++ /var/tmp/diff_new_pack.2ZcvMK/_new 2006-10-12 15:11:35.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-devtools (Version 2.13.26)
+# spec file for package yast2-devtools (Version 2.13.27)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-devtools
-Version: 2.13.26
+Version: 2.13.27
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-devtools-2.13.26.tar.bz2
+Source0: yast2-devtools-2.13.27.tar.bz2
prefix: /usr
BuildRequires: docbook-xsl-stylesheets gcc-c++ libxslt perl-XML-Writer sgml-skel
Requires: perl
@@ -48,7 +48,7 @@
Michal Svec
%prep
-%setup -n yast2-devtools-2.13.26
+%setup -n yast2-devtools-2.13.27
%build
autoreconf --force --install
@@ -86,6 +86,9 @@
%doc %{prefix}/share/doc/packages/yast2-devtools
%changelog -n yast2-devtools
+* Wed Oct 11 2006 - mvidner@suse.cz
+- "make dist" will honor CHECK_SYNTAX=false
+- 2.13.27
* Mon Sep 25 2006 - mvidner@suse.cz
- Docbook configure check: fixed when no catalog found, and
don't overwrite config.log.
++++++ yast2-devtools-2.13.26.tar.bz2 -> yast2-devtools-2.13.27.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.26/Makefile.am.common new/yast2-devtools-2.13.27/Makefile.am.common
--- old/yast2-devtools-2.13.26/Makefile.am.common 2006-09-25 15:59:40.000000000 +0200
+++ new/yast2-devtools-2.13.27/Makefile.am.common 2006-10-12 11:07:56.000000000 +0200
@@ -29,7 +29,19 @@
dist-hook: check-syntax
+CHECK_SYNTAX = true
check-syntax: $(client_DATA) $(ycpchook)
- if test "$(client_DATA)"; then $(bindir)/ycpc -qE -M. -I. $(YCPCFLAGS) $(filter %.ycp,$^) || exit 1; fi
+ @if test "$(client_DATA)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.ycp,$^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
+ exit 1; \
+ fi; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
+ fi
-include .dep
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.26/VERSION new/yast2-devtools-2.13.27/VERSION
--- old/yast2-devtools-2.13.26/VERSION 2006-09-25 15:57:13.000000000 +0200
+++ new/yast2-devtools-2.13.27/VERSION 2006-10-12 11:03:09.000000000 +0200
@@ -1 +1 @@
-2.13.26
+2.13.27
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.26/configure new/yast2-devtools-2.13.27/configure
--- old/yast2-devtools-2.13.26/configure 2006-09-25 16:00:09.000000000 +0200
+++ new/yast2-devtools-2.13.27/configure 2006-10-12 11:08:36.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for yast2-devtools 2.13.26.
+# Generated by GNU Autoconf 2.59 for yast2-devtools 2.13.27.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -423,8 +423,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-devtools'
PACKAGE_TARNAME='yast2-devtools'
-PACKAGE_VERSION='2.13.26'
-PACKAGE_STRING='yast2-devtools 2.13.26'
+PACKAGE_VERSION='2.13.27'
+PACKAGE_STRING='yast2-devtools 2.13.27'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -959,7 +959,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-devtools 2.13.26 to adapt to many kinds of systems.
+\`configure' configures yast2-devtools 2.13.27 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1026,7 +1026,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-devtools 2.13.26:";;
+ short | recursive ) echo "Configuration of yast2-devtools 2.13.27:";;
esac
cat <<\_ACEOF
@@ -1169,7 +1169,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-yast2-devtools configure 2.13.26
+yast2-devtools configure 2.13.27
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1183,7 +1183,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-devtools $as_me 2.13.26, which was
+It was created by yast2-devtools $as_me 2.13.27, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1913,7 +1913,7 @@
# Define the identity of the package.
PACKAGE='yast2-devtools'
- VERSION='2.13.26'
+ VERSION='2.13.27'
cat >>confdefs.h <<_ACEOF
@@ -2124,7 +2124,7 @@
-VERSION="2.13.26"
+VERSION="2.13.27"
RPMNAME="yast2-devtools"
MAINTAINER="Martin Vidner "
@@ -20003,7 +20003,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by yast2-devtools $as_me 2.13.26, which was
+This file was extended by yast2-devtools $as_me 2.13.27, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20061,7 +20061,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-devtools config.status 2.13.26
+yast2-devtools config.status 2.13.27
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.26/configure.in new/yast2-devtools-2.13.27/configure.in
--- old/yast2-devtools-2.13.26/configure.in 2006-09-25 15:59:39.000000000 +0200
+++ new/yast2-devtools-2.13.27/configure.in 2006-10-12 11:07:55.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.13.18 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-devtools, 2.13.26, http://bugs.opensuse.org/, yast2-devtools)
+AC_INIT(yast2-devtools, 2.13.27, http://bugs.opensuse.org/, yast2-devtools)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.13.26"
+VERSION="2.13.27"
RPMNAME="yast2-devtools"
MAINTAINER="Martin Vidner "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.26/devtools/admin/Makefile.am.common new/yast2-devtools-2.13.27/devtools/admin/Makefile.am.common
--- old/yast2-devtools-2.13.26/devtools/admin/Makefile.am.common 2005-11-10 19:12:13.000000000 +0100
+++ new/yast2-devtools-2.13.27/devtools/admin/Makefile.am.common 2006-10-12 11:02:53.000000000 +0200
@@ -29,7 +29,19 @@
dist-hook: check-syntax
+CHECK_SYNTAX = true
check-syntax: $(client_DATA) $(ycpchook)
- if test "$(client_DATA)"; then $(bindir)/ycpc -qE -M. -I. $(YCPCFLAGS) $(filter %.ycp,$^) || exit 1; fi
+ @if test "$(client_DATA)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.ycp,$^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
+ exit 1; \
+ fi; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
+ fi
-include .dep
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.26/devtools/bin/version new/yast2-devtools-2.13.27/devtools/bin/version
--- old/yast2-devtools-2.13.26/devtools/bin/version 2006-09-25 16:01:15.000000000 +0200
+++ new/yast2-devtools-2.13.27/devtools/bin/version 2006-10-12 11:11:01.000000000 +0200
@@ -1,5 +1,5 @@
#!/bin/bash
-echo 2.13.26
+echo 2.13.27
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.26/devtools/bin/y2makeall new/yast2-devtools-2.13.27/devtools/bin/y2makeall
--- old/yast2-devtools-2.13.26/devtools/bin/y2makeall 2006-09-06 18:36:23.000000000 +0200
+++ new/yast2-devtools-2.13.27/devtools/bin/y2makeall 2006-10-10 11:29:34.000000000 +0200
@@ -23,31 +23,6 @@
my $user_config_file = <~/.yast2/y2makeallrc>;
-# Core binary packages that need to be built in that order before any YCP code
-# can be built.
-my @core_binaries =
- (
- "devtools",
- "liby2util",
- # "packagemanager",
- "core",
- "pkg-bindings",
- "qt",
- "ncurses",
- "testsuite",
- "perl-bindings",
- "storage"
- );
-
-
-# Mixed packages that belong to the core binaries but still have YCP code that
-# should be built after modules are byte-compiled
-
-my @core_and_ycp =
- (
- "storage"
- );
-
# Directories to exclude from building - unmaintained packages, packages that
# are not yet ready to be built, ...
#
@@ -102,11 +77,6 @@
#
my $disable_make_makefile_cvs = 0;
-my $enable_make_core_binaries = 0;
-my $enable_byte_compile_modules = 0;
-my $enable_byte_compile_leftover_modules = 0;
-my $enable_make_ycp_packages = 0;
-my $enable_make_all = 1;
my $favourites_only = 0;
my $prefix = "/usr";
my $enable_print_summary = 1;
@@ -129,23 +99,12 @@
my $sudo_cmd = "/usr/bin/sudo";
my $install_cmd = "/usr/bin/install";
-# assigned only after the prefix option could be evaluated
-my $ycpc_cmd;
-my $modules_dir;
-my $ycp_include_dir;
-
# ---- END configuration variables ----------------------------------------
my $prog_name = basename( $0 );
-my @ycp_files;
-my %ycp_modules;
-my %needed_ycp_include_files;
-my %included_by;
-my %ycp_install_dirs;
my %exclude_dirs;
-my %done_dirs;
my %rpm_names;
my %rpm_dirs;
my %relevant_rpms;
@@ -186,16 +145,8 @@
my $no_sudo = 0;
my $dump_build_order = 0;
my $dump_dependencies = 0;
- my $old_style_all = 0;
- my $old_style = 0;
- GetOptions( "all" => \$enable_make_all,
- "old-style-all" => \$old_style_all,
- "binaries" => \$enable_make_core_binaries,
- "modules" => \$enable_byte_compile_modules,
- "leftovers" => \$enable_byte_compile_leftover_modules,
- "ycp" => \$enable_make_ycp_packages,
- "favourites-only" => \$favourites_only,
+ GetOptions( "favourites-only" => \$favourites_only,
"fast" => \$disable_make_makefile_cvs,
"prefix=s" => \$prefix,
"no-sudo" => \$no_sudo,
@@ -227,28 +178,7 @@
$log_verbosity = LOG_PROGRESS;
}
-
- if ( $old_style_all )
- {
- $old_style = 1;
- $enable_make_core_binaries = 1;
- $enable_byte_compile_modules = 1;
- $enable_byte_compile_leftover_modules = 1;
- $enable_make_ycp_packages = 1;
- }
-
- $enable_byte_compile_leftover_modules = 1 if $enable_byte_compile_modules;
- $old_style = 1 if $enable_make_core_binaries
- or $enable_byte_compile_modules
- or $enable_byte_compile_leftover_modules
- or $enable_make_ycp_packages;
-
- $enable_make_ycp_packages = 1 if $favourites_only;
- $sudo_cmd = "" if $no_sudo;
-
- $ycpc_cmd = "$prefix/bin/ycpc";
- $modules_dir = "$prefix/share/YaST2/modules";
- $ycp_include_dir = "$prefix/share/YaST2/include";
+ $sudo_cmd = "" if $no_sudo;
#
# Check if we are in the right directory
@@ -311,25 +241,12 @@
}
+
#
# Build
#
- if ( $old_style )
- {
- #
- # Old style - obsolete, but still available for emergency use
- #
-
- make_core_binaries() if $enable_make_core_binaries;
- byte_compile_modules() if $enable_byte_compile_modules;
- byte_compile_leftover_modules() if $enable_byte_compile_leftover_modules;
- make_ycp_packages() if $enable_make_ycp_packages;
- }
- else
- {
- make_in_build_order();
- }
+ make_in_build_order();
#
@@ -891,315 +808,6 @@
#-----------------------------------------------------------------------------
-# Build the YaST2 core binaries - those packages that are required for
-# everything else.
-
-sub make_core_binaries()
-{
- log_milestone( "\n--- Phase 1 (-b): Building core binaries..." );
-
- my $dir;
-
- foreach $dir ( @core_binaries )
- {
- make( $dir );
- }
-
- log_milestone( "--- Core binaries done.\n" );
-}
-
-
-#-----------------------------------------------------------------------------
-
-# Byte-compile all YCP modules in all subdirectories.
-
-sub byte_compile_modules()
-{
- log_milestone( "\n--- Phase 2 (-m): Byte-compiling YCP modules..." );
-
- #
- # Find all YCP modules in CVS working directory
- #
-
- # Make use of YCP programming conventions: Module names start with a capital letter.
- my @module_candidates = find_files( $work_root, "[A-Z]*.ycp", "(testsuite|examples|skeleton)" );
-
- log_info( "Exclude list: " . join( " ", sort( keys %exclude_dirs ) ) );
- my $file;
-
- foreach $file ( @module_candidates )
- {
- if ( is_ycp_module( $file ) )
- {
- my $pkg = $file;
- $pkg =~ s:^$work_root/::; # remove leading work root
- $pkg =~ s:/.*$::; # remove all path components but the first
- my $mod = basename( $file );
-
- if ( exists( $exclude_dirs{ $pkg } ) )
- {
- log_info( "Excluding module \"$mod\" from package \"$pkg\"" );
- }
- else
- {
- log_debug( "Found module \"$mod\" from package \"$pkg\"" );
- $ycp_modules{ $mod } = $file;
- }
- }
- }
-
-
- #
- # Find all YCP modules that are already installed
- #
-
- my @installed_modules = glob( $modules_dir . "/*.ycp" );
-
- foreach $file( @installed_modules )
- {
- $file = basename( $file );
-
- if ( ! defined( $ycp_modules{ $file } ) )
- {
- log_warning( "Module $file not found below $work_root" );
- }
- }
-
-
- #
- # Clear old YCP byte code files (.ybc)
- #
-
- log_progress( "Removing old byte code files in $modules_dir" );
- sudo_system_int( "rm -f $modules_dir/*.ybc" );
-
- log_progress( "Removing old byte code files in $work_root" );
- system_int( "find $work_root -name '*.ybc' -print0 | xargs -0 $sudo_cmd rm" );
-
-
-
- #
- # Clear old YCP module files (.ycp)
- #
-
- log_progress( "Removing old modules from $modules_dir" );
- sudo_system_int( "rm -f $modules_dir/*.ycp" );
-
-
- #
- # Copy modules from CVS tree to system
- #
-
- log_progress( "Installing " . scalar( keys( %ycp_modules ) ) . " YCP modules" );
- make_install_dir( $modules_dir );
- xargs_install( $modules_dir, values( %ycp_modules ) );
-
-
- #
- # Find all 'include' statements in the newly copied modules
- #
-
- my $module;
-
- foreach $module( keys( %ycp_modules ) )
- {
- find_include_statements( $modules_dir . "/" . $module );
- }
-
- log_progress( "Modules require " . scalar( keys( %needed_ycp_include_files ) ) . " YCP include files" );
-
- #
- # Now find and install all include files required by the installed YCP modules
- #
-
- locate_include_files();
- install_include_files();
-
-
- #
- # Figure out YCP compilation order and compile the modules
- #
-
- my @order = calc_ycp_compilation_order();
- byte_compile( @order );
-
-
- log_milestone( "--- Byte-compiling YCP modules done.\n" );
-}
-
-
-#-----------------------------------------------------------------------------
-
-# Byte-compile leftover YCP modules - everything that didn't get compiled by
-# byte_compile_modules(), maybe because 'ycpc' in calc_ycp_compilation_order
-# did not report the correct compilation order.
-
-sub byte_compile_leftover_modules()
-{
- log_milestone( "\n--- Phase 2b (-l): Byte-compiling leftover YCP modules..." );
-
- my @missing;
- my $missing_count = 0;
- my $old_missing_count = 0;
- my $loop_count = 0;
-
- do
- {
- $loop_count++;
- $old_missing_count = $missing_count;
- @missing = ();
-
- chdir( $modules_dir );
- my @src_modules = <*.ycp>;
- my @compiled_modules = <*.ybc>;
-
- my %compiled;
- my $mod;
-
- foreach $mod ( @compiled_modules )
- {
- $mod = basename( $mod, ".ybc" );
- $compiled{ $mod } = 1;
- }
-
-
- foreach $mod ( @src_modules )
- {
- $mod = basename( $mod, ".ycp" );
-
- push( @missing, $mod )
- if ( ! defined( $compiled{ $mod } ) );
- }
-
- $missing_count = $#missing + 1;
-
- if ( $loop_count == 1 )
- {
- log_milestone( "$missing_count modules left over" );
- log_info( @missing );
- }
- else
- {
- log_progress( "Iteration #" . $loop_count
- . ": $missing_count modules left over" );
- }
-
- # Brute-force approach:
- #
- # Simply try to byte-compile all modules that are left over.
- # Even though the compilation order is screwed, at least one of
- # should compile.
-
- foreach $mod ( @missing )
- {
- my $success = byte_compile( $mod );
- log_progress( "$mod\tOK" ) if $success;
- }
-
- # Do this as long as there are _any_ changes in the status.
-
- } while ( $missing_count != $old_missing_count );
-
-
- #
- # Print summary
- #
-
- if ( $missing_count > 0 )
- {
- my $mod;
-
- foreach $mod ( @missing )
- {
- log_error( "Could not byte-compile $mod.ycp" );
- # print FAILED_LOG "$mod.ycp\n";
- }
-
- push( @failed_dirs, $modules_dir );
- }
- else
- {
- log_progress( "All YCP modules successfully byte-compiled" );
- }
-
- chdir( $work_root );
-}
-
-
-#-----------------------------------------------------------------------------
-
-
-# Build YCP packages.
-
-sub make_ycp_packages()
-{
- log_milestone( "\n--- Phase 3 (-y): Building YCP packages..." );
-
- #
- # Set up hash with packages not to process
- #
-
- my %dont_process = %exclude_dirs;
-
- # Add the contents of @core_binaries to that hash
- @dont_process{ @core_binaries } = (); # Black magic - see Perl cook book chapter 4.7
-
-
- # Remove the contents of @core_and_ycp from %dont_process
-
- my $pkg;
-
- foreach $pkg ( @core_and_ycp )
- {
- undef( $dont_process{ $pkg } );
- }
-
-
- log_debug( "Excluding packages " . join( " ", sort ( keys( %dont_process ) ) ) );
-
- #
- # Set up list with packages to process
- #
-
- my @packages = @ycp_favourites;
-
- if ( ! $favourites_only )
- {
- chdir( $work_root );
- push( @packages, sort( glob( "*" ) ) );
- }
-
- #
- # Process packages
- #
-
- foreach $pkg ( @packages )
- {
- my $dir = $work_root . "/" . $pkg;
-
- if ( -d $dir )
- {
- if ( ! exists( $dont_process{ $pkg } ) )
- {
- # log_progress( "Building $pkg" );
- make( $dir );
- }
- else
- {
- if ( exists( $exclude_dirs{ $pkg } ) )
- {
- log_progress( "\nExcluding $pkg\n" );
- }
- }
- }
- }
-
- log_milestone( "--- Building YCP packages done.\n" );
-}
-
-
-#-----------------------------------------------------------------------------
-
# Build in build order
sub make_in_build_order()
@@ -1352,196 +960,6 @@
#-----------------------------------------------------------------------------
-# Check if a file is a YCP module: Search it for 'module XY'.
-#
-# Parameters:
-# file name
-#
-# Return value:
-# 1 if it is a YCP module,
-# 0 if it is not.
-
-sub is_ycp_module()
-{
- my ( $file_name ) = @_;
- my $module_name = basename( $file_name, ".ycp" );
-
- # log_debug( "Checking mod candidate $module_name: $file_name" );
- open( MOD, $file_name ) or return 0;
-
- my $line;
-
- while ( $line = <MOD> )
- {
- # A valid YCP named "ABC" module must have a line
- # module "ABC";
-
- if ( $line =~ /^\s*module\s+"$module_name"\s*;/ )
- {
- # log_debug( "Found \'module \"$module_name\"\' in $file_name" );
- close( MOD );
- return 1;
- }
- }
-
- close( MOD );
- return 0;
-}
-
-
-#-----------------------------------------------------------------------------
-
-
-# Find all 'include' statements in a file and add the include file to the
-# global %needed_ycp_include_files hash.
-#
-# Parameters:
-# Filename
-
-sub find_include_statements()
-{
- my ( $ycp ) = @_;
-
- if ( ! open( YCP, $ycp ) )
- {
- log_error( "Can't open $ycp" );
- return;
- }
-
- my $line;
-
- while ( $line = <YCP> )
- {
- # Note: This search method will also find 'include' statements in
- # multi-line comments, but then this can be considered _very_ broken.
- # It should really be fixed in the YCP source.
- # Anyway, it doesn't hurt much: Maybe one include file too many will be
- # installed to /usr/share/YaST2/include/ - so what...
-
- if ( $line =~ /^\s*include\s+"(.*)"/ )
- {
- my $include_file = $1;
- $needed_ycp_include_files{ $include_file } = undef;
- log_info( basename( $ycp ) . " includes \"" . $include_file . "\"" );
- $included_by{ $include_file } .= basename ( $ycp ) . " " ;
- }
- }
-
- close( YCP );
-}
-
-
-#-----------------------------------------------------------------------------
-
-
-# Locate all include files in the global %needed_ycp_include_files hash in the
-# CVS or Subversion working directory - write the full path into the hash.
-
-sub locate_include_files()
-{
- log_progress( "Searching include files" );
-
- # Grep all Makefile.am files to find out where include files get installed to.
- # This is necessary since somebody came up with that crazy idea to give
- # lots of include files the same name, differing only in install directory,
- # which has no match at all in the source directory structure. What a mess.
-
- find_install_dirs();
-
-
- # Cache YCP files for faster search
-
- log_progress( "Creating .ycp file location cache" );
- my @ycp_files = find_files( $work_root, "*.ycp", "(testsuite|examples|skeleton)" );
-
-
- log_progress( "Mapping include file paths" );
-
- #
- # Map all full path names to install directories, if possible
- # (i.e., if their Makefile.am had a line with @yncludedir@);
- # if not, it is most likely not an include file and can be ignored here.
- # If it is anyway, its Makefile.am is broken and needs to be fixed.
- #
-
- my %found_ycp_include_files;
- my $ycp_file;
-
- foreach $ycp_file ( @ycp_files )
- {
- my $dir = dirname( $ycp_file );
-
- if ( defined( $ycp_install_dirs{ $dir } ) )
- {
- my $target = $ycp_install_dirs{ $dir };
- $target .= "/" . basename( $ycp_file );
- $found_ycp_include_files{ $target } = $ycp_file;
-
- log_info( "Include file " . $target . " is " . $ycp_file );
- }
- }
-
-
- my $not_found = 0;
- my $needed_include;
-
- foreach $needed_include ( keys( %needed_ycp_include_files ) )
- {
- if ( ! defined( $found_ycp_include_files{ $needed_include } ) )
- {
- $not_found++;
- log_error( "Can't find include file \"" . $needed_include
- . "\"\n included by " . $included_by{ $needed_include } );
- }
- else
- {
- log_debug( "Found " . $needed_include );
-
- $needed_ycp_include_files{ $needed_include } =
- $found_ycp_include_files{ $needed_include };
- }
- }
-
- if ( $not_found > 0 )
- {
- log_error( "Can't resolve YCP include dependencies" );
- }
- else
- {
- log_progress( "Found all YCP files included from modules" );
- }
-}
-
-
-#-----------------------------------------------------------------------------
-
-
-# Install all YCP include files in the global %needed_ycp_include_files hash.
-
-sub install_include_files()
-{
- log_progress( "Installing include files" );
- my $ycp_include_file;
-
- foreach $ycp_include_file ( keys( %needed_ycp_include_files ) )
- {
- if ( defined( $needed_ycp_include_files{ $ycp_include_file } ) )
- {
- my $src = $needed_ycp_include_files{ $ycp_include_file };
- my $target = $ycp_include_dir . "/" . $ycp_include_file;
-
- install_file( $src, $target );
- }
- else
- {
- log_warning( "Skipping $ycp_include_file - not found" );
- }
- }
-}
-
-
-#-----------------------------------------------------------------------------
-
# Install multiple files like "xargs": Build a command line as long as possible
# to avoid to many shell calls. Calls
#
@@ -1627,142 +1045,6 @@
#-----------------------------------------------------------------------------
-# Since some of our developers in their infinite wisdom decided long ago that
-# it might be a cool thing to try what happens when source file names are not
-# unique, we now have to deal with dozens of YCP include files with the same
-# name, sometimes even in the same source directory level. The only thing to
-# tell them apart is the install target in the respective Makefile.am, so now
-# we have to 'grep' through all of them and find lines with "@yncludedir" to
-# figure out the installation target directory.
-#
-# Yes, this is broken by design.
-#
-# This function now searches all Makefile.am files in the CVS or SVN working directory
-# for lines with @yncludedir@ and fills the global %ycp_install_dirs hash with
-# the result. The keys of this hash are directories in the CVS or SVN working tree,
-# the values are the target directories below /usr/share/YaST2/include
-# (with the @yncludedir@ macro removed, e.g. "network/services" ).
-
-sub find_install_dirs()
-{
- log_progress( "Searching target directories for YCP include files" );
-
- my $makefile_am;
-
- foreach $makefile_am ( find_files( $work_root, "Makefile.am", "(testsuite|examples|skeleton)" ) )
- {
- if ( ! open( MAKEFILE_AM, $makefile_am ) )
- {
- log_error( "Can't open $makefile_am" );
- return;
- }
-
- my $dir = dirname( $makefile_am );
- my $line;
-
- while ( $line = )
- {
- $line =~ s/#.*//;
-
- if ( $line =~ /\@yncludedir\@/ )
- {
- $line =~ s:^.*\@yncludedir\@/?::; # strip everything up to @yncludedir@/
- $line =~ s/\s*$//; # strip trailing whitespace
-
- if ( defined( $ycp_install_dirs{ $dir } ) )
- {
- log_error( "Include target in $makefile_am not unique!" );
- }
- else
- {
- $ycp_install_dirs{ $dir } = $line;
- log_debug( "Dir " . $dir . " => " . $line );
- }
- }
- }
-
- close( MAKEFILE_AM );
- }
-}
-
-
-#-----------------------------------------------------------------------------
-
-# Let the YCP compiler calculate the compilation order for the YCP modules,
-# taking their interdependencies into account.
-#
-# Parameters:
-# ---
-# Return value:
-# Module list in compilation order
-
-sub calc_ycp_compilation_order()
-{
- log_progress( "Calculating YCP module compilation order" );
-
- chdir( $modules_dir );
- my $cmd = "$ycpc_cmd -f -r -I $ycp_include_dir *.ycp 2>>$make_log | egrep -v '(^Check)|(^\$)|(is newer than)'";
-
- log_info( "$cmd" );
- my @order = split( "\n", `$cmd` );
-
- log_debug( "YCP compilation order:\n", join( "\t\n", @order ) );
- chdir( $work_root );
-
- return @order;
-}
-
-
-#-----------------------------------------------------------------------------
-
-# Byte-compile a list of YCP modules in this order.
-#
-# Parameters:
-# YCP module list
-#
-# Return value:
-# 1 if success
-# 0 if (any) error
-
-sub byte_compile()
-{
- my @modules = @_;
-
- if ( $#modules > 0 )
- {
- log_progress( "Byte-compiling " . ( $#modules + 1 ) . " YCP modules" );
- }
-
- chdir( $modules_dir );
-
- my $module;
- my $success = 1;
-
- foreach $module ( @modules )
- {
-
- $module .= ".ycp";
-
- my $cmd = "$ycpc_cmd -I $ycp_include_dir -M $modules_dir -q -c $modules_dir/$module >>$make_log 2>&1";
-
- log_debug( "$sudo_cmd $cmd" );
- my $result = sudo_system_int( $cmd );
-
- log_debug( "Byte-compiling $module\t- "
- . ($result == 0 ? "Success" : "Error" ) );
-
- $success = 0 if $result != 0;
- }
-
- chdir( $work_root );
-
- return $success;
-}
-
-
-#-----------------------------------------------------------------------------
-
-
sub print_summary()
{
my $failed_count = scalar( @failed_dirs ) + 1;
@@ -1922,8 +1204,6 @@
Builds all YaST2 sources from CVS or Subversion.
Call this from your toplevel yast2/source CVS or SVN working directory!
- -a (--all) (default) build all YaST2 packages (subdirectories)
-
--fast no "make -f Makefile.cvs" if it can be avoided
--favourites-only stop processing after favourites list is done
@@ -1938,16 +1218,6 @@
-s (--silent) turn verbosity down
-h (--help) (this message)
-
-OBSOLETE, but still available for emergency use:
-
- --binaries make core binaries
- --modules byte-compile YCP modules
- --leftovers byte-compile leftover YCP modules
- --ycp make YCP packages (includes --leftovers)
- --old-style-all same as --binaries --modules --leftovers --ycp
-
-
EXAMPLES:
Build everything:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org