From 0b8683c68fd46e5c6fb67a86969ba5fdde92bc70 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Fri, 5 Feb 2010 00:57:34 -0800 Subject: [PATCH] * debian/rules, usr/bin/byobu, usr/bin/byobu-launcher: - deprecate the launcher script as a separate script; do this in /usr/bin/byobu * debian/control, debian/po/POTFILES.in, debian/po/templates.pot, debian/templates, usr/bin/byobu-config: - make the new debconf question translatable --- debian/changelog | 8 ++++++-- debian/control | 2 +- debian/po/POTFILES.in | 1 + debian/po/templates.pot | 41 +++++++++++++++++++++++++++++++++++++++++ debian/templates | 6 +++--- usr/bin/byobu-config | 12 +++++++++++- 6 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/templates.pot diff --git a/debian/changelog b/debian/changelog index ebb8a049..e606e2fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,13 +1,17 @@ byobu (2.52) unreleased; urgency=low - * debian/rules, usr/bin/byobu, usr/bin/byobu-launcher: deprecate the - launcher script as a separate script; do this in /usr/bin/byobu + * debian/rules, usr/bin/byobu, usr/bin/byobu-launcher: + - deprecate the launcher script as a separate script; do this + in /usr/bin/byobu * debian/config, debian/postinst, debian/prerm, debian/rules, debian/templates, usr/bin/byobu, usr/bin/byobu-launcher, usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall: - support a preseedable debconf question that allows an administrator to launch byobu by default on all logins on a system (default = false), allow for per-user overriding + * debian/control, debian/po/POTFILES.in, debian/po/templates.pot, + debian/templates, usr/bin/byobu-config: + - make the new debconf question translatable -- Dustin Kirkland Wed, 03 Feb 2010 10:56:23 -0800 diff --git a/debian/control b/debian/control index b6f53e71..7dedcb3b 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Vcs-Bzr: http://bazaar.launchpad.net/~kirkland/byobu/trunk Package: byobu Architecture: all -Depends: ${misc:Depends}, debconf (>= 0.5) | debconf-2.0, screen, gettext-base, python, python-newt (>= 0.52.2-11) +Depends: ${misc:Depends}, debconf (>= 0.5) | debconf-2.0, screen, gettext-base, python, python-newt (>= 0.52.2-11), po-debconf Recommends: update-notifier-common, lsb-release Suggests: apport, vim, w3m Provides: screen-profiles, screen-profiles-extras, byobu-extras diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 00000000..cef83a34 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 00000000..836f2693 --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,41 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: byobu@packages.debian.org\n" +"POT-Creation-Date: 2010-02-05 00:55-0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../templates:1001 +msgid "Do you want to launch Byobu at shell login for all users?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:1001 +msgid "" +"Byobu can launch automatically at login (e.g. console, ssh), providing an " +"attachable/detachable window manager on the command line." +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:1001 +msgid "" +"If you select this option, Byobu will install a symlink in /etc/profile.d. " +"This setting is system-wide, for all users logging into the system. " +"Individual users can disable this by touching ~/.byobu/disable-autolaunch, " +"or configuring with 'byobu-config'." +msgstr "" diff --git a/debian/templates b/debian/templates index 347ae148..27109a1b 100644 --- a/debian/templates +++ b/debian/templates @@ -1,11 +1,11 @@ Template: byobu/launch-by-default Type: boolean Default: false -Description: Do you want to launch Byobu at shell login for all users? +_Description: Do you want to launch Byobu at shell login for all users? Byobu can launch automatically at login (e.g. console, ssh), providing an attachable/detachable window manager on the command line. . If you select this option, Byobu will install a symlink in /etc/profile.d. This setting is system-wide, for all users logging into the system. - . - Individual users can disable this by touching ~/.byobu/disable-autolaunch. + Individual users can disable this by touching ~/.byobu/disable-autolaunch, + or configuring with 'byobu-config'. diff --git a/usr/bin/byobu-config b/usr/bin/byobu-config index 8e7314ee..0ac2bdbc 100755 --- a/usr/bin/byobu-config +++ b/usr/bin/byobu-config @@ -496,6 +496,16 @@ def chgesc(screen, size): return 0 return 100 +def autolaunch(): + if os.path.exists("%s/.%s/disable-autolaunch" % (HOME, PKG)): + return 0 + if commands.getoutput('grep -qs byobu-launcher %s/.profile' % HOME): + return 1 + if os.path.exists("/etc/profile.d/%s.sh" % PKG): + return 1 + return 0 + + def main(): """This is the main loop of our utility """ @@ -507,7 +517,7 @@ def main(): config = SafeConfigParser() - isInstalled = (commands.getoutput('grep byobu-launcher '+(HOME+'/.profile')) != "") + isInstalled = autolaunch() tag = 100