aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-09-28 08:50:14 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-09-28 08:50:14 +0000
commit77c467255c766a1bcc99e7f75a89fad1bde3c835 (patch)
tree9a203a0d37e9d8cf9c08ec17c2dfb9abac08b5a7
parent063e5f29aca06f55ae8d5dd0e3c161169b0310f4 (diff)
downloadrpmtools-77c467255c766a1bcc99e7f75a89fad1bde3c835.tar
rpmtools-77c467255c766a1bcc99e7f75a89fad1bde3c835.tar.gz
rpmtools-77c467255c766a1bcc99e7f75a89fad1bde3c835.tar.bz2
rpmtools-77c467255c766a1bcc99e7f75a89fad1bde3c835.tar.xz
rpmtools-77c467255c766a1bcc99e7f75a89fad1bde3c835.zip
Documentation nits. Fix some fatal error messages.
-rw-r--r--Distribconf.pm7
-rwxr-xr-xgendistrib69
2 files changed, 39 insertions, 37 deletions
diff --git a/Distribconf.pm b/Distribconf.pm
index 56fee3e..0552d36 100644
--- a/Distribconf.pm
+++ b/Distribconf.pm
@@ -27,7 +27,7 @@ Distribconf - perl module to get config from a Mandriva Linux distribution tree
use Distribconf;
my $d = Distribconf->new("/path/to/the/distribution/root");
- $d->load() and die "The dir does not seems to be a distribution tree";
+ $d->load() or die "This does not seem to be a distribution tree\n";
print $d->getpath(undef, "root") ."\n";
foreach ($d->listmedia) {
@@ -51,7 +51,7 @@ an F<hdlists> file based on this C<media.cfg>.
=head1 media.cfg
-The media.cfg is like an ini file. All parameters are optional, this means that
+The media.cfg is like a .ini file. All parameters are optional; this means that
a readable empty file is ok, if this is what you want :)
The media.cfg contains sections, each section corresponding to a media, except
@@ -420,6 +420,9 @@ Thanks to Sylvie Terjan <erinmargault@mandriva.org> for the spell checking.
=head1 ChangeLog
$Log$
+ Revision 1.11 2005/09/28 08:50:14 rgarciasuarez
+ Documentation nits. Fix some fatal error messages.
+
Revision 1.10 2005/09/06 19:46:16 othauvin
- s/mandrake/mandriva/
diff --git a/gendistrib b/gendistrib
index d8bf8ec..4189502 100755
--- a/gendistrib
+++ b/gendistrib
@@ -90,14 +90,14 @@ my @root = grep { $_ } ($rootdistrib, @ARGV);
my $distrib = Distribconf::Build->new($root[0]);
-$distrib->loadtree or die "$root[0] does not seems to be a distrib tree";
+$distrib->loadtree or die "$root[0] does not seem to be a distribution tree\n";
if (defined($urpmfiles{mediacfg})) {
- $distrib->parse_mediacfg($urpmfiles{mediacfg}) or die "Can't read $urpmfiles{mediacfg}";
+ $distrib->parse_mediacfg($urpmfiles{mediacfg}) or die "Can't read $urpmfiles{mediacfg}\n";
} elsif (defined($urpmfiles{hdlists})) {
- $distrib->parse_hdlists($urpmfiles{hdlists}) or die "Can't read $urpmfiles{hdlists}";
+ $distrib->parse_hdlists($urpmfiles{hdlists}) or die "Can't read $urpmfiles{hdlists}\n";
} else {
- $distrib->parse_mediacfg || $distrib->parse_hdlists or die "Can't read the dsitrib config";
+ $distrib->parse_mediacfg || $distrib->parse_hdlists or die "Can't read the dsitrib config\n";
}
my $destinfodir = $destdir ?
@@ -369,42 +369,41 @@ foreach (0..$#hdlists) {
clean_cache();
if (grep { ! $_->{noneedrebuild} } @hdlists) {
-
-print STDERR "building base files\n" unless $nooutput;
-$urpm->build_base_files(
- depslist => $urpmfiles{depslist},
- provides => $urpmfiles{provides},
- compss => $urpmfiles{compss},
-);
-#my $infodir = $distrib->getpath(undef, 'root') . '/' . $distrib->getpath(undef, 'infodir');
-if (-f $destinfodir . '/media.cfg') {
- if (! -f $destinfodir . '/hdlists' ||
- ((stat($distrib->getfullpath(undef, 'infodir') . '/media.cfg'))[9] >
- (stat($destinfodir . '/hdlists'))[9])) {
- print STDERR "Write hdlists file\n" unless $nooutput;
- $distrib->write_hdlists($destinfodir . '/hdlists')
- or print STDERR "Can't write $destinfodir/hdlists file\n";
+ print STDERR "building base files\n" unless $nooutput;
+ $urpm->build_base_files(
+ depslist => $urpmfiles{depslist},
+ provides => $urpmfiles{provides},
+ compss => $urpmfiles{compss},
+ );
+
+ if (-f $destinfodir . '/media.cfg') {
+ if (! -f $destinfodir . '/hdlists' ||
+ ((stat($distrib->getfullpath(undef, 'infodir') . '/media.cfg'))[9] >
+ (stat($destinfodir . '/hdlists'))[9])) {
+ print STDERR "Write hdlists file\n" unless $nooutput;
+ $distrib->write_hdlists($destinfodir . '/hdlists')
+ or print STDERR "Can't write $destinfodir/hdlists file\n";
+ }
}
-}
-#- safety cleaning
-unlink $urpmfiles{md5sum};
-unless ($nomd5sum) {
- my $here = getcwd();
- chdir $destinfodir;
- my $md5sum = `/usr/bin/md5sum hdlist* synthesis*`;
- if (open my $md5sumfh, '>', $urpmfiles{md5sum}) {
- print $md5sumfh $md5sum;
- close $md5sumfh;
- } else {
- print STDERR qq(Can't create "$urpmfiles{md5sum}": $!\n);
+ #- safety cleaning
+ unlink $urpmfiles{md5sum};
+ unless ($nomd5sum) {
+ my $here = getcwd();
+ chdir $destinfodir;
+ my $md5sum = `/usr/bin/md5sum hdlist* synthesis*`;
+ if (open my $md5sumfh, '>', $urpmfiles{md5sum}) {
+ print $md5sumfh $md5sum;
+ close $md5sumfh;
+ } else {
+ print STDERR qq(Can't create "$urpmfiles{md5sum}": $!\n);
+ }
+ chdir $here;
}
- chdir $here;
-}
-print STDERR "Building version file\n" unless $nooutput;
-$distrib->write_version($urpmfiles{version});
+ print STDERR "Building version file\n" unless $nooutput;
+ $distrib->write_version($urpmfiles{version});
}
#- check if there are NOTFOUND in dependencies, check if they are in other media, warn the user.