Hello community,
here is the log from the commit of package yast2-devtools
checked in at Tue Aug 29 18:09:14 CEST 2006.
--------
--- yast2-devtools/yast2-devtools.changes 2006-08-07 16:14:16.000000000 +0200
+++ yast2-devtools/yast2-devtools.changes 2006-08-29 17:27:14.000000000 +0200
@@ -1,0 +2,18 @@
+Tue Aug 29 17:26:10 CEST 2006 - mvidner@suse.cz
+
+- po makefiles: cope with both old and new suse-i18n directory layout (ke).
+- yast2-devtools.pc: removed libdir because this is a noarch package.
+- prefixbuild: Another fix to honor PREFIX in the environment.
+- 2.13.22
+
+-------------------------------------------------------------------
+Wed Aug 23 16:53:45 CEST 2006 - mvidner@suse.cz
+
+- Added yast2-sudo to all-packages.
+
+-------------------------------------------------------------------
+Mon Aug 7 17:45:36 CEST 2006 - mvidner@suse.cz
+
+- Added yast2-trans-ca to all-packages (#190072).
+
+-------------------------------------------------------------------
Old:
----
yast2-devtools-2.13.21.tar.bz2
New:
----
yast2-devtools-2.13.22.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-devtools.spec ++++++
--- /var/tmp/diff_new_pack.Ht5pqL/_old 2006-08-29 18:09:04.000000000 +0200
+++ /var/tmp/diff_new_pack.Ht5pqL/_new 2006-08-29 18:09:04.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-devtools (Version 2.13.21)
+# spec file for package yast2-devtools (Version 2.13.22)
#
# 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.21
+Version: 2.13.22
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-devtools-2.13.21.tar.bz2
+Source0: yast2-devtools-2.13.22.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.21
+%setup -n yast2-devtools-2.13.22
%build
autoreconf --force --install
@@ -86,6 +86,15 @@
%doc %{prefix}/share/doc/packages/yast2-devtools
%changelog -n yast2-devtools
+* Tue Aug 29 2006 - mvidner@suse.cz
+- po makefiles: cope with both old and new suse-i18n directory layout (ke).
+- yast2-devtools.pc: removed libdir because this is a noarch package.
+- prefixbuild: Another fix to honor PREFIX in the environment.
+- 2.13.22
+* Wed Aug 23 2006 - mvidner@suse.cz
+- Added yast2-sudo to all-packages.
+* Mon Aug 07 2006 - mvidner@suse.cz
+- Added yast2-trans-ca to all-packages (#190072).
* Mon Aug 07 2006 - mvidner@suse.cz
- Better parsing of "listmap" and the like not to mistake it for
a function declaration (#133662).
++++++ yast2-devtools-2.13.21.tar.bz2 -> yast2-devtools-2.13.22.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.21/VERSION new/yast2-devtools-2.13.22/VERSION
--- old/yast2-devtools-2.13.21/VERSION 2006-08-07 16:14:00.000000000 +0200
+++ new/yast2-devtools-2.13.22/VERSION 2006-08-29 17:25:36.000000000 +0200
@@ -1 +1 @@
-2.13.21
+2.13.22
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.21/configure new/yast2-devtools-2.13.22/configure
--- old/yast2-devtools-2.13.21/configure 2006-08-07 16:15:11.000000000 +0200
+++ new/yast2-devtools-2.13.22/configure 2006-08-29 17:41:23.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.21.
+# Generated by GNU Autoconf 2.59 for yast2-devtools 2.13.22.
#
# 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.21'
-PACKAGE_STRING='yast2-devtools 2.13.21'
+PACKAGE_VERSION='2.13.22'
+PACKAGE_STRING='yast2-devtools 2.13.22'
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.21 to adapt to many kinds of systems.
+\`configure' configures yast2-devtools 2.13.22 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.21:";;
+ short | recursive ) echo "Configuration of yast2-devtools 2.13.22:";;
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.21
+yast2-devtools configure 2.13.22
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.21, which was
+It was created by yast2-devtools $as_me 2.13.22, 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.21'
+ VERSION='2.13.22'
cat >>confdefs.h <<_ACEOF
@@ -2124,7 +2124,7 @@
-VERSION="2.13.21"
+VERSION="2.13.22"
RPMNAME="yast2-devtools"
MAINTAINER="Martin Vidner "
@@ -20001,7 +20001,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by yast2-devtools $as_me 2.13.21, which was
+This file was extended by yast2-devtools $as_me 2.13.22, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20059,7 +20059,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-devtools config.status 2.13.21
+yast2-devtools config.status 2.13.22
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.21/configure.in new/yast2-devtools-2.13.22/configure.in
--- old/yast2-devtools-2.13.21/configure.in 2006-08-07 16:14:46.000000000 +0200
+++ new/yast2-devtools-2.13.22/configure.in 2006-08-29 17:40:58.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-devtools
dnl
-dnl -- This file is generated by y2autoconf 2.13.20 - DO NOT EDIT! --
+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.21, http://bugs.opensuse.org/, yast2-devtools)
+AC_INIT(yast2-devtools, 2.13.22, 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.21"
+VERSION="2.13.22"
RPMNAME="yast2-devtools"
MAINTAINER="Martin Vidner "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.21/devtools/admin/all-packages new/yast2-devtools-2.13.22/devtools/admin/all-packages
--- old/yast2-devtools-2.13.21/devtools/admin/all-packages 2006-07-18 12:57:33.000000000 +0200
+++ new/yast2-devtools-2.13.22/devtools/admin/all-packages 2006-08-23 16:53:54.000000000 +0200
@@ -1,5 +1,5 @@
# All yast2 packages
-# $Id: all-packages 31922 2006-07-18 10:59:06Z mvidner $
+# $Id: all-packages 32540 2006-08-23 14:55:30Z mvidner $
#
# Use TABS to delimit fields.
# where fields:
@@ -116,6 +116,7 @@
yast2-slp-server default slp daemon
yast2-sound default sound
yast2-storage inst-sys,default storage
+yast2-sudo default /etc/sudoers
yast2-support default support
yast2-sysconfig default sysconfig editor
yast2-tftp-server default TFTP server
@@ -131,6 +132,7 @@
yast2-trans-bg inst-sys all
yast2-trans-bn inst-sys all
yast2-trans-bs inst-sys all
+yast2-trans-ca inst-sys all
yast2-trans-cs inst-sys all
yast2-trans-cy inst-sys all
yast2-trans-da inst-sys all
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.21/devtools/admin/po/Makefile.am.center new/yast2-devtools-2.13.22/devtools/admin/po/Makefile.am.center
--- old/yast2-devtools-2.13.21/devtools/admin/po/Makefile.am.center 2005-03-17 16:49:15.000000000 +0100
+++ new/yast2-devtools-2.13.22/devtools/admin/po/Makefile.am.center 2006-08-29 17:18:33.000000000 +0200
@@ -1,7 +1,8 @@
# Emacs: -*- makefile -*-
LL = @LL@
-POTDIR = ../../pot/pot
+#POTDIR = ../../50-pot
+POTDIR = @POTDIR@
POTFILES = $(wildcard $(POTDIR)/*.pot)
GENERATED = $(MOFILES)
CLEANFILES = $(GENERATED)
@@ -88,7 +89,7 @@
checkpo:
for f in $(POFILES); do \
- mypot=../../pot/pot/$${f/$(LL).po/pot}; echo $$f $$mypot; \
+ mypot=$(POTDIR)/$${f/$(LL).po/pot}; echo $$f $$mypot; \
[ -f $$mypot ] && { LANG=C $(MSGMERGE) --verbose --output=/dev/null $$f $$mypot || exit 1; }; \
LANG=C $(MSGFMT) --output=/dev/null --check --statistics --verbose $$f \
|| exit 1; \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.21/devtools/bin/version new/yast2-devtools-2.13.22/devtools/bin/version
--- old/yast2-devtools-2.13.21/devtools/bin/version 2006-08-07 16:16:37.000000000 +0200
+++ new/yast2-devtools-2.13.22/devtools/bin/version 2006-08-29 17:42:39.000000000 +0200
@@ -1,5 +1,5 @@
#!/bin/bash
-echo 2.13.21
+echo 2.13.22
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.21/devtools/bin/y2autoconf new/yast2-devtools-2.13.22/devtools/bin/y2autoconf
--- old/yast2-devtools-2.13.21/devtools/bin/y2autoconf 2006-05-10 16:45:07.000000000 +0200
+++ new/yast2-devtools-2.13.22/devtools/bin/y2autoconf 2006-08-29 17:23:57.000000000 +0200
@@ -28,7 +28,7 @@
# Michal Svec
# Martin Vidner
#
-# $Id: y2autoconf 30488 2006-04-26 09:58:05Z sh $
+# $Id: y2autoconf 32611 2006-08-29 15:25:32Z mvidner $
if ($#ARGV >= 0 && ($ARGV[0] eq "-h" || $ARGV[0] eq "--help"))
{
@@ -191,11 +191,21 @@
[Location of compendium file]),
y2compendium=yes, y2compendium=no)
if test "x$with_own_compendium" = "x" ; then
- COMPENDIUM=\'../../memory/yast2.$(LL).po\'
+ if test -d ../50-memory ; then
+ COMPENDIUM=\'../../50-memory/yast2.$(LL).po\'
+ else
+ COMPENDIUM=\'../../memory/yast2.$(LL).po\'
+ fi
else
COMPENDIUM=${with_own_compendium}
fi
AC_SUBST(COMPENDIUM)
+if test -d ../50-pot ; then
+ POTDIR=../../50-pot
+else
+ POTDIR=../../pot/pot
+fi
+AC_SUBST(POTDIR)
',
# init: YCP sources
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.21/devtools/bin/y2makeall new/yast2-devtools-2.13.22/devtools/bin/y2makeall
--- old/yast2-devtools-2.13.21/devtools/bin/y2makeall 2006-03-13 15:28:39.000000000 +0100
+++ new/yast2-devtools-2.13.22/devtools/bin/y2makeall 2006-08-28 10:48:44.000000000 +0200
@@ -11,23 +11,9 @@
use strict;
use English;
-use Getopt::Std;
+use Getopt::Long;
use File::Basename;
-use vars qw(
- $opt_a
- $opt_b
- $opt_d
- $opt_f
- $opt_h
- $opt_l
- $opt_m
- $opt_n
- $opt_p
- $opt_s
- $opt_u
- $opt_v
- $opt_y
- );
+use IPC::Open2;
#
# Configuration variables.
@@ -73,7 +59,6 @@
(
"CVS",
".svn",
- "openteam",
"certify",
"debugger"
);
@@ -89,19 +74,22 @@
our @ycp_favourites =
(
"yast2",
- "xml",
"installation",
- "storage",
- "country",
- "bootloader",
- "mouse",
- "x11",
- "packager",
- "transfer",
- "update",
- "autoinstallation",
+ "packager"
);
+# Dependencies (from all other YaST2 packages) that are deliberately ignored.
+# This is necessary to break up dependency cycles which otherwise would make
+# bootstrapping impossible.
+#
+# Yes, this is a mess. But SuSE AutoBuild does it the same way.
+# There is no reasonable way to avoid this. :-(
+my %ignored_requires =
+ (
+ "yast2-installation" => 1,
+ "yast2-inetd" => 1,
+ "yast2_theme" => 1
+ );
my $work_root = $ENV{'PWD'};
@@ -113,14 +101,14 @@
# Other global variables.
#
-my $disable_make_makefile_cvs = 0; # -f
-my $enable_make_core_binaries = 0; # -b
-my $enable_byte_compile_modules = 0; # -m
-my $enable_byte_compile_leftover_modules = 0; # -l
-my $enable_make_ycp_packages = 0; # -y
-my $enable_make_all = 1; # -a
-my $favourites_only = 0; # -u
-my $prefix = "/usr"; # -p
+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;
# Verbosity values
@@ -138,9 +126,6 @@
my $log_verbosity = LOG_INFO;
my $make_target = "";
-# if we don't install to usr, it is not necessary
-# -n means "no sudo"
-# note the trailing space
my $sudo_cmd = "/usr/bin/sudo";
my $install_cmd = "/usr/bin/install";
@@ -161,6 +146,15 @@
my %ycp_install_dirs;
my %exclude_dirs;
my %done_dirs;
+my %rpm_names;
+my %rpm_dirs;
+my %relevant_rpms;
+my %pkg_provides;
+my %pkg_requires;
+my %provided_by;
+my %base_rpms;
+my @build_order;
+
my @failed_dirs;
my $successful_dirs = 0;
@@ -186,44 +180,71 @@
sub main()
{
- # Extract command line options.
- # This will set a variable opt_? for any option,
- # e.g. opt_v if option '-v' is passed on the command line.
+ my $show_help = 0;
+ my $verbose = 0;
+ my $debug = 0;
+ my $silent = 0;
+ 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,
+ "fast" => \$disable_make_makefile_cvs,
+ "prefix=s" => \$prefix,
+ "no-sudo" => \$no_sudo,
+ "dump-build-order" => \$dump_build_order,
+ "dump-dependencies" => \$dump_dependencies,
+ "verbose" => \$verbose,
+ "debug" => \$debug,
+ "silent" => \$silent,
+ "help" => \$show_help );
- getopts('hvsdfbmylaunp:');
+ usage() if $show_help;
- usage() if $opt_h;
-
- if ( $opt_v ) # verbose
+ if ( $verbose)
{
$tty_verbosity = LOG_INFO;
$log_verbosity = LOG_DEBUG;
}
- if ( $opt_d ) # debug
+ if ( $debug )
{
$tty_verbosity = LOG_DEBUG;
$log_verbosity = LOG_DEBUG;
}
- if ( $opt_s ) # silent )))
+ if ( $silent )
{
$tty_verbosity = LOG_MILESTONE;
$log_verbosity = LOG_PROGRESS;
}
- $enable_make_all = 0 if $opt_b or $opt_m or $opt_y or $opt_l;
- $enable_make_core_binaries = 1 if $opt_b;
- $enable_byte_compile_modules = 1 if $opt_m;
- $enable_byte_compile_leftover_modules = 1 if $opt_l or $opt_m;
- $enable_make_ycp_packages = 1 if $opt_y or $opt_u;
-
- $disable_make_makefile_cvs = 1 if $opt_f;
- $favourites_only = 1 if $opt_u;
+ 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;
- $sudo_cmd = "" if $opt_n;
- $prefix = $opt_p if $opt_p;
+ $enable_make_ycp_packages = 1 if $favourites_only;
+ $sudo_cmd = "" if $no_sudo;
$ycpc_cmd = "$prefix/bin/ycpc";
$modules_dir = "$prefix/share/YaST2/modules";
@@ -270,13 +291,46 @@
#
- # Build phases
+ # Calculate dependencies and build order
#
- make_core_binaries() if $enable_make_all or $enable_make_core_binaries;
- byte_compile_modules() if $enable_make_all or $enable_byte_compile_modules;
- byte_compile_leftover_modules() if $enable_make_all or $enable_byte_compile_leftover_modules;
- make_ycp_packages() if $enable_make_all or $enable_make_ycp_packages;
+
+ read_rpm_names();
+ calc_build_order();
+
+ if ( $dump_dependencies )
+ {
+ dump_dependencies();
+ exit;
+ }
+
+ if ( $dump_build_order )
+ {
+ dump_build_order();
+ exit;
+ }
+
+
+ #
+ # 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();
+ }
+
#
# Clean up
@@ -292,6 +346,520 @@
#-----------------------------------------------------------------------------
+# Read all RPM names from all $work_root/*/RPMNAME files and store them in
+# the global %rpm_names hash
+
+sub read_rpm_names()
+{
+ chdir( $work_root );
+ undef %rpm_names;
+ my $rpmname_file;
+
+ foreach $rpmname_file ( <*/RPMNAME> )
+ {
+ if ( open( RPMNAME, $rpmname_file ) )
+ {
+ my $dir = dirname( $rpmname_file );
+ my $line;
+
+ while ( $line = <RPMNAME> )
+ {
+ chomp( $line );
+ $line =~ s/^\s+//;
+ $line =~ s/\s$//;
+
+ if ( $line )
+ {
+ if ( defined( $rpm_names{ $dir } ) )
+ {
+ log_warning( "Multiple RPM names for $dir: $rpm_names{ $dir }, $line" );
+ }
+ else
+ {
+ $rpm_names{ $dir } = $line;
+ $rpm_dirs{ $line } = $dir;
+ }
+ }
+ }
+
+ close( RPMNAME);
+ }
+ else
+ {
+ log_warning( "Can't open $rpmname_file" );
+ }
+ }
+
+ %relevant_rpms = reverse( %rpm_names );
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Read dependencies and calculate the build order (in global @build_order).
+
+sub calc_build_order()
+{
+ read_all_dependencies();
+ expand_provides();
+ kick_irrelevant_requires();
+ tsort_dependencies();
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Read all .spec.in files below $work_root and store the "Requires" and
+# "BuildRequires" in the global %pkg_requires hash
+
+sub read_all_dependencies()
+{
+ chdir( $work_root );
+ my $spec_in_file;
+
+ foreach $spec_in_file ( <*/*.spec.in> )
+ {
+ my $rpm = $rpm_names{ dirname( $spec_in_file ) };
+ my ( $this_pkg_requires, $this_pkg_provides ) = read_dependencies( $rpm, $spec_in_file );
+ $pkg_requires{ $rpm } = $this_pkg_requires;
+ $pkg_provides{ $rpm } = $this_pkg_provides;
+ }
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Read depencencies ("Requires" and "BuildRequires" from one .spec.in file.
+# Filter out only relevant packages.
+#
+# Parameters:
+# $this_pkg RPM name of this package
+# $spec_in_file_name file name to read
+#
+# Return value:
+# Hash reference with all relevant depencencies (keys are RPM names, values are "1")
+
+sub read_dependencies($)
+{
+ my( $this_pkg, $spec_in_file_name ) = @_;
+ my %this_pkg_requires;
+ my %this_pkg_provides;
+
+ log_debug( "Reading dependencies for $this_pkg" );
+
+ if ( ! open( SPEC_IN, $spec_in_file_name ) )
+ {
+ log_error( "Can't open $spec_in_file_name" );
+ return ( \%this_pkg_requires, \%this_pkg_provides );
+ }
+
+ my $line;
+
+ while ( $line = )
+ {
+ chomp( $line );
+ $line =~ s/#.$//; # ignore comments
+
+ if ( $line =~ /^\s*(Requires|BuildRequires)\s*:/ )
+ {
+ $line =~ s/^\s*(Requires|BuildRequires)\s*:\s*//;
+ my $rpm;
+
+ foreach $rpm ( split( '\s+', $line ) )
+ {
+ if ( defined( $ignored_requires{ $rpm } ) )
+ {
+ # Strictly speaking, this is a mess: All dependencies should be correct.
+ # There should be no cycles in build dependencies.
+ # But in real life, they exist. So some of them need to be suppressed.
+ #
+ # SuSE AutoBuild, too has exception lists for each distribution
+ # to ignore some of them. Otherwise bootstrapping is simply not possible.
+
+ log_debug( "\t# IGNORING: $this_pkg requires $rpm" );
+ }
+ elsif ( $rpm =~ /[a-zA-Z_+-]+[a-zA-Z0-9_+-]*/ )
+ {
+ log_debug( "\t$this_pkg requires $rpm" );
+ $this_pkg_requires{ $rpm } = 1;
+ }
+ else
+ {
+ log_debug( "\tIgnoring cruft \"$rpm\"" );
+ }
+ }
+ }
+ elsif ( $line =~ /^\s*(Provides)\s*:/ )
+ {
+ $line =~ s/^\s*(Provides)\s*:\s*//;
+ my $prov;
+
+ foreach $prov ( split( '\s+', $line ) )
+ {
+ if ( $prov =~ /^[a-zA-Z_+-]+[a-zA-Z0-9_+-]*$/ )
+ {
+ log_debug( "\t$this_pkg provides $prov" );
+ $this_pkg_provides{ $prov } = 1;
+ }
+ else
+ {
+ log_debug( "\t# IGNORING: $this_pkg provides $prov" );
+ }
+ }
+ }
+ }
+
+ close( SPEC_IN );
+
+ return ( \%this_pkg_requires, \%this_pkg_provides );
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Do a topological sort (using the external tsort(1) program) to calculate the
+# correct build order.
+
+sub tsort_dependencies()
+{
+ my $pid = open2( *TSORT_OUT, *TSORT_IN, 'tsort' );
+ my $rpm;
+
+ #
+ # Pipe all "requires" to the tsort(1) program (part of coreutils.rpm)
+ #
+
+ foreach $rpm ( sort( keys( %pkg_requires ) ) )
+ {
+ my $req = $pkg_requires{ $rpm };
+ my $this_pkg_requires;
+
+ foreach $this_pkg_requires ( sort( keys( %$req ) ) )
+ {
+ print TSORT_IN "$rpm $this_pkg_requires\n";
+ }
+ }
+
+ close( TSORT_IN );
+
+
+ #
+ # Read the output of the tsort(1) program
+ #
+
+ my $line;
+
+ while ( $line = )
+ {
+ chomp( $line );
+ $line =~ s/^\s+//;
+ $line =~ s/\s+$//;
+
+ push( @build_order, $line );
+ }
+
+ close( TSORT_OUT );
+ @build_order = reverse( @build_order );
+
+
+ #
+ # Find the leaf packages to honour the user's favourites
+ #
+
+ my @base_rpms_build_order;
+ my %leaf_rpms;
+
+ foreach $rpm ( @build_order )
+ {
+ if ( defined( $base_rpms{ $rpm } ) )
+ {
+ push( @base_rpms_build_order, $rpm )
+ }
+ else
+ {
+ $leaf_rpms{ $rpm } = 1;
+ }
+ }
+
+
+ #
+ # Move favourites (that are leaf packages) to the front of the leaf package build order
+ #
+
+ @build_order = @base_rpms_build_order;
+ my $favourite;
+
+ foreach $favourite ( @ycp_favourites )
+ {
+ if ( defined( $leaf_rpms{ $favourite } ) or # RPM name specified in favourites
+ defined( $leaf_rpms{ $rpm_names{ $favourite } } ) ) # directory specified
+ {
+ $favourite = $rpm_names{ $favourite } unless defined $leaf_rpms{ $favourite };
+ log_info( "Preferring favourite $favourite" );
+ push( @build_order, $favourite );
+ $leaf_rpms{ $favourite } = undef;
+ }
+ }
+
+ #
+ # Append what is left in alphabetical order
+ #
+
+ push( @build_order, sort( keys( %leaf_rpms ) ) ) unless $favourites_only;
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Output the build order
+
+sub dump_build_order()
+{
+ my $rpm;
+ my $leaf_package_count = 0;
+
+ log_always( "\n### Base Packages ###\n" ) if defined( $base_rpms{ $build_order[0] } );
+
+ foreach $rpm ( @build_order )
+ {
+ log_always( $rpm );
+
+ $leaf_package_count++ if ( ! defined( $base_rpms{ $rpm } ) );
+ log_always( "\n### Leaf Packages ###\n" ) if $leaf_package_count == 1;
+ }
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Dump all depencencies to stdout.
+
+sub dump_dependencies()
+{
+ my $rpm;
+
+ foreach $rpm ( sort( keys( %pkg_requires ) ) )
+ {
+ my $req = $pkg_requires{ $rpm };
+ my $this_pkg_requires;
+
+ foreach $this_pkg_requires ( sort( keys( %$req ) ) )
+ {
+ log_always( "$rpm", $this_pkg_requires );
+ }
+ }
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Expand all RPM "provides" from the global %provides hash in all dependencies
+# in the global %requires hash: Replace any dependencies that are satisfied
+# with any capability in %provides with the package that provides that
+# capability.
+#
+# Example:
+#
+# yast2 requires yast2-ui
+# yast2-qt provides yast2-ui
+# yast2-ncurses provides yast2-ui
+#
+# will be changed to
+#
+# yast2 requires yast2-qt
+# yast2 requires yast2-ncurses
+# (deleting depencendy "yast2 requires yast2-ui")
+#
+# While this is not really correct in the RPM world, it will do nicely for
+# calculating the build order, which is what this script needs to do.
+
+sub expand_provides()
+{
+ find_providers(); # fill global %provided_by hash
+
+ my $pkg;
+
+ foreach $pkg ( keys %pkg_requires )
+ {
+ my $old_requires = $pkg_requires{ $pkg };
+ my %new_requires;
+ my $req;
+
+ foreach $req ( keys %$old_requires )
+ {
+ if ( defined( $provided_by{ $req } ) )
+ {
+ my $providers = $provided_by{ $req };
+ log_debug( "Expanding requires: $pkg requires $req -> $pkg requires @$providers" );
+ my $prov;
+
+ foreach $prov ( @$providers )
+ {
+ $new_requires{ $prov } = 1;
+ }
+ }
+ else
+ {
+ $new_requires{ $req } = 1;
+ }
+ }
+
+ $pkg_requires{ $pkg } = \%new_requires;
+ }
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Find the providers (the packages that provide a certain capability):
+# Go through all package provides in the global %pkg_provides hash and
+# fill the global %provided_by hash with it.
+
+sub find_providers()
+{
+ my $pkg;
+
+ foreach $pkg ( keys %pkg_provides )
+ {
+ my $this_pkg_provides = $pkg_provides{ $pkg };
+ my $prov;
+
+ foreach $prov ( keys %$this_pkg_provides )
+ {
+ my $providers;
+ $providers = $provided_by{ $prov } if defined $provided_by{ $prov };
+ push( @$providers, $pkg );
+ $provided_by{ $prov } = $providers;
+ }
+ }
+
+
+ if ( $log_verbosity <= LOG_DEBUG or
+ $tty_verbosity <= LOG_DEBUG )
+ {
+ my $prov;
+
+ foreach $prov ( keys %provided_by )
+ {
+ my $providers = $provided_by{ $prov };
+ log_debug( "$prov\tis provided by", @$providers );
+ }
+ }
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Remove all "requires" dependencies from the global %pkg_requires hash that
+# don't refer to anything in the global %relevant_rpms hash: We don't need to
+# bother about dependencies to gcc and glibc for the purpose of finding out the
+# build order for YaST2.
+#
+# Note: It's not as trivial as it seems - not all YaST2 packages are named
+# yast2-xxx. This is why the content of all RPMNAME files was stored in earlier
+# phases.
+#
+# As a side effect, this function also fills the global hash %base_rpms with
+# the names of all packages that have dependent packages (i.e. some other
+# package depends on them).
+
+sub kick_irrelevant_requires()
+{
+ # log_debug( "Relevant RPMs: ", sort( keys( %relevant_rpms ) ) );
+ my $pkg;
+
+ foreach $pkg ( keys %pkg_requires )
+ {
+ my $old_requires = $pkg_requires{ $pkg };
+ my %new_requires;
+ my $req;
+
+ foreach $req ( keys %$old_requires )
+ {
+ if ( defined $relevant_rpms{ $req } )
+ {
+ $new_requires{ $req } = 1;
+ $base_rpms{ $req } = 1;
+ }
+ else
+ {
+ if ( $req =~ /^yast2-/ )
+ {
+ log_info( "Kicking bogus dependency \"$pkg requires $req\"" );
+ }
+ else
+ {
+ log_debug( "Kicking irrelevant dependency \"$pkg requires $req\"" );
+ }
+ }
+ }
+
+ $pkg_requires{ $pkg } = \%new_requires;
+ }
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Output base packages (those that have any dependent packages)
+
+sub dump_base_packages()
+{
+ my $rpm;
+
+ log_always( "\nBase packages:\n" );
+
+ foreach $rpm ( sort( keys( %base_rpms ) ) )
+ {
+ my $dir = $rpm_dirs{ $rpm };
+
+ if ( $rpm =~ /(yast2-)?$dir/ )
+ {
+ log_always( "\t$rpm" );
+ }
+ else
+ {
+ log_always( "\t$rpm\t(directory \"$dir\")" );
+ }
+ }
+
+ log_always( "" );
+}
+
+
+#-----------------------------------------------------------------------------
+
+# Output leaf packages (those that don't have any dependent packages)
+
+sub dump_leaf_packages()
+{
+ my $rpm;
+
+ log_always( "\nLeaf packages:\n" );
+
+ foreach $rpm ( sort( keys( %relevant_rpms ) ) )
+ {
+ if ( ! defined $base_rpms{ $rpm } )
+ {
+ my $dir = $rpm_dirs{ $rpm };
+
+ if ( $rpm =~ /(yast2-)?$dir/ )
+ {
+ log_always( "\t$rpm" );
+ }
+ else
+ {
+ log_always( "\t$rpm\t(directory \"$dir\")" );
+ }
+ }
+ }
+
+ log_always( "" );
+}
+
+
+#-----------------------------------------------------------------------------
+
# Call "system" and then exit if we got interrupted by a signal
sub system_int($)
@@ -518,9 +1086,9 @@
# Brute-force approach:
#
- # Simply try to byte-compile all modules that are left over.
+ # Simply try to byte-compile all modules that are left over.
# Even though the compilation order is screwed, at least one of
- # should compile.
+ # should compile.
foreach $mod ( @missing )
{
@@ -632,6 +1200,55 @@
#-----------------------------------------------------------------------------
+# Build in build order
+
+sub make_in_build_order()
+{
+ #
+ # Set up hash with packages not to process
+ #
+
+ my %dont_process = %exclude_dirs;
+
+
+ log_debug( "Excluding packages " . join( " ", sort ( keys( %dont_process ) ) ) );
+
+
+ #
+ # Process packages
+ #
+
+ my $pkg;
+
+ foreach $pkg ( @build_order )
+ {
+ my $dir = $work_root . "/" . $rpm_dirs{ $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" );
+ }
+ }
+ }
+ else
+ {
+ log_error( "No such directory: $dir (for package $pkg)" );
+ }
+ }
+}
+
+
+#-----------------------------------------------------------------------------
+
# Make one package.
#
# Parameters:
@@ -645,7 +1262,7 @@
chdir $work_root;
chdir $pkg;
- log_progress( "Building $pkg" );
+ log_progress( "Building", basename( $pkg ) );
# Check if "make -f Makefile.cvs" must be performed.
@@ -1143,6 +1760,8 @@
sub print_summary()
{
+ return if $successful_dirs + $#failed_dirs+1 < 1; # didn't really build anything
+
log_milestone( "\n$prog_name $make_target summary:\n" );
log_milestone( " Success in $successful_dirs directories" );
@@ -1287,41 +1906,52 @@
sub usage()
{
- die "Usage: $prog_name [opt] [make-target]\n" .
- "\n" .
- "Builds all YaST2 sources from CVS or Subversion.\n" .
- "Call this from your toplevel yast2/source CVS or SVN working directory!\n" .
- "\n" .
- "\t-a all (default) - same as -bmy if none of -b -m -l -y is given\n" .
- "\t-b binaries - make core binaries\n" .
- "\t-m modules - byte-compile YCP modules\n" .
- "\t-l leftovers - byte-compile leftover YCP modules\n" .
- "\t-y YCP - make YCP packages (includes -l)\n" .
- "\t-u favourites only - stop processing after favourites list is done\n".
- "\t-f fast - no \"make -f Makefile.cvs\" if it can be avoided\n" .
- "\t-p <prefix> - use <prefix> instead of /usr\n" .
- "\t-n no-sudo - useful with -p, do not sudo certain commands\n" .
- "\n" .
- "\t-v verbose\n" .
- "\t-d debug - even more verbose\n" .
- "\t-s silent - turn verbosity down\n" .
- "\t-h help (this message)\n" .
- "\n" .
- "EXAMPLES:\n" .
- "\n" .
- "Build everything:\n" .
- "\t$prog_name\n" .
- "\n" .
- "Do a \"make pot\" in all YCP packages:\n" .
- "\t$prog_name -y pot\n" .
- "\n" .
- "Byte-recompile all YCP modules, then make all YCP packages, but\n" .
- "don't do \"make -f Makefile.cvs\" if it can be avoided:\n" .
- "\t$prog_name -myf\n" .
- "\n" .
- "Default values can be overridden in $user_config_file\n" .
- "Remember to look into $make_log for build errors!\n" .
- "";
+ die <<"HELP_END";
+
+Usage: $prog_name [opt] [make-target]
+
+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
+
+ --prefix <prefix> use <prefix> instead of /usr
+ -n (--no-sudo) do not sudo certain commands (useful with --prefix)
+
+ --dump-build-order only dump the build order to stdout and log
+ --dump-dependencies only dump the package dependencies to stdout and log
+
+ -v (--verbose) verbose output
+ -d (--debug) debug output (even more verbose)
+ -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:
+ $prog_name
+
+Do a "make pot" in all packages:
+ $prog_name pot
+
+Default values can be overridden in $user_config_file
+Remember to look into $make_log for build errors!
+
+HELP_END
+
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-devtools-2.13.21/yast2-devtools.pc.in new/yast2-devtools-2.13.22/yast2-devtools.pc.in
--- old/yast2-devtools-2.13.21/yast2-devtools.pc.in 2006-02-08 16:49:46.000000000 +0100
+++ new/yast2-devtools-2.13.22/yast2-devtools.pc.in 2006-08-29 17:25:05.000000000 +0200
@@ -1,6 +1,5 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-libdir=@libdir@
# if your pkgconfig does not see this variable, remove the obsolete
# version of this file at /usr/lib*/pkgconfig/yast2-devtools.pc
datadir=@datadir@
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org