diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-03-06 05:27:24 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-03-06 05:27:24 +0000 |
commit | dc11e8acceef06ea80b2b312a1ba45a3773616b7 (patch) | |
tree | 9c36fe45224a10a1ef6faf20038f9b8c7d0674b0 | |
parent | 1fd571fe46baa6bbd3b371b3e00ae53d8bdfb9ca (diff) | |
download | perl-URPM-dc11e8acceef06ea80b2b312a1ba45a3773616b7.tar perl-URPM-dc11e8acceef06ea80b2b312a1ba45a3773616b7.tar.gz perl-URPM-dc11e8acceef06ea80b2b312a1ba45a3773616b7.tar.bz2 perl-URPM-dc11e8acceef06ea80b2b312a1ba45a3773616b7.tar.xz perl-URPM-dc11e8acceef06ea80b2b312a1ba45a3773616b7.zip |
strip away distepoch in return_list_str()
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | URPM.xs | 21 |
2 files changed, 20 insertions, 3 deletions
@@ -1,4 +1,4 @@ -Version 3.37.2 - 2011, by Per Øyvind Karlsen +Version 3.37.2 - 6 March 2011, by Per Øyvind Karlsen - fix incorrect arch returned for packages without any (ie. public keys) - eliminate disttag & distepoch when extracting name, version, release to @@ -478,11 +478,28 @@ return_list_str(char *s, Header header, int32_t tag_name, int32_t tag_flags, int if (tag_flags && tag_version) { while(ps != NULL) { ++count; - if (f(s, ps-s, NULL, 0, NULL, param)) return -count; + char *tmp, *ps2 = NULL; + if((tmp = strchr(s, '[')) && + (tmp = strchr(tmp, '-')) && + (tmp = strchr(tmp, ':')) && + tmp < ps) { + backup_char(tmp); + *tmp = ']'; + ps2 = ++tmp; + } + if (f(s, ps2 ? ps2-s : ps-s, NULL, 0, NULL, param)) { restore_chars(); return -count; } + restore_chars(); s = ps + 1; ps = strchr(s, '@'); } ++count; - if (f(s, 0, NULL, 0, NULL, param)) return -count; + if((ps = strchr(s, '[')) && + (ps = strchr(ps, '-')) && + (ps = strchr(ps, ':'))) { + backup_char(ps); + *ps++ = ']'; + } + if (f(s, ps ? ps-s : 0, NULL, 0, NULL, param)) { restore_chars(); return -count; } + restore_chars(); } else { char *eos; while(ps != NULL) { |