Mailinglist Archive: opensuse-commit (1929 mails)

< Previous Next >
commit inst-source-utils for openSUSE:Factory

Hello community,

here is the log from the commit of package inst-source-utils for
openSUSE:Factory
checked in at Sun Oct 16 12:50:27 CEST 2011.



--------
--- openSUSE:Factory/inst-source-utils/inst-source-utils.changes
2011-09-23 02:03:34.000000000 +0200
+++ /mounts/work_src_done/STABLE/inst-source-utils/inst-source-utils.changes
2011-10-14 19:07:04.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Oct 14 17:04:57 UTC 2011 - lrupp@xxxxxxx
+
+- handle spaces in path in create_package_descr (bnc#604730)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ inst-source-utils.spec ++++++
--- /var/tmp/diff_new_pack.lOk7pU/_old 2011-10-16 12:50:24.000000000 +0200
+++ /var/tmp/diff_new_pack.lOk7pU/_new 2011-10-16 12:50:24.000000000 +0200
@@ -19,7 +19,7 @@

Name: inst-source-utils
Summary: Utilities for creating customized installation sources
-Version: 2011.5.25
+Version: 2011.10.14
Release: 1
Url: http://en.opensuse.org/Inst-source-utils
License: GPLv2+

++++++ inst-source-utils.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/inst-source-utils/usr/bin/create_package_descr
new/inst-source-utils/usr/bin/create_package_descr
--- old/inst-source-utils/usr/bin/create_package_descr 2011-05-25
10:26:31.000000000 +0200
+++ new/inst-source-utils/usr/bin/create_package_descr 2011-10-14
19:04:26.000000000 +0200
@@ -208,14 +208,14 @@
}
}

-unless ( -d $output_dir ) {
+unless ( -d "$output_dir" ) {
print "INFO: creating output directory $output_dir\n";
- mkdir_p($output_dir);
+ mkdir_p("$output_dir");
}

if ( @IGNOREDIRS ) {
foreach $ignore_dir (@IGNOREDIRS) {
- if ( -d $ignore_dir && opendir ( IGNDIR, "$ignore_dir") ) {
+ if ( -d "$ignore_dir" && opendir ( IGNDIR, "$ignore_dir") ) {
while ( $ign = readdir( IGNDIR ) ) {
next if ( $ign =~ /^\./ );
$IGNORE_PACKAGE{$ign} = "yes";
@@ -226,8 +226,8 @@
}
}

-if ( $ignore_file ) {
- if ( -f $ignore_file && open ( IGNFILE, "$ignore_file" ) ) {
+if ( "$ignore_file" ) {
+ if ( -f "$ignore_file" && open ( IGNFILE, "$ignore_file" ) ) {
while ( $ign = <IGNFILE> ) {
chomp ( $ign );
$IGNORE_PACKAGE{$ign} = "yes";
@@ -242,7 +242,7 @@
}

$pkg_main = OpenFileWrite ( "$output_dir/packages" );
-WriteSEntry( $pkg_main, "Ver", "2.0" );
+WriteSEntry( "$pkg_main", "Ver", "2.0" );
foreach $lang (@LANGUAGES) {
$pkg_lang{$lang} = OpenFileWrite ( "$output_dir/packages.$lang_alias{$lang}"
);
WriteSEntry( $pkg_lang{$lang}, "Ver", "2.0" );
@@ -250,8 +250,8 @@
$pkg_du = OpenFileWrite ( "$output_dir/packages.DU" );
$pkg_fl = OpenFileWrite ( "$output_dir/packages.FL" ) if $do_file_list;

-WriteSEntry( $pkg_du, "Ver", "2.0" );
-WriteSEntry( $pkg_fl, "Ver", "2.0" ) if $do_file_list;
+WriteSEntry( "$pkg_du", "Ver", "2.0" );
+WriteSEntry( "$pkg_fl", "Ver", "2.0" ) if $do_file_list;

$media_number = 0;
$allcounter = 0;
@@ -259,7 +259,7 @@

foreach $datapath (@DATADIRS) {
$media_number++;
- open ( FIND, "find $datapath -maxdepth 2 $with_links -name \"*.[rs]pm\"
-print | sort |" );
+ open ( FIND, "find '$datapath' -maxdepth 2 $with_links -name \"*.[rs]pm\"
-print | sort |" );
my @pkg_arr = ();
my @src_arr = ();
while ( <FIND> ) {
@@ -275,22 +275,22 @@
foreach my $package (@pkg_arr,@src_arr) {
$allcounter++;
print "INFO: CD$media_number - Pkg: $allcounter\r" if ( -t STDOUT );
- $filespec = $package;
+ $filespec = "$package";
chomp ( $filespec );
$filespec =~ /\/([^\/]*)$/;
$filename = $1;
$filesize = stat($filespec)->size;
# name, version, release, arch, obsolete, requires, provides,
# conflicts, copyright, group, buildtime, size, sourcerpm
- my %res = RPMQ::rpmq_many($package, 1000, 1001, 1002, 1022,
- 1090, 1114, 1115,
- 1047, 1112, 1113,
- 1049, 1048, 1050,
- 1054, 1053, 1055,
- 1156, 1157, 1158,
- 1159, 1160, 1161,
- 1027, 1116, 1117, 1118, 1030, 1028,
1095, 1096,
- 1014, 1016, 1006, 1009, 1044, 1004,
1005, 1011, 1124);
+ my %res = RPMQ::rpmq_many("$package", 1000, 1001, 1002, 1022,
+ 1090, 1114, 1115,
+ 1047, 1112, 1113,
+ 1049, 1048, 1050,
+ 1054, 1053, 1055,
+ 1156, 1157, 1158,
+ 1159, 1160, 1161,
+ 1027, 1116, 1117, 1118, 1030, 1028,
1095, 1096,
+ 1014, 1016, 1006, 1009, 1044, 1004,
1005, 1011, 1124);

# skip delta rpms (if PAYLOADFORMAT eq drpm)
next if ($res{1124}[0] && $res{1124}[0] eq "drpm");
@@ -307,7 +307,7 @@
$ignored_packages .= " $rpm_name";
next;
}
- my @pack_path = split('/',$package);
+ my @pack_path = split('/',"$package");
pop @pack_path; # filename
pop @pack_path; # dirname / rpm-arch
my $pack_basedir = join('/',@pack_path);
@@ -320,7 +320,7 @@
$srcrpm =~ s/^(.*)-([^-]*)-([^-]*)\.([^\.]*)\.rpm$/$1 $2 $3 $4/;
if ($do_checksums eq "1") {
if ( $have_sha_cache ne "0" ) {
- my %qq = RPMQ::rpmq_many($package, qw{SIGTAG_GPG SIGTAG_PGP
SIGTAG_SHA1});
+ my %qq = RPMQ::rpmq_many("$package", qw{SIGTAG_GPG SIGTAG_PGP
SIGTAG_SHA1});
if ( %qq ) {
for (qw{SIGTAG_GPG SIGTAG_PGP SIGTAG_SHA1}) {
$hash .= join('', @{$qq{$_} || []});
@@ -343,16 +343,16 @@
}
}
if ( ! $checksum ) {
- if ( $res{1044}[0] || $ignore_sources eq "0") {
- ($checksum,$dummy) = split('\s+',`$checksum_binary $package`);
- if ( $have_sha_cache eq "1" ) {
- open ( CSC, "> $SHA_CACHEDIR[0]/$rpm_name-$hash" );
- print CSC $checksum;
- close ( CSC );
- #print "INFO: wrote checksum for $package
($checksum)\n";
- }
- }
- }
+ if ( $res{1044}[0] || $ignore_sources eq "0") {
+ ($checksum,$dummy) = split('\s+',`$checksum_binary '$package'`);
+ if ( $have_sha_cache eq "1" ) {
+ open ( CSC, "> $SHA_CACHEDIR[0]/$rpm_name-$hash" );
+ print CSC $checksum;
+ close ( CSC );
+ #print "INFO: wrote checksum for $package
($checksum)\n";
+ }
+ }
+ }
}
if ( $res{1044}[0] ) {
($DULIST,$FLIST) = RpmToDulist($maxdepth, \%res, '');
@@ -363,7 +363,7 @@
if ( $filename =~ /\.spm$/ ) {
$file_arch = "src";
} else {
- $file_arch = $filename;
+ $file_arch = "$filename";
$file_arch =~ s/^.*\.([^\.]*)\.rpm$/$1/;
}
($DULIST,$FLIST) = RpmToDulist($maxdepth, \%res, 'usr/src/packages/');
@@ -392,44 +392,44 @@
}
}

- WriteSeparator( $pkg_main );
- WriteComment( $pkg_main, @SAVEARGS ) unless $wrote_comment;
- WriteSeparator( $pkg_main ) unless $wrote_comment;
+ WriteSeparator( "$pkg_main" );
+ WriteComment( "$pkg_main", @SAVEARGS ) unless $wrote_comment;
+ WriteSeparator( "$pkg_main" ) unless $wrote_comment;
$wrote_comment = 1;
- WriteSEntry( $pkg_main, "Pkg", "$res{1000}[0] $res{1001}[0] $res{1002}[0]
$file_arch");
+ WriteSEntry( "$pkg_main", "Pkg", "$res{1000}[0] $res{1001}[0]
$res{1002}[0] $file_arch");
if ($do_sha256 eq "1") {
- WriteSEntry( $pkg_main, "Cks", "SHA256 $checksum") if ($checksum);
+ WriteSEntry( "$pkg_main", "Cks", "SHA256 $checksum") if ($checksum);
} else {
- WriteSEntry( $pkg_main, "Cks", "SHA1 $checksum") if ($checksum);
+ WriteSEntry( "$pkg_main", "Cks", "SHA1 $checksum") if ($checksum);
}
if ( $res{1044}[0] ) {
# has src, so it's a binary package
- WriteMEntry( $pkg_main, "Req", @{$res{1049}} );
- WriteMEntry( $pkg_main, "Prq", @prereq );
- WriteMEntry( $pkg_main, "Prv", @{$res{1047}} );
- WriteMEntry( $pkg_main, "Con", @{$res{1054}} );
- WriteMEntry( $pkg_main, "Obs", @{$res{1090}} );
- WriteMEntry( $pkg_main, "Rec", filter_strong(\%res, 1156, 1158));
- WriteMEntry( $pkg_main, "Sug", filter_weak(\%res, 1156, 1158));
- WriteMEntry( $pkg_main, "Sup", filter_strong(\%res, 1159, 1161));
- WriteMEntry( $pkg_main, "Enh", filter_weak(\%res, 1159, 1161));
- WriteSEntry( $pkg_main, "Grp", $res{1016}[0] );
- WriteSEntry( $pkg_main, "Lic", $res{1014}[0] );
- WriteSEntry( $pkg_main, "Vnd", $res{1011}[0] ) if $add_vendor;
- WriteSEntry( $pkg_main, "Src", $srcrpm );
- WriteSEntry( $pkg_main, "Tim", $res{1006}[0] );
- WriteSEntry( $pkg_main, "Loc", "$media_number $filename");
+ WriteMEntry( "$pkg_main", "Req", @{$res{1049}} );
+ WriteMEntry( "$pkg_main", "Prq", @prereq );
+ WriteMEntry( "$pkg_main", "Prv", @{$res{1047}} );
+ WriteMEntry( "$pkg_main", "Con", @{$res{1054}} );
+ WriteMEntry( "$pkg_main", "Obs", @{$res{1090}} );
+ WriteMEntry( "$pkg_main", "Rec", filter_strong(\%res, 1156, 1158));
+ WriteMEntry( "$pkg_main", "Sug", filter_weak(\%res, 1156, 1158));
+ WriteMEntry( "$pkg_main", "Sup", filter_strong(\%res, 1159, 1161));
+ WriteMEntry( "$pkg_main", "Enh", filter_weak(\%res, 1159, 1161));
+ WriteSEntry( "$pkg_main", "Grp", $res{1016}[0] );
+ WriteSEntry( "$pkg_main", "Lic", $res{1014}[0] );
+ WriteSEntry( "$pkg_main", "Vnd", $res{1011}[0] ) if $add_vendor;
+ WriteSEntry( "$pkg_main", "Src", $srcrpm );
+ WriteSEntry( "$pkg_main", "Tim", $res{1006}[0] );
+ WriteSEntry( "$pkg_main", "Loc", "$media_number $filename");
} else {
- WriteMEntry( $pkg_main, "Req", @{$res{1049}} ) if $src_requires;
- WriteSEntry( $pkg_main, "Loc", "$media_number $filename $file_arch");
+ WriteMEntry( "$pkg_main", "Req", @{$res{1049}} ) if $src_requires;
+ WriteSEntry( "$pkg_main", "Loc", "$media_number $filename $file_arch");
}
- WriteSEntry( $pkg_main, "Siz", "$filesize $res{1009}[0]" );
+ WriteSEntry( "$pkg_main, "Siz", "$filesize $res{1009}[0]" );

- WriteAnyEntry( $pkg_main , $xtaglist{$rpm_name} ) if ($xtaglist{$rpm_name}
&& $res{1044}[0]);
+ WriteAnyEntry( "$pkg_main , $xtaglist{$rpm_name} ) if
($xtaglist{$rpm_name} && $res{1044}[0]);

if ($SEEN_PACKAGE{"$rpm_name $res{1001}[0] $res{1002}[0]"} && $allow_shr) {
$found_in = $SEEN_PACKAGE{"$rpm_name $res{1001}[0] $res{1002}[0]"};
- WriteSEntry( $pkg_main, "Shr", "$res{1000}[0] $res{1001}[0]
$res{1002}[0] $found_in");
+ WriteSEntry( "$pkg_main", "Shr", "$res{1000}[0] $res{1001}[0]
$res{1002}[0] $found_in");
} else {
if ( $pdb_data_dir ) {
my $pac_rpm_name = $rpm_name;
@@ -459,9 +459,9 @@
warn "ERROR: newline in summary for package
$pac_rpm_name\n";
$pacdata{$pac_rpm_name}{"$default_lang"}{"label"} =~ s/\n/
/g;
}
- WriteMEntry( $pkg_main, "Aut",
@{$pacdata{$pac_rpm_name}{"authorname"}} );
+ WriteMEntry( "$pkg_main", "Aut",
@{$pacdata{$pac_rpm_name}{"authorname"}} );
if ( $do_keywords eq "1" && $pacdata{$pac_rpm_name}{"keywords"} ) {
- WriteMEntry( $pkg_main, "Kwd",
@{$pacdata{$pac_rpm_name}{"keywords"}} );
+ WriteMEntry( "$pkg_main", "Kwd",
@{$pacdata{$pac_rpm_name}{"keywords"}} );
}
foreach $lang (@LANGUAGES) {
WriteSeparator( $pkg_lang{$lang} );
@@ -537,12 +537,12 @@
print "INFO: following packages were ignored: $ignored_packages\n";
}

-close ( $pkg_main );
+close ( "$pkg_main" );
foreach $lang (@LANGUAGES) {
- close ( $pkg_lang{$lang} );
+ close ( "$pkg_lang{$lang}" );
}
-close ( $pkg_du );
-close ( $pkg_fl ) if $do_file_list;
+close ( "$pkg_du" );
+close ( "$pkg_fl" ) if $do_file_list;

if ($num_pdb_records) {
warn ("used pdb records $num_pdb_records\n") if $num_pdb_records;
@@ -553,15 +553,15 @@
print "INFO: now recoding to UTF-8: ";
foreach $file ("packages","packages.DU") {
print "$file ";
- system ( "recode ISO-8859-1...UTF-8 $output_dir/$file" );
+ system ( "recode ISO-8859-1...UTF-8 \"$output_dir/$file\"" );
}
foreach $lang (@LANGUAGES) {
$file = "packages.$lang_alias{$lang}";
print "$file ";
if ( $lang eq "czech" || $lang eq "hungarian" ) {
- system ( "recode ISO-8859-2...UTF-8 $output_dir/$file" );
+ system ( "recode ISO-8859-2...UTF-8 \"$output_dir/$file\"" );
} else {
- system ( "recode ISO-8859-1...UTF-8 $output_dir/$file" );
+ system ( "recode ISO-8859-1...UTF-8 \"$output_dir/$file\"" );
}
}
print "\n";
@@ -572,11 +572,11 @@
sub mkdir_p {
my $dir = shift;

- return 1 if -d $dir;
+ return 1 if -d "$dir";
if ($dir =~ /^(.*)\//) {
- mkdir_p($1) || return undef;
+ mkdir_p("$1") || return undef;
}
- return undef if !mkdir($dir, 0777);
+ return undef if !mkdir("$dir", 0777);
return 1;
}

@@ -597,7 +597,7 @@
sub ReadFileToHash {
local ($filename) = @_;
local (%temp);
- my $FH = OpenFileRead( $filename );
+ my $FH = OpenFileRead( "$filename" );
while (<$FH>) {
chomp ($_);
last if ( $_ =~ /^:END/ );
@@ -690,17 +690,17 @@

$name = '' unless $name =~ s/\/[^\/]*$//;
if ( ($name =~ tr/\///) < $maxdepth ) {
- $dirsize{"$name/"} += $size;
- $dirnum{"$name/"} += 1;
- $subdirsize{"$name/"} ||= 0; # so we get all keys
+ $dirsize{"$name/"} += $size;
+ $dirnum{"$name/"} += 1;
+ $subdirsize{"$name/"} ||= 0; # so we get all keys
}
# traverse though path stripping components from the back
$name =~ s/\/[^\/]*$// while ( ($name =~ tr/\///) > $maxdepth );

while ($name ne '') {
- $name = '' unless $name =~ s/\/[^\/]*$//;
- $subdirsize{"$name/"} += $size;
- $subdirnum{"$name/"} += 1;
+ $name = '' unless $name =~ s/\/[^\/]*$//;
+ $subdirsize{"$name/"} += $size;
+ $subdirnum{"$name/"} += 1;
}
}
my @dulist = ();

continue with "q"...



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread