Mailinglist Archive: opensuse-buildservice (311 mails)

< Previous Next >
[opensuse-buildservice] I've a puzzle on /usr/lib/build/createrpmdeps
  • From: 李建 <lijian.gnu@xxxxxxxxx>
  • Date: Thu, 19 Nov 2009 11:22:57 +0800
  • Message-id: <426c385a0911181922r2d588ecl5af3db591d401a40@xxxxxxxxxxxxxx>
Hi, guys

The /usr/lib/build/createrpmdeps first use $ARGV[0] as a file,
and use @ARGV as dir last. Does it need ?

I thought if $ARGV[0] is a file , should remove $ARGV[0] from
@ARGV first. or it would have a error messages when use find
command ( although the 40 line could ignore this mistake,
but error message would be saw also)

--------------------------------------------
12 my $rpmdepfile = $ARGV[0];
13
14 my %tag;
15
16 my %oldp;
17 my %oldr;
18 if (defined($rpmdepfile) && open(F, '<', $rpmdepfile)) {
19 while (<F>) {
20 chomp;
21 if (/^P:([^ ]): /) {
22 $oldp{$1} = $_;
23 } elsif (/^R:([^ ]): /) {
24 $oldr{$1} = $_;
25 }
26 }
27 close F;
28 }
29
30 print "\$ARGV[0] = $ARGV[0]\n\@ARGV = @ARGV\n";
31
32 my $redo = 1;
33 foreach my $dir (@ARGV) {
34 $redo = 0;
35 my @known;
36 my %known2fn;
37 my %known2path;
38 my %fnsize2id;
39 my $cmd = "find $dir -follow -type f \\( -name \"*.rpm\" -o
-name \"*.deb\" \\) -a ! -name \"*src.rpm\" -printf '\%T@/\%s/\%i
\%p\\n'";
40 open(F, '-|', $cmd) or next;
41 while (<F>) {
42 chomp;
43 next unless /^([\d\.]+\/\d+\/\d+) (.*)$/;
================================

The 30 line was added by me. The head of /var/tmp/build-root/.srcfiles.cache
was follow when i exec build command manual:
-------------------------------------------------------
$ARGV[0] = /dist/osc/lab/GTES.x86_64/
@ARGV = /dist/osc/lab/GTES.x86_64/
F:eruby-devel.x86_64-1258521148/10450/11339367:
/dist/osc/lab/GTES.x86_64/x86_64/eruby-devel-1.0.5-6.1.x86_64.rpm
P:eruby-devel.x86_64-1258521148/10450/11339367: eruby-devel = 1.0.5-6.1
R:eruby-devel.x86_64-1258521148/10450/11339367: eruby-libs = 1.0.5
liberuby.so.1.0()(64bit) rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
I:eruby-devel.x86_64-1258521148/10450/11339367: eruby-devel-1.0.5-6.1 1176263192
====================================================

Maybe the writer of this scripts have a good idea.


Thanks,



--
Jian Lee [ http://jianlee.ylinux.org ]
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages