aboutsummaryrefslogtreecommitdiffstats
path: root/edit-urpm-sources.pl
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-06-23 03:05:33 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-06-23 03:05:33 +0000
commite556f52360dd6652a7f4368b4c6ac9a02bcde140 (patch)
tree19ef0d4b4d52a818bc35ef115158f626c4c6f1f5 /edit-urpm-sources.pl
parentab3714ef3247c4b56fd22fdc25754f3ec2a44c8f (diff)
downloadrpmdrake-e556f52360dd6652a7f4368b4c6ac9a02bcde140.tar
rpmdrake-e556f52360dd6652a7f4368b4c6ac9a02bcde140.tar.gz
rpmdrake-e556f52360dd6652a7f4368b4c6ac9a02bcde140.tar.bz2
rpmdrake-e556f52360dd6652a7f4368b4c6ac9a02bcde140.tar.xz
rpmdrake-e556f52360dd6652a7f4368b4c6ac9a02bcde140.zip
Reorganize order in which the startup boilerplate is executed
Diffstat (limited to 'edit-urpm-sources.pl')
-rwxr-xr-xedit-urpm-sources.pl16
1 files changed, 9 insertions, 7 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl
index 9746d49e..fe5f00b8 100755
--- a/edit-urpm-sources.pl
+++ b/edit-urpm-sources.pl
@@ -24,19 +24,21 @@
use strict;
use lib qw(/usr/lib/libDrakX);
use common;
-
-require_root_capability();
-
use rpmdrake;
use URPM::Signature;
-eval { require ugtk2; ugtk2->import(qw(:all)) };
-if ($@) {
- print "This program cannot be run in console mode.\n";
- c::_exit(0); #- skip ugtk2::END
+BEGIN {
+ eval { require ugtk2; ugtk2->import(qw(:all)) };
+ if ($@) {
+ print "This program cannot be run in console mode.\n";
+ c::_exit(0); #- skip ugtk2::END
+ }
}
+
$::isStandalone = 1;
+require_root_capability();
+
my $urpm;
my ($mainw, $remove, $edit, $list_tv);