From bd1dbce592d183fbec12b9f4576b927e329f1063 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Mon, 13 Dec 2010 21:39:45 +0000 Subject: try to fix all issue.... duplicate rpms, unwanted one, use perl-URPM to create idx file --- BCD/Genisoimage.pm | 15 +++++++++++++-- BCD/Media.pm | 21 ++++++++++++++++++--- BCD/Web.pm | 2 +- lists/basesystem_common | 5 ++--- lists/corpo | 13 +++++++++++-- lists/exclude_main_corpo | 3 ++- lists/kernel32 | 2 +- lists/kernel64 | 2 +- lists/server_cs5 | 1 - 9 files changed, 49 insertions(+), 15 deletions(-) diff --git a/BCD/Genisoimage.pm b/BCD/Genisoimage.pm index 7dba9b1..96d5b6e 100644 --- a/BCD/Genisoimage.pm +++ b/BCD/Genisoimage.pm @@ -3,6 +3,7 @@ package BCD::Genisoimage; use strict; use XML::Simple; use BCD::Common qw(:DEFAULT $isoconf $wd $name $arch $version $builddir $isodir $error_color $repo $based_on); +use BCD::Media qw(:DEFAULT parse_synthesis); our @ISA = qw(Exporter); our @EXPORT = qw(main_iso); @@ -48,11 +49,21 @@ sub create_productid { } sub create_idx { - print_color("$LOG create the IDX file from $builddir/pkg-$version-$isoconf->{iso}{tag}.idx", $color); + print_color("$LOG create the IDX file from $builddir/pkg-$version-$isoconf->{iso}{tag}.idx", $color); # pkg-2009.1-pauillac.idx - system("find $builddir -name \*.rpm | awk -F 'media/' {'print \"$isoconf->{iso}{header}{volumeid} \" \$2'} | sed -e 's/\.rpm\$//g' | sort > $builddir/pkg-$version-$isoconf->{iso}{tag}.idx"); + my $idx = "$builddir/pkg-$version-$isoconf->{iso}{tag}.idx"; + my %hrpms = parse_synthesis("$builddir/$isoconf->{mediainfo}{mediainfo_dir}/"); + open my $idx_file, ">$idx"; + foreach (keys %hrpms) { + $_ or next; + my @table = @{ $hrpms{$_} }; +# print "$isoconf->{iso}{header}{volumeid} $_-$table[0]-$table[1]\n"; + print $idx_file "$isoconf->{iso}{header}{volumeid} $_-$table[0]-$table[1]\n"; + } + close $idx; system("cp -v $builddir/pkg-$version-$isoconf->{iso}{tag}.idx $isodir/$isoname.idx"); } + sub create_iso { # build the ISO with all args diff --git a/BCD/Media.pm b/BCD/Media.pm index 3b5878a..aa50fad 100644 --- a/BCD/Media.pm +++ b/BCD/Media.pm @@ -14,7 +14,7 @@ use Data::Dumper; use BCD::Common qw(:DEFAULT $isoconf $wd $name $arch $version $based_on $repo $builddir $distrib_path $error_color $DISTRIB $THEME $tmp_rpmsrate $NB_FORK $dir_deps @list_of_removed); our @ISA = qw(Exporter); -our @EXPORT = qw(main_media list_media use_gendistrib list_medias_available check_repo_hdlist rpmcheck_launch solve_doble_issue clean_urpmq_log get_srpms_list find_all_kernel, create_mediacfg); +our @EXPORT = qw(main_media list_media use_gendistrib list_medias_available check_repo_hdlist rpmcheck_launch solve_doble_issue clean_urpmq_log get_srpms_list find_all_kernel, create_mediacfg parse_synthesis); our @EXPORT_OK = qw($rpmcheck_list_pkg $file_rpmcheck_log); my $verbose; @@ -108,6 +108,7 @@ sub use_gendistrib { print_color("$LOG < 2009.1 or mes5 detected", $color); print_color("$LOG move hdlists and synthesys from $builddir/media/$destmedia/media_info to $builddir/media/media_info/", $color); system("rm -vf $builddir/media/media_info/*_$media->{name}.cz"); + system("rm -vf $builddir/media/media_info/*_main.cz"); system("rm -vf $builddir/media/media_info/pubkey_$media->{name}"); system("cp -avf $builddir/media/$destmedia/media_info/hdlist.cz $builddir/media/media_info/hdlist_$media->{name}.cz"); system("cp -avf $builddir/media/$destmedia/media_info/pubkey $builddir/media/media_info/pubkey_$media->{name}"); @@ -177,6 +178,20 @@ name=$media->{desc} close $MEDIACFG; } +sub parse_synthesis { + my ($path) = @_; + my $urpm = new URPM; + my %hash_rpms; + foreach (<$path/*.cz>) { + $urpm->parse_synthesis($_, keep_all_tags => 0); + $urpm->traverse(sub { my ($p) = @_; + $hash_rpms{ $p->name } = [ $p->version, $p->release, ]; + } + ); + } + return %hash_rpms; +} + # based on a similar functions in pkgs.pm sub get_list_from_CAT { #4 META_CLASS"desktop" mandriva-xfce-config-One @@ -490,7 +505,7 @@ sub do_fork { if ($previous_urqpm_querie =~ /EMPTY/) { $verbose and print_color("$LOG can't found the urpmq transaction for $pkg", $color); } else { - $verbose and print_color("$LOG found the urpmq transaction for $pkg, i will use $previous_urqpm_querie", $color); + $verbose and print_color("$LOG found the urpmq transaction for $pkg, i will use $previous_urqpm_querie, and copy it to $list-$pkg", $color); system("touch $dir_deps/bypass-$pkg"); system("cp -f $previous_urqpm_querie $list-$pkg"); #system("cp -f $dir_deps/$isoconf->{tocopy_file}_todo_$media->{name}-$pkg $dir_deps/$list_filename-$pkg"); @@ -548,7 +563,7 @@ sub concatenate_files { foreach my $totest (cat_($exclude->{file})) { chomp($totest); if (! $totest) { next }; - system("rm -vf $chroot_path/urpmq/$isoconf->{tocopy_file}_todo_*$totest"); + system("rm -vf $chroot_path/urpmq/$isoconf->{tocopy_file}_todo_*-$totest"); } } } diff --git a/BCD/Web.pm b/BCD/Web.pm index f5630f6..70cf501 100644 --- a/BCD/Web.pm +++ b/BCD/Web.pm @@ -31,7 +31,7 @@ sub main_html { show_rpmcheck(); rename_iso(); link_urpmq_log(); - clean_previous_iso(); + #clean_previous_iso(); link_iso(); open my $B, ">>$index"; print $B ""; diff --git a/lists/basesystem_common b/lists/basesystem_common index be18267..4b5215a 100644 --- a/lists/basesystem_common +++ b/lists/basesystem_common @@ -323,7 +323,6 @@ foomatic-filters #### kvm -qemu #dkms-kqemu #### @@ -335,8 +334,8 @@ linux-atm varnish uucp -mandriva-doc-fr-mes5-1mdvmes5 -mandriva-doc-en-mes5-1mdvmes5 +mandriva-doc-fr +mandriva-doc-en ### mbootpack diff --git a/lists/corpo b/lists/corpo index a41ac60..efcc55d 100644 --- a/lists/corpo +++ b/lists/corpo @@ -39,14 +39,13 @@ firebird-server-superserver firebird-superserver firebird-utils-classic firebird-utils-superserver -glibc_lsb glpi haproxy initscripts kexec-tools -lsb lsb-core lsb-test +glibc_lsb mandriva-gfxboot-theme mandriva-release-common mandriva-release-Server @@ -60,3 +59,13 @@ perl-Proc-PID-File task-nagios task-c++-devel task-c-devel +kernel-xen-2.6.27.21-xen-3.3.1-4mdv +gtk+2.0 +perl-File-Fetch +perl-Gtk2-StatusIcon +perl-POP3Client +perl-Test-Simple +perl-CPAN- +perl-DCOP- +docbook-dtd30-sgml +playmidi-X11 diff --git a/lists/exclude_main_corpo b/lists/exclude_main_corpo index cf50074..bb43615 100644 --- a/lists/exclude_main_corpo +++ b/lists/exclude_main_corpo @@ -38,7 +38,6 @@ iptables-devel fglrx-kernel-desktop-latest fglrx-kernel-server-latest gtk+2.0-2.14.3-2mdv2009.0 - lib64vtk-devel libvtk-devel libglade-java- @@ -46,6 +45,8 @@ libglade-java-devel nspluginwrapper nspluginwrapper-i386 virtualbox-guest-additions +mandriva-doc-fr-mes5-1mdv +drdsl kernel-2.6.27.21* *2.6.27.24* diff --git a/lists/kernel32 b/lists/kernel32 index 0fea7ea..60f6e2b 100644 --- a/lists/kernel32 +++ b/lists/kernel32 @@ -1,3 +1,3 @@ kernel-desktop586-latest kernel-desktop586-devel -vboxadditions-kernel-desktop586-latest +#vboxadditions-kernel-desktop586-latest diff --git a/lists/kernel64 b/lists/kernel64 index 1b44c0e..575ec3e 100644 --- a/lists/kernel64 +++ b/lists/kernel64 @@ -1,3 +1,3 @@ kernel-desktop-latest kernel-desktop-devel -vboxadditions-kernel-desktop-latest +#vboxadditions-kernel-desktop-latest diff --git a/lists/server_cs5 b/lists/server_cs5 index 31a52db..ddda200 100644 --- a/lists/server_cs5 +++ b/lists/server_cs5 @@ -443,7 +443,6 @@ urpmi-parallel-ka-run ### -glibc_lsb-2.4.7 mtools xlsfonts sgml-common -- cgit v1.2.1