From 20187005d4423ff67b31581ba4ac61574006171f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 23 Jan 2015 05:51:13 +0100 Subject: [PATCH] gluon-legacy: convert the remaining legacy infrastructure to a simple invariant script --- .../files/lib/gluon/legacy/legacy-upgrade | 13 ------------- .../files/lib/gluon/legacy/legacy-upgrade-late | 8 -------- .../gluon/upgrade/core/invariant/990-legacy-late | 11 +++++++++++ 3 files changed, 11 insertions(+), 21 deletions(-) delete mode 100755 package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade delete mode 100755 package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade-late create mode 100755 package/gluon-legacy/files/lib/gluon/upgrade/core/invariant/990-legacy-late diff --git a/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade b/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade deleted file mode 100755 index 27517604..00000000 --- a/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/lua - -local site = require 'gluon.site_config' - -local ret = 1 - -for _, file in ipairs(site.legacy.version_files) do - if os.remove(file) then - ret = 0 - end -end - -os.exit(ret) diff --git a/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade-late b/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade-late deleted file mode 100755 index 1e79d821..00000000 --- a/package/gluon-legacy/files/lib/gluon/legacy/legacy-upgrade-late +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/lua - -local site = require 'gluon.site_config' - - -for _, file in ipairs(site.legacy.old_files) do - os.remove(file) -end diff --git a/package/gluon-legacy/files/lib/gluon/upgrade/core/invariant/990-legacy-late b/package/gluon-legacy/files/lib/gluon/upgrade/core/invariant/990-legacy-late new file mode 100755 index 00000000..efb6b675 --- /dev/null +++ b/package/gluon-legacy/files/lib/gluon/upgrade/core/invariant/990-legacy-late @@ -0,0 +1,11 @@ +#!/usr/bin/lua + +local site = require 'gluon.site_config' +local sysconfig = require 'gluon.sysconfig' + + +if sysconfig.gluon_version == 'legacy' then + for _, file in ipairs(site.legacy.old_files) do + os.remove(file) + end +end