[pacman-dev] Some undocumented things

Xavier shiningxc at gmail.com
Tue Jan 8 14:48:04 EST 2008


Nathan Jones wrote:

> Looks like it doesn't work :) The problem seems to be that pkg->date is
> never set anywhere (this is actually the only function that references
> it). I think changing it to pkg->builddate will work.
>
> int _alpm_pkg_istoonew(pmpkg_t *pkg)
> {
> 	time_t t;
>
> 	ALPM_LOG_FUNC;
>
> 	if (!handle->upgradedelay)
> 		return 0;
> 	time(&t);
> 	return((pkg->date + handle->upgradedelay)>  t);
> }
>

That's a funny feature indeed. People who always complain about 
stability could get upgrades always a few days later so that other 
people test them first :)

Indeed, pkg->date isn't set and used anywhere. It could probably be removed.
builddate is set, but it isn't in the sync db, so it wouldn't work 
either. But the only way for this feature to work would be to add the 
builddate to the db, right?

Hmm, now that I'm thinking about it, I'm not sure build date is the 
correct value. Shouldn't it rather be the date when the package is moved 
to the stable repos rather? (I'm thinking about packages that stay a 
period in testing first, and never the same delay).
But more generally, just the date when the package is added to the repo 
would do.




More information about the pacman-dev mailing list