From 9901a04f47df99198cf6aa62a553ac7a5eb579d3 Mon Sep 17 00:00:00 2001 From: Rene Wagner Date: Sat, 14 Oct 2006 16:53:38 +0200 Subject: familiar: bump DISTRO_VERSION to v0.8.4.1-pre Signed-off-by: Rene Wagner --- .../conf/distro/familiar-0.8.4.conf | 2 +- .../packages/familiar/familiar-version.bb | 41 ++++++++++++---------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/org.handhelds.familiar/conf/distro/familiar-0.8.4.conf b/org.handhelds.familiar/conf/distro/familiar-0.8.4.conf index 39375c8..ee478d1 100644 --- a/org.handhelds.familiar/conf/distro/familiar-0.8.4.conf +++ b/org.handhelds.familiar/conf/distro/familiar-0.8.4.conf @@ -1,6 +1,6 @@ DISTRO = "familiar" DISTRO_NAME = "Familiar Linux" -DISTRO_VERSION = "v0.8.4" +DISTRO_VERSION = "v0.8.4.1-pre" include conf/distro/familiar.conf include conf/distro/familiar-feeds.inc diff --git a/org.handhelds.familiar/packages/familiar/familiar-version.bb b/org.handhelds.familiar/packages/familiar/familiar-version.bb index 8ad61cb..ba1c73a 100644 --- a/org.handhelds.familiar/packages/familiar/familiar-version.bb +++ b/org.handhelds.familiar/packages/familiar/familiar-version.bb @@ -3,28 +3,33 @@ PACKAGE_ARCH = "all" def get_sanitized_version(s): max_version_component = "99" - rc_separator = "-rc" + pre_separators = ["-rc", "-pre"] - if not rc_separator in s: - return s + ver = s - version = s.split(rc_separator)[0][1:] - vcomps = version.split(".") - vcomps.reverse() - - vcomps_new = [] - done = False - for i in vcomps: - if done: - vcomps_new.insert(0, i) - continue - if int(i) < 1: - vcomps_new.insert(0, max_version_component) + for sep in pre_separators: + if not sep in s: continue - vcomps_new.insert(0, "%i" % (int(i) - 1)) - done = True - return "v" + ".".join(vcomps_new) + "+" + s.replace("-", "") + version = s.split(sep)[0][1:] + vcomps = version.split(".") + vcomps.reverse() + + vcomps_new = [] + done = False + for i in vcomps: + if done: + vcomps_new.insert(0, i) + continue + if int(i) < 1: + vcomps_new.insert(0, max_version_component) + continue + vcomps_new.insert(0, "%i" % (int(i) - 1)) + done = True + + ver = "v" + ".".join(vcomps_new) + "+" + s.replace("-", "") + + return ver PV = "${@get_sanitized_version(bb.data.getVar('DISTRO_VERSION', d, 1))}" -- cgit v1.2.3-18-g5258