aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-08 14:05:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-08 14:05:55 +0000
commit7aa9cdca12ef254aef94abcf1de1fd78137599b7 (patch)
tree03895d47ed8d8b0645b7559c10521244739ce304
parentfa19315a622877df698de8c13572739230353ef6 (diff)
downloadrpmtools-7aa9cdca12ef254aef94abcf1de1fd78137599b7.tar
rpmtools-7aa9cdca12ef254aef94abcf1de1fd78137599b7.tar.gz
rpmtools-7aa9cdca12ef254aef94abcf1de1fd78137599b7.tar.bz2
rpmtools-7aa9cdca12ef254aef94abcf1de1fd78137599b7.tar.xz
rpmtools-7aa9cdca12ef254aef94abcf1de1fd78137599b7.zip
add --media_info-dir option (same as --subdir option in genhdlist)
-rw-r--r--genhdlist28
1 files changed, 7 insertions, 1 deletions
diff --git a/genhdlist2 b/genhdlist2
index 00d07b8..b373ab7 100644
--- a/genhdlist2
+++ b/genhdlist2
@@ -25,6 +25,7 @@ sub main() {
'nolock' => \$options{nolock},
'allow-empty-media' => \$options{allow_empty_media},
'file-deps=s' => \$options{file_deps},
+ 'media_info-dir=s' => \$options{media_info_dir},
'h|help' => sub { usage(); exit 0 },
'q|quiet' => sub { $options{verbose} = -1 },
'v|verbose' => sub { $options{verbose}++ },
@@ -50,7 +51,7 @@ sub do_it {
my @rpms = grep { /\.rpm$/ } all($rpms_dir);
@rpms || $options{allow_empty_media} or die "no *.rpm found in $rpms_dir (use --allow-empty-media?)\n";
- my $media_info_dir = "$rpms_dir/media_info";
+ my $media_info_dir = $options{media_info_dir} || "$rpms_dir/media_info";
-e $media_info_dir || mkdir $media_info_dir or die "Can't mkdir $media_info_dir: $!n";
-d $media_info_dir && -w _ && -x _ or die "$media_info_dir isn't a writable directory, bailing out\n";
@@ -407,6 +408,11 @@ is a dangerous option.
By default if no *.rpm files are found, F<genhdlist2> will exit on error.
To allow building empty media, use this option.
+=item --media_info-dir directory
+
+Write hdlist/synthesis in this directory instead of <dir>/media_info
+(mostly useful for debugging)
+
=item B<-v>
Be verbose. Use one more B<-v> to get even more verbose.