From 63000584b6442412dbcdf1dd867e09fbde404afe Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sun, 4 Feb 2007 08:26:52 +0000 Subject: Implemented a crappy version of -Qu (query upgrades). This simply outputs the packages to be upgraded in a -Su operation. Much of the code is duplicated from sync.c. TODO: move the implementation to upgrades.c, and reimplement the sync_sysupgrade function in terms of this: trans->packages = alpm_get_upgrades(); --- lib/libalpm/package.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/libalpm/package.c') diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 4c78fdaf..e93da71e 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -834,4 +834,15 @@ unsigned short SYMEXPORT alpm_pkg_has_scriptlet(pmpkg_t *pkg) return pkg->scriptlet; } +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); +} /* vim: set ts=2 sw=2 noet: */ -- cgit v1.2.3-54-g00ecf