diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-09-11 13:25:53 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-09-11 13:25:53 +0000 |
commit | 741b46a1f3fb048d3235c3dccea0c6968bea9041 (patch) | |
tree | a193497aa9dd5f22469d892edd2ca847f004dc12 | |
parent | a45e542ed8171f3f6e8246b1a1574b0a27c836a0 (diff) | |
download | rpmdrake-741b46a1f3fb048d3235c3dccea0c6968bea9041.tar rpmdrake-741b46a1f3fb048d3235c3dccea0c6968bea9041.tar.gz rpmdrake-741b46a1f3fb048d3235c3dccea0c6968bea9041.tar.bz2 rpmdrake-741b46a1f3fb048d3235c3dccea0c6968bea9041.tar.xz rpmdrake-741b46a1f3fb048d3235c3dccea0c6968bea9041.zip |
when there is no file in a package, report (none) instead of Non available
-rwxr-xr-x | rpmdrake | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -111,7 +111,7 @@ sub extract_header { if ($MODE eq 'remove') { @$max_info_in_descr or return; my $name = my_fullname($pkg->{pkg}); - add2hash($pkg, { files => scalar(`rpm -ql $name`), changelog => scalar(`rpm -q --changelog $name`) }); + add2hash($pkg, { files => scalar(`rpm -ql $name`) || _("(none)"), changelog => scalar(`rpm -q --changelog $name`) }); } else { my ($headersdir, $p, $medium) = ('/root/tmp/headers/', $pkg->{pkg}, pkg2medium($pkg->{pkg}, $urpm)); my $hdlist = "$urpm->{statedir}/$medium->{hdlist}"; @@ -124,7 +124,7 @@ sub extract_header { rm_rf($headersdir); add2hash($pkg, { summary => $p->summary, description => beautify_description($p->description) }); my $localtime2changelog = sub { scalar(localtime($_[0])) =~ /(.*) \S+ (\d{4})$/; "$1 $2" }; - @$max_info_in_descr and add2hash($pkg, { files => join("\n", $p->files), + @$max_info_in_descr and add2hash($pkg, { files => join("\n", $p->files) || _("(none)"), changelog => join("\n", mapn { "* ".$localtime2changelog->($_[2])." $_[0]\n\n$_[1]\n" } [ $p->changelog_name ], [ $p->changelog_text ], [ $p->changelog_time ]) }); $p->pack_header; |