diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-09-25 06:23:20 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-09-25 06:23:20 +0000 |
commit | 4034fc48132cf815bf72135e55d4186d5b842acf (patch) | |
tree | 37c42889a3194703d181a4d16e074d49c9ddfd89 /lib/Iurt | |
parent | 98db2579c1be08c1c32f8879e439de8bd54c6af5 (diff) | |
download | iurt-4034fc48132cf815bf72135e55d4186d5b842acf.tar iurt-4034fc48132cf815bf72135e55d4186d5b842acf.tar.gz iurt-4034fc48132cf815bf72135e55d4186d5b842acf.tar.bz2 iurt-4034fc48132cf815bf72135e55d4186d5b842acf.tar.xz iurt-4034fc48132cf815bf72135e55d4186d5b842acf.zip |
use rpmbuild/ rather than rpm/ like modern guidelines
(need invalidating chroots)
Diffstat (limited to 'lib/Iurt')
-rw-r--r-- | lib/Iurt/Chroot.pm | 6 | ||||
-rw-r--r-- | lib/Iurt/DKMS.pm | 2 | ||||
-rw-r--r-- | lib/Iurt/Urpmi.pm | 16 |
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 1e19860..3995d21 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -151,8 +151,8 @@ sub dump_rpmmacros { } my $packager = $run->{packager} || $config->{packager}; - print $f qq(\%_topdir \%(echo \$HOME)/rpm -\%_tmppath \%(echo \$HOME)/rpm/tmp/ + print $f qq(\%_topdir \%(echo \$HOME)/rpmbuild +\%_tmppath \%(echo \$HOME)/rpmbuild/tmp/ \%distribution $config->{distribution} \%vendor $config->{vendor} \%packager $packager @@ -451,7 +451,7 @@ sub build_chroot { sudo($config, "--cp", "$tmp_chroot/tmp/qa", "$tmp_chroot/var/log/qa"); unlink("$tmp_chroot/tmp/qa"); - sudo($config, "--mkdir", "$tmp_chroot/etc/skel/rpm/$_") + sudo($config, "--mkdir", "$tmp_chroot/etc/skel/rpmbuild/$_") foreach "", qw(RPMS BUILD SPECS SRPMS SOURCES tmp); # diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm index 8fd8f57..d16fd55 100644 --- a/lib/Iurt/DKMS.pm +++ b/lib/Iurt/DKMS.pm @@ -275,7 +275,7 @@ sub dkms_compile { -d "$dkms_spool/$media" or mkdir_p "$dkms_spool/$media"; - my @dkms_rpm_dirs = ("/home/$luser/rpm/RPMS/*", "/usr/src/rpm/RPMS/*", "/var/lib/dkms/$realname/$realversion/rpm"); + my @dkms_rpm_dirs = ("/home/$luser/rpmbuild/RPMS/*", "/usr/src/rpm/RPMS/*", "/var/lib/dkms/$realname/$realversion/rpm"); my $copied; foreach (@dkms_rpm_dirs) { my $rpms = "$chroot_tmp$_/*.rpm"; diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 00a7e1a..96c9d96 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -64,8 +64,8 @@ sub add_to_local_media { my ($self, $chroot_tmp, $srpm, $luser) = @_; my $local_media = $self->{local_media}; - system("cp $chroot_tmp/home/$luser/rpm/RPMS/*/*.rpm $local_media &>/dev/null") and plog("ERROR: could not copy rpm files from $chroot_tmp/home/$luser/rpm/RPMS/ to $local_media ($!)"); - system("cp $chroot_tmp/home/$luser/rpm/SRPMS/$srpm $local_media &>/dev/null") and plog("ERROR: could not copy $srpm from $chroot_tmp/home/$luser/rpm/SRPMS/ to $local_media ($!)"); + system("cp $chroot_tmp/home/$luser/rpmbuild/RPMS/*/*.rpm $local_media &>/dev/null") and plog("ERROR: could not copy rpm files from $chroot_tmp/home/$luser/rpmbuild/RPMS/ to $local_media ($!)"); + system("cp $chroot_tmp/home/$luser/rpmbuild/SRPMS/$srpm $local_media &>/dev/null") and plog("ERROR: could not copy $srpm from $chroot_tmp/home/$luser/rpmbuild/SRPMS/ to $local_media ($!)"); } sub urpmi_command { @@ -610,7 +610,7 @@ sub recreate_srpm { perform_command([ sub { my ($s, $d) = @_; - sudo($config, '--cp', $s, $d) } , [ "$dir/$srpm", "$chroot_tmp/home/$luser/rpm/SRPMS/" ] ], + sudo($config, '--cp', $s, $d) } , [ "$dir/$srpm", "$chroot_tmp/home/$luser/rpmbuild/SRPMS/" ] ], $run, $config, $cache, type => 'perl', mail => $config->{admin}, @@ -638,7 +638,7 @@ sub recreate_srpm { 1; }); plog('DEBUG', "recreating src.rpm..."); - if (!perform_command(qq(chroot $chroot_tmp su $luser -c "rpm -i /home/$luser/rpm/SRPMS/$srpm"), + if (!perform_command(qq(chroot $chroot_tmp su $luser -c "rpm -i /home/$luser/rpmbuild/SRPMS/$srpm"), $run, $config, $cache, %opt)) { plog("ERROR: chrooting failed (retry $opt{retry}") if $run->{debug}; if ($opt{retry}) { @@ -648,7 +648,7 @@ sub recreate_srpm { } my $spec; - my $oldsrpm = "$chroot_tmp/home/$luser/rpm/SRPMS/$srpm"; + my $oldsrpm = "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$srpm"; my $filelist = `rpm -qlp $oldsrpm`; my ($name) = $srpm =~ /(?:.*:)?(.*)-[^-]+-[^-]+\.src\.rpm$/; foreach my $file (split "\n", $filelist) { @@ -662,7 +662,7 @@ sub recreate_srpm { } # 20060515 This should not be necessairy any more if urpmi *.spec works, but it doesn't # - my $ret = perform_command(qq(chroot $chroot_tmp su $luser -c "rpmbuild --nodeps -bs $with_flags /home/$luser/rpm/SPECS/$spec"), + my $ret = perform_command(qq(chroot $chroot_tmp su $luser -c "rpmbuild --nodeps -bs $with_flags /home/$luser/rpmbuild/SPECS/$spec"), $run, $config, $cache, use_iurt_root_command => 1, mail => $config->{admin}, @@ -679,12 +679,12 @@ sub recreate_srpm { # we can not rely on build time (one of the src.rpm may have been built on a machine with wrong time) # let's say that if we have several one, we want the non original one my $file = $oldsrpm; - foreach my $f (glob "$chroot_tmp/home/$luser/rpm/SRPMS/$name-*.src.rpm") { + foreach my $f (glob "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$name-*.src.rpm") { $file = $f if $f ne $oldsrpm; } my ($new_srpm) = basename($file); my $prefix = get_package_prefix($srpm); - my $newfile = "$chroot_tmp/home/$luser/rpm/SRPMS/$prefix$new_srpm"; + my $newfile = "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$prefix$new_srpm"; if (-f $file && $newfile ne $file) { if (-f $newfile) { sudo($config, '--rm', $newfile) or die "$program_name: could not delete $newfile ($!)"; |