ooo-build r14562 - in trunk: . bin/piece doc patches
- From: pmladek svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14562 - in trunk: . bin/piece doc patches
- Date: Thu, 20 Nov 2008 19:20:28 +0000 (UTC)
Author: pmladek
Date: Thu Nov 20 19:20:27 2008
New Revision: 14562
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14562&view=rev
Log:
2008-11-20 Petr Mladek <pmladek suse cz>
* patches/apply.pl.in: add --hotfixes=<dir> option to define another
directory with hotfixes; improves the hotfixes handling; the diff
in the hotfixes dir overrrides the original diff of the same name;
the other diff files in the hotfixes direcotry (with new names) are
applied in the alphabetical order after all the regular diffs;
the new functionality is especially useful in the split build to
overide a patch from the system bootstrap package
* bin/piece/build-generic: use --hotfixes=`pwd`/ooo-build/hotfixes
* bin/piece/install-generic: call
`pwd`/ooo-build/bin/post-upstream-install" and
`pwd`/ooo-build/bin/post-install if available; it helps
to add some extra (hotfix) hacks to the piece package sources
* bin/piece/file-list-libs_core: put kdefilepicker to the kde
subpackage (bnc#444060)
Modified:
trunk/ChangeLog
trunk/bin/piece/build-generic
trunk/bin/piece/file-list-libs_core
trunk/bin/piece/install-generic
trunk/doc/split.txt
trunk/patches/apply.pl.in
Modified: trunk/bin/piece/build-generic
==============================================================================
--- trunk/bin/piece/build-generic (original)
+++ trunk/bin/piece/build-generic Thu Nov 20 19:20:27 2008
@@ -22,7 +22,7 @@
# drop --distro=Localize for now ...
$OO_TOOLSDIR/../patches/apply.pl $OO_TOOLSDIR/../patches/dev300 --pieces \
- --tag=$ooo_build_tag \
+ --tag=$ooo_build_tag --hotfixes=`pwd`/ooo-build/hotfixes \
--distro=$DISTRO --distro=Piece --distro=Binfilter \
--distro=System --distro=Sdk --distro=Extensions \
`pwd` || exit 1;
Modified: trunk/bin/piece/file-list-libs_core
==============================================================================
--- trunk/bin/piece/file-list-libs_core (original)
+++ trunk/bin/piece/file-list-libs_core Thu Nov 20 19:20:27 2008
@@ -21,7 +21,7 @@
$OO_TOOLSDIR/piece/desktop-support-app "$piece" "$ooo_build_tag" "unopkg"
# fix up kde subpackage
-mv_file_between_flists files-kde.txt files-$piece.txt $OO_INSTDIR/basis3.0/program/kdefilepicker
+mv_file_between_flists files-kde.txt files-$piece.txt $OO_INSTDIR/program/kdefilepicker
mv_file_between_flists files-kde.txt files-$piece.txt $OO_INSTDIR/basis3.0/program/fps_kde.uno.so
mv_file_between_flists files-kde.txt files-$piece.txt $OO_INSTDIR/basis3.0/program/libvclplug_kde[0-9]*l..so
mv_file_between_flists files-kde.txt files-$piece.txt $OO_INSTDIR/basis3.0/program/libkabdrv1.so
Modified: trunk/bin/piece/install-generic
==============================================================================
--- trunk/bin/piece/install-generic (original)
+++ trunk/bin/piece/install-generic Thu Nov 20 19:20:27 2008
@@ -52,6 +52,14 @@
$OO_TOOLSDIR/piece/copyexcept -x $filelist $SRCDIR/* $DEST
rm -f $filelist
+# hotfix post upstream install
+# allows to modify the install process from the piece package sources
+hotfix_post_upstream_install="ooo-build/bin/post-upstream-install"
+if test -f "$hotfix_post_upstream_install" ; then
+ "$hotfix_post_upstream_install" $piece $ooo_build_tag $DISTRO || exit 1;
+fi
+
+
# hack to install the noarch files later in the noarch RPMs
if test -n "$DESTDIR" -a "$OOO_BUILD_NOARCH" = 'YES' ; then
$OO_TOOLSDIR/piece/save-noarch $piece $ooo_build_tag || exit 1;
@@ -88,3 +96,9 @@
if test -f $custom_post_install -a "$OO_BUILD_POST_PROCESS_ENABLE" != "NO" ; then
$custom_post_install $piece $ooo_build_tag $DISTRO || exit 1;
fi
+
+# hotfix post install; allows to modify the install process from the piece package sources
+hotfix_post_install="ooo-build/bin/post-install"
+if test -f "$hotfix_post_install" ; then
+ "$hotfix_post_install" $piece $ooo_build_tag $DISTRO || exit 1;
+fi
Modified: trunk/doc/split.txt
==============================================================================
--- trunk/doc/split.txt (original)
+++ trunk/doc/split.txt Thu Nov 20 19:20:27 2008
@@ -73,6 +73,24 @@
See also ooo-build/bin/ooo-sdf-split
+ + it is possible to add/replace original diffs from
+ the bootstrap package; just put diffs in the direcotry
+ <build_tag>-<piece>/ooo-build/hotfixes
+
+ the diff in the hotfixes dir overrrides the original diff of the
+ same name; the other diff files in the hotfixes direcotry (with
+ new names) are applied in the alphabetical order after all the
+ regular diffs;
+
+ + it is possible to modify the install process by the scripts:
+
+ <build_tag>-<piece>/ooo-build/bin/post-upstream-install
+ <build_tag>-<piece>/ooo-build/bin/post-install
+
+ the first one is called after the upstream installer finishes;
+ the second one is called at the very end after all the
+ ooo-build-specific hacks
+
+ generated packages:
+ math from writer
Modified: trunk/patches/apply.pl.in
==============================================================================
--- trunk/patches/apply.pl.in (original)
+++ trunk/patches/apply.pl.in Thu Nov 20 19:20:27 2008
@@ -426,11 +426,13 @@
sub list_patches(@) {
my ( @distros ) = @_;
+ my %Hotfixes = ();
+ detect_hotfixes( \%Hotfixes );
my @Patches = ();
foreach $distro ( @distros ) {
- @Patches = ( @Patches, list_patches_single( $distro ) );
+ @Patches = ( @Patches, list_patches_single( $distro, \%Hotfixes ) );
}
- @Patches = ( @Patches, list_hotfix_patches() );
+ @Patches = ( @Patches, list_hotfixes(\%Hotfixes) );
return @Patches;
}
@@ -460,6 +462,7 @@
}
my $forDistro = shift;
+ my $pHotfixes = shift;
my @Patches = ();
open (PatchList, "$apply_list") || die "Can't find $apply_list";
@@ -522,7 +525,16 @@
next;
}
- push @Patches, find_patch_file ($patch_name);
+ # look if we have a hotfix that would replace this patch
+ if ( defined $pHotfixes->{$patch_name} ) {
+ my $orig_file = find_patch_file ($patch_name);
+ print "Warning: \"$pHotfixes->{$patch_name}\" is used instead of \"$orig_file\"\n";
+ push @Patches, $pHotfixes->{$patch_name};
+ $pHotfixes->{$patch_name} = undef;
+ } else {
+ push @Patches, find_patch_file ($patch_name);
+ }
+
next;
}
@@ -612,21 +624,37 @@
return @Patches;
}
-sub list_hotfix_patches
+sub detect_hotfixes($)
{
+ my $pHotfixes = shift;
my $dirh;
- my @hotfix_patches;
- if (opendir($dirh, $hotfixes_dir)) {
- while (my $file = readdir ($dirh)) {
- $file =~ /^\./ && next; # hidden
- $file =~ /\.diff$/ || next; # non-patch
- push @hotfix_patches, "$hotfixes_dir/$file";
+ foreach my $dir ( $hotfixes_dir, $extra_hotfixes_dir ) {
+ if ( ($dir ne "") && opendir($dirh, $dir)) {
+ while (my $file = readdir ($dirh)) {
+ $file =~ /^\./ && next; # hidden
+ $file =~ /\.diff$/ || next; # non-patch
+ $pHotfixes->{"$file"} = "$dir/$file";
+ }
+ closedir($dirh);
+ }
+ }
+
+ return;
+}
+
+sub list_hotfixes($)
+{
+ my $pHotfixes = shift;
+ my @Patches = ();
+
+ foreach my $patch ( sort (keys %{$pHotfixes} ) ) {
+ if ( defined $pHotfixes->{$patch} ) {
+ push @Patches, "$pHotfixes->{$patch}";
}
- closedir($dirh);
}
- return (sort @hotfix_patches);
+ return (@Patches);
}
sub applied_patches_list
@@ -1032,7 +1060,7 @@
(@ARGV > 1) ||
die "Syntax:\n".
- "apply <path-to-patchdir> <src root> --tag=<src680-m90> [--distro=<Debian> [--distro=<Binfilter> [...]]] [--quiet] [--dry-run] [ patch flags ]\n" .
+ "apply <path-to-patchdir> <src root> --tag=<src680-m90> [--distro=<Debian> [--distro=<Binfilter> [...]]] [--hotfixes=<dir>] [--quiet] [--dry-run] [ patch flags ]\n" .
"apply <path-to-patchdir> --series-from=<Debian>\n" .
"apply <path-to-patchdir> --add-developer\n" .
"apply <path-to-patchdir> --find-unused\n" .
@@ -1050,6 +1078,7 @@
@distros = ();
$additional_sections = "";
$additional_sections_applied = 0;
+$extra_hotfixes_dir = "";
$tag = '';
$dry_run = 0;
$find_unused = 0;
@@ -1086,6 +1115,8 @@
push @distros, $1;
} elsif ($a =~ m/--additional-sections=(.*)/) {
$additional_sections="$1";
+ } elsif ($a =~ m/--hotfixes=(.*)/) {
+ $extra_hotfixes_dir="$1";
} elsif ($a =~ m/--add-developer/) {
$add_developer = 1;
$quiet = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]