summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-25 08:27:00 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-25 08:27:00 +0000
commit8e36daafd79865c3d1d8ccf71efb1e1f13238299 (patch)
tree80c64cf50efe535a40c9c5c0440db90e4482768d
parentdfe0bf9d32697f07f12e912af21034456114edcb (diff)
downloaddrakx-8e36daafd79865c3d1d8ccf71efb1e1f13238299.tar
drakx-8e36daafd79865c3d1d8ccf71efb1e1f13238299.tar.gz
drakx-8e36daafd79865c3d1d8ccf71efb1e1f13238299.tar.bz2
drakx-8e36daafd79865c3d1d8ccf71efb1e1f13238299.tar.xz
drakx-8e36daafd79865c3d1d8ccf71efb1e1f13238299.zip
consolidate some stuff from standalone tools & mcc into mdk_rel()
-rw-r--r--perl-install/common.pm4
-rwxr-xr-xperl-install/standalone/drakbug8
-rwxr-xr-xperl-install/standalone/drakbug_report4
3 files changed, 9 insertions, 7 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 4093c1b02..31a1fcd12 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -242,4 +242,8 @@ sub set_permissions {
or die "Could not start chmod!";
}
+sub mdk_rel {
+ chomp_(cat_("/etc/mandrake-release")
+}
+
1;
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index f3681fac3..d3e0df815 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -68,9 +68,7 @@ my @generic_tool = keys %{$mdk_app};
my @all_drakxtools = @{ $mdk_app->{N("Standalone Tools")} };
push(@generic_tool,@all_drakxtools);
-my $kernel_release = chomp_(`uname -r`);
-$kernel_release .= "";
-my $mdk_release = chomp_(cat_("/etc/mandrake-release"));
+my $kernel_release = chomp_(`uname -r`) . "";
my $table = new Gtk::Table(4,2, 'TRUE');
#$table->set_border_width(5);
@@ -88,7 +86,7 @@ $package->set_text("...");
$table->attach(my $kernel_rel = new Gtk::Entry(), 1, 2, 2, 3, 'fill', 'fill',0,0);
$kernel_rel->set_text($kernel_release);
$table->attach(my $mdk_rel = new Gtk::Entry(), 1, 2, 3, 4, 'fill', 'fill',0,0);
-$mdk_rel->set_text($mdk_release);
+$mdk_rel->set_text(mdk_rel());
gtkpack2__(
gtkpack2__(my $vbx = new Gtk::VBox(0,5),
@@ -169,7 +167,7 @@ sub get_package {
}
sub parse_release {
- my ($rel) = cat_('/etc/mandrake-release') =~ /release\s(\S+\s\(.*\))/;
+ my ($rel) = mdk_rel() =~ /release\s(\S+\s\(.*\))/;
$rel;
}
diff --git a/perl-install/standalone/drakbug_report b/perl-install/standalone/drakbug_report
index 6b70acb35..2f1abf662 100755
--- a/perl-install/standalone/drakbug_report
+++ b/perl-install/standalone/drakbug_report
@@ -2,12 +2,12 @@
use lib qw(/usr/lib/libDrakX);
-use MDK::Common;
+use common;
use any;
my %other = (
'rpm -qa' => join('', sort `rpm -qa`),
- 'mandrake version' => cat_('/etc/redhat-release'),
+ 'mandrake version' => mdk_rel(),
'df' => join('', `df`),
);