Author: dmacvicar Date: Mon Sep 22 14:24:29 2008 New Revision: 11120 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11120&view=rev Log: save the timestamp only once Modified: trunk/sat-solver/tools/repo_repomdxml.c Modified: trunk/sat-solver/tools/repo_repomdxml.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_repomdxml.c?rev=11120&r1=11119&r2=11120&view=diff ============================================================================== --- trunk/sat-solver/tools/repo_repomdxml.c (original) +++ trunk/sat-solver/tools/repo_repomdxml.c Mon Sep 22 14:24:29 2008 @@ -293,28 +293,32 @@ switch (pd->state) { case STATE_START: break; - case STATE_REPOMD: break; + case STATE_REPOMD: + /* save the timestamp in the non solvable number 1 */ + if ( pd->timestamp > 0 ) + repo_set_num(pd->repo, -1, REPOSITORY_TIMESTAMP, pd->timestamp); + break; case STATE_DATA: break; case STATE_LOCATION: break; case STATE_CHECKSUM: break; case STATE_OPENCHECKSUM: break; case STATE_TIMESTAMP: - /** - * we want to look for the newer timestamp - * of all resources to save it as the time - * the metadata was generated - */ - timestamp = atoi(pd->content); - /** if the timestamp is invalid or just 0 ignore it */ - if ( timestamp == 0 ) + { + /** + * we want to look for the newer timestamp + * of all resources to save it as the time + * the metadata was generated + */ + timestamp = atoi(pd->content); + /** if the timestamp is invalid or just 0 ignore it */ + if ( timestamp == 0 ) + break; + if ( timestamp > pd->timestamp ) + { + pd->timestamp = timestamp; + } break; - if ( timestamp > pd->timestamp ) - { - pd->timestamp = timestamp; - /* save the timestamp in the non solvable number 1 */ - repo_set_num(pd->repo, -1, REPOSITORY_TIMESTAMP, pd->timestamp); - } - break; + } case STATE_EXPIRE: { int expire = 0; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org