[24405] in Source-Commits
/svn/athena r24000 - in trunk/debathena/debathena: . command-not-found command-not-found/debian
daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Wed Sep 9 16:59:50 2009
Date: Wed, 9 Sep 2009 16:59:37 -0400
From: Geoffrey Thomas <geofft@MIT.EDU>
Message-Id: <200909092059.n89KxbXm025607@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: geofft
Date: 2009-09-09 16:59:37 -0400 (Wed, 09 Sep 2009)
New Revision: 24000
Added:
trunk/debathena/debathena/command-not-found/
trunk/debathena/debathena/command-not-found/debian/
trunk/debathena/debathena/command-not-found/debian/10-command-not-found
trunk/debathena/debathena/command-not-found/debian/changelog
trunk/debathena/debathena/command-not-found/debian/compat
trunk/debathena/debathena/command-not-found/debian/control.in
trunk/debathena/debathena/command-not-found/debian/copyright
trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.cron.daily
trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.dirs
trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.install
trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.postinst
trunk/debathena/debathena/command-not-found/debian/rules
trunk/debathena/debathena/command-not-found/debian/whichlocker
Log:
Add the debathena-command-not-found package.
Patch from Jessica Hamrick <jhamrick@mit.edu>.
Added: trunk/debathena/debathena/command-not-found/debian/10-command-not-found
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/10-command-not-found 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/10-command-not-found 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,39 @@
+# This is the Debathena handle for command-not-found. It uses
+# the functionality of both command-not-found and whichlocker.
+
+function command_not_found_handle {
+ INLOCKER=""
+ if [ -x /usr/lib/whichlocker ]; then
+ INLOCKER=`/usr/lib/whichlocker "$1"`
+ if [ ! -z "$INLOCKER" ]; then
+ echo "Found in the following Athena lockers: "
+ echo "$INLOCKER"
+ echo "Run \`add <lockername>; $1\` (without the quotes)"
+ fi
+ fi
+
+ CANSUDO=""
+ if [ "$UID" == 0 ]; then
+ CANSUDO="true"
+ else
+ ISADMIN=`groups | grep -o "\badmin\b"`
+ if [ ! -z "$ISADMIN" ]; then
+ CANSUDO="true"
+ fi
+ fi
+
+ if [ ! -z "$CANSUDO" ]; then
+ if [ -x /usr/lib/command-not-found ]; then
+ INAPT=$(/usr/bin/python /usr/lib/command-not-found -- "$1" 2>&1)
+ if [ ! -z "$INLOCKER" ]; then
+ if [ ! -z "$INAPT" ]; then
+ echo ""
+ echo "In apt:"
+ fi
+ fi
+ echo "$INAPT"
+ fi
+ fi
+
+ return 127
+}
Added: trunk/debathena/debathena/command-not-found/debian/changelog
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/changelog 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/changelog 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,5 @@
+debathena-command-not-found (1.0) unstable; urgency=low
+
+ * Initial release.
+
+ -- Jessica Hamrick <jhamrick@mit.edu> Wed, 09 Sep 2009 16:51:38 -0400
Added: trunk/debathena/debathena/command-not-found/debian/compat
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/compat 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/compat 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1 @@
+5
Added: trunk/debathena/debathena/command-not-found/debian/control.in
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/control.in 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/control.in 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,14 @@
+Source: debathena-command-not-found
+Section: debathena/admin
+Priority: extra
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: @cdbs@
+Standards-Version: 3.8.3
+
+Package: debathena-command-not-found
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, python, debathena-bash-config, debathena-ssl-certificates, curl
+Description: Overrides command-not-found to use whichlocker
+ The functionality of whichlocker is added to the
+ command-not-found handle, such that it will print
+ the locker the command is found in (if applicable).
Added: trunk/debathena/debathena/command-not-found/debian/copyright
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/copyright 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/copyright 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,18 @@
+The Athena source code was obtained from the Athena SVN repository at
+<svn://debathena.mit.edu/athena/trunk>, and is licensed as follows:
+
+ Copyright © 2009 by Jessica Hamrick.
+
+ Permission to use, copy, modify, and distribute this software and
+ its documentation for any purpose and without fee is hereby granted,
+ provided that the above copyright notice appear in all copies and
+ that both that copyright notice and this permission notice appear in
+ supporting documentation, and that the name of M.I.T. not be used in
+ advertising or publicity pertaining to distribution of the software
+ without specific, written prior permission. M.I.T. makes no
+ representations about the suitability of this software for any
+ purpose. It is provided "as is" without express or implied
+ warranty.
+
+The Debian packaging is Copyright © 2009 Jessica Hamrick, and has the
+same license as the original software.
Added: trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.cron.daily
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.cron.daily 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.cron.daily 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+[ -x /usr/lib/whichlocker ] && /usr/bin/curl --connect-timeout 5 https://debathena.mit.edu/auto/whichlocker-database -o /usr/share/debathena-command-not-found/program-list
Added: trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.dirs
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.dirs 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.dirs 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,3 @@
+usr/share/debathena-command-not-found/
+usr/share/debathena-bash-config/bashrc.d/
+usr/lib/
Added: trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.install
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.install 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.install 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,2 @@
+debian/10-command-not-found /usr/share/debathena-bash-config/bashrc.d/
+debian/whichlocker /usr/lib/
Added: trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.postinst
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.postinst 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/debathena-command-not-found.postinst 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,40 @@
+#!/bin/sh
+# postinst script for debathena-command-not-found
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ /etc/cron.daily/debathena-command-not-found
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: trunk/debathena/debathena/command-not-found/debian/rules
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/rules 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/rules 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
Property changes on: trunk/debathena/debathena/command-not-found/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/debathena/debathena/command-not-found/debian/whichlocker
===================================================================
--- trunk/debathena/debathena/command-not-found/debian/whichlocker 2009-09-08 21:43:45 UTC (rev 23999)
+++ trunk/debathena/debathena/command-not-found/debian/whichlocker 2009-09-09 20:59:37 UTC (rev 24000)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+while read program locker; do
+ if [ "$program" = "$1" ]; then
+ echo "'$program' is in the '$locker' locker"
+ fi
+done < /usr/share/debathena-command-not-found/program-list
Property changes on: trunk/debathena/debathena/command-not-found/debian/whichlocker
___________________________________________________________________
Name: svn:executable
+ *