From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E532E1382C5 for ; Sun, 25 Mar 2018 14:00:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D9FA6E0874; Sun, 25 Mar 2018 14:00:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B3501E0874 for ; Sun, 25 Mar 2018 14:00:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 66257335C51 for ; Sun, 25 Mar 2018 14:00:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E751925B for ; Sun, 25 Mar 2018 14:00:20 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1521984512.c9b624a2a93d75654269e9ad39a8c09450cd2fb1.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: libq/ X-VCS-Repository: proj/portage-utils X-VCS-Files: libq/atom_explode.c X-VCS-Directories: libq/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: c9b624a2a93d75654269e9ad39a8c09450cd2fb1 X-VCS-Branch: master Date: Sun, 25 Mar 2018 14:00:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e9652e2c-05e3-4954-854a-d95719af4151 X-Archives-Hash: f27d30be69c8a0626ef2f6313f08b1ec commit: c9b624a2a93d75654269e9ad39a8c09450cd2fb1 Author: Fabian Groffen gentoo org> AuthorDate: Sun Mar 25 13:28:32 2018 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Mar 25 13:28:32 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=c9b624a2 atom_explode: support inversed ranges, e.g. !>P-x.y For bug #608960 we need to be able to handle odd atoms like !pfx_op = ATOM_OP_BLOCK_HARD; - } else + break; + case '>': + ++atom; + if (atom[0] == '=') { + ++atom; + ret->pfx_op = ATOM_OP_OLDER; + } else + ret->pfx_op = ATOM_OP_OLDER_EQUAL; + break; + case '<': + ++atom; + if (atom[0] == '=') { + ++atom; + ret->pfx_op = ATOM_OP_NEWER_EQUAL; + } else + ret->pfx_op = ATOM_OP_NEWER; + break; + default: ret->pfx_op = ATOM_OP_BLOCK; + break; + } break; } strcpy(ret->CATEGORY, atom);