From: biao716.wang Date: Thu, 29 Oct 2020 08:20:06 +0000 (+0900) Subject: Generate dependece XML file X-Git-Tag: accepted/tizen/devbase/tools/20201105.013041~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ba69eb8b0ec9578c9d9037f8e1442456ee4a5a7;p=tools%2Fdepanneur.git Generate dependece XML file Change-Id: Ib2f2a468c146b2683935f8aae2a384e39e064b16 Signed-off-by: biao716.wang --- diff --git a/depanneur b/depanneur index af0bdbe..da134e6 100755 --- a/depanneur +++ b/depanneur @@ -2471,32 +2471,58 @@ sub generate_depends() { my $out = "$depends_dir/$dist/$arch/"; mkdir_p($out); - my $total = scalar (keys %to_build); - my $index = 1; + # my $total = scalar (keys %to_build); + # my $index = 1; - #Generate reverse dependence xml file. - info("Generating reverse dependence file..."); - open(my $f, '>', "$out/$dist\_$arch\_revpkgdepends.xml") or die "$out/$dist\_$arch\_revpkgdepends.xml' $!"; + #Generate dependence XML file. + info("Generating dependence XML file..."); + open(my $f, '>', "$out/$dist\_$arch\_pkgdepends.xml") or die "$out/$dist\_$arch\_pkgdepends.xml' $!"; print $f "\n"; #sort in alphabetical order foreach my $p (sort keys %to_build) { - info("[$index/$total] generating reverse dependence for package $p..."); + #info("[$index/$total] generating dependence for package $p..."); print $f "\n"; #output package source name print $f "$p\n"; - #output reverse dependence package info. - foreach my $dep (sort @{$pkgrdeps{$p}}) { + #output reverse dependence package info. + foreach my $dep (sort @{$pkgdeps{$p}}) { print $f "$dep\n"; } - #output subpkg info. + #output subpkg info. foreach my $subpn (sort @{$packs{$p}->{subpacks}}) { print $f "$subpn\n"; } print $f "\n"; - $index++; + #$index++; } print $f "\n"; close $f; + info("The dependence XML file has been generated in $out"); + + #Generate reverse dependence XML file. + info("Generating reverse dependence XML file..."); + open(my $rf, '>', "$out/$dist\_$arch\_revpkgdepends.xml") or die "$out/$dist\_$arch\_revpkgdepends.xml' $!"; + print $rf "\n"; + #sort in alphabetical order + foreach my $p (sort keys %to_build) { + #info("[$index/$total] generating reverse dependence for package $p..."); + print $rf "\n"; + #output package source name + print $rf "$p\n"; + #output reverse dependence package info. + foreach my $dep (sort @{$pkgrdeps{$p}}) { + print $rf "$dep\n"; + } + #output subpkg info. + foreach my $subpn (sort @{$packs{$p}->{subpacks}}) { + print $rf "$subpn\n"; + } + print $rf "\n"; + #$index++; + } + print $rf "\n"; + close $rf; + info("The reverse dependence XML file has been generated in $out"); } #use pre-export source to analyse sub fill_packs_from_dir {