diff options
author | Florent Villard <warly@mandriva.com> | 2006-01-06 22:38:58 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2006-01-06 22:38:58 +0000 |
commit | 215e6c5df5b6fc7aabcfdfb6d2f04d634fbf07fc (patch) | |
tree | 1b718178b179f78babdeaa407eac650e2297dffa /iurt2 | |
parent | f6182b666e3d3ca208b603fcc5bee4d31a36e83d (diff) | |
download | iurt-215e6c5df5b6fc7aabcfdfb6d2f04d634fbf07fc.tar iurt-215e6c5df5b6fc7aabcfdfb6d2f04d634fbf07fc.tar.gz iurt-215e6c5df5b6fc7aabcfdfb6d2f04d634fbf07fc.tar.bz2 iurt-215e6c5df5b6fc7aabcfdfb6d2f04d634fbf07fc.tar.xz iurt-215e6c5df5b6fc7aabcfdfb6d2f04d634fbf07fc.zip |
Remove more old unionfs remaining mount
Diffstat (limited to 'iurt2')
-rwxr-xr-x | iurt2 | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -310,7 +310,7 @@ foreach (my $i ; $i < @todo; $i++) { print "iurt: packages $srpm [$done/$to_compile]\n"; if ($unionfs) { my $tmpfs; - $union_id = clean_unionfs($unionfs_dir, $union_id); + $union_id = clean_unionfs($unionfs_dir, $run, $union_id); $tmpfs = "$unionfs_dir/tmpfs.$run.$union_id"; $chroot = "$unionfs_dir/unionfs.$run.$union_id"; mkdir $tmpfs or die "Could not create $tmpfs ($!)"; @@ -418,12 +418,12 @@ foreach (my $i ; $i < @todo; $i++) { end: } -print "iurt: reprocess generated packages queue\n"; +print STDERR "iurt: reprocess generated packages queue\n"; process_queue(); dump_cache(); -print "ERROR iurt: RPM with a wrong SRPM name\n" if @wrong_rpm; +print STDERR "ERROR iurt: RPM with a wrong SRPM name\n" if @wrong_rpm; if (open my $file, ">$local_spool/log/wrong_srpm_names.log") { foreach (@wrong_rpm) { print $file "$_->[1] -> $_->[0] (", $cache->{rpm_srpm}{$_->[1]},")\n"; @@ -437,9 +437,13 @@ if ($config->{rsync_to}) { # one last try to clean print STDERR "iurt: try to clean remaining unionfs\n"; if ($unionfs) { - for (my $i = 1; $i <= $union_id; $i++) { - clean_unionfs($unionfs_dir, $union_id); + print STDERR "Cleaning old unionfs remaining dir\n"; + opendir my $dir, $unionfs_dir; + while (readdir $dir) { + /unionfs\.(\d+)\.(\d+)/ or next; + clean_unionfs($unionfs_dir, $1, $2); } + closedir $dir } unlink $pidfile; @@ -505,7 +509,7 @@ sub clean_urpmi { } sub clean_unionfs { - my ($unionfs_dir, $union_id) = @_; + my ($unionfs_dir, $run, $union_id) = @_; foreach my $t ("unionfs",'tmpfs') { # unfortunately quite oftem the unionfs is busy and could not be unmounted my $d = "$unionfs_dir/$t.$run.$union_id"; |