[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#517650: lintian: changes made to collection scripts are not reflected unless a package changes



Raphael Geissert <atomo64@gmail.com> writes:

>  	    # info already available?
> -	    next if (-e "$base/$ci->{'output'}");
> +	    next if (-l "$base/.${coll}$ci->{'version'}");
> +	    system('sh', '-c', 'rm -f '."'$base'/.${coll}*");

Ew.  We can do this in native Perl in just a few lines of code without
forking a shell.

>  	    # unpack to desired unpack level (if necessary)
>  	    $act_unpack_level = unpack_pkg($type,$base,$file,$act_unpack_level,$ci->{'unpack-level'});
> @@ -1467,6 +1468,7 @@ foreach my $pkg_info ($schedule->get_all) {
>  		$exit_code = 2;
>  		next PACKAGE;
>  	    }
> +	    symlink $$, ".${coll}$ci->{'version'}";
>  	}

There wasn't enough context here for patch to figure out where to put
this, and it ended up putting it in a bizarre and unuseful place in the
file.  Also, with the backgrounding, this is now more complicated; we need
to create these markers only after the collect scripts have successfully
completed.

I'm committing now with some changes along those lines.  I'm also creating
real files rather than symlinks to PIDs so that we can stick a bit more
information in the files.  It's slightly slower (three syscalls instead of
one), but it means that we can put the generation timestamp and the
Lintian version into the file, which may be useful.

I also took the liberty of adding a dash between the collection script
name and the version; I think it's a bit clearer.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: