Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=fd826117e42ba37cc2ce9f49669800a6fe5b6af2

commit fd826117e42ba37cc2ce9f49669800a6fe5b6af2
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date:   Sun Oct 28 01:41:52 2007 +0200

pacman_trans_release() write last update of the db to the .lastupdate file
this is useful to determine if our cache is outdated or not

diff --git a/lib/libpacman/pacman.c b/lib/libpacman/pacman.c
index ed66da1..7bff3de 100644
--- a/lib/libpacman/pacman.c
+++ b/lib/libpacman/pacman.c
@@ -894,6 +894,11 @@ int pacman_trans_release()

FREETRANS(handle->trans);

+       char lastupdate[15] = "";
+       time_t t = time(NULL);
+       strftime(lastupdate, 15, "%Y%m%d%H%M%S", localtime(&t));
+       _pacman_db_setlastupdate(handle->db_local, lastupdate);
+
/* unlock db */
if(handle->lckfd != -1) {
close(handle->lckfd);
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to