← Back to team overview

mythbuntu-dev team mailing list archive

[Merge] lp:~kirkland/ubuntu-dev-tools/612267 into lp:ubuntu-dev-tools

 

Dustin Kirkland has proposed merging lp:~kirkland/ubuntu-dev-tools/612267 into lp:ubuntu-dev-tools.

Requested reviews:
  Ubuntu Development Team (ubuntu-dev)
Related bugs:
  #61226 /usr/share/man/man3/open_memstream.3.gz is a dangling symlink
  https://bugs.launchpad.net/bugs/61226
  #612267 [WISHLIST] Provide a utility that interprets POSIX errno's
  https://bugs.launchpad.net/bugs/612267


Please?
-- 
https://code.launchpad.net/~kirkland/ubuntu-dev-tools/612267/+merge/32216
Your team Ubuntu Development Team is requested to review the proposed merge of lp:~kirkland/ubuntu-dev-tools/612267 into lp:ubuntu-dev-tools.
=== modified file 'debian/changelog'
--- debian/changelog	2010-08-04 10:07:09 +0000
+++ debian/changelog	2010-08-10 15:49:40 +0000
@@ -1,3 +1,11 @@
+ubuntu-dev-tools (0.102) UNRELEASED; urgency=low
+
+  [ Dustin Kirkland ]
+  * errno, doc/errno.1, debian/control, debian/copyright, setup.py:
+    - add an errno utility, LP: #61226
+
+ -- Dustin Kirkland <kirkland@xxxxxxxxxx>  Tue, 10 Aug 2010 11:41:10 -0400
+
 ubuntu-dev-tools (0.101) unstable; urgency=low
 
   [ Andrew Starr-Bochicchio ]

=== modified file 'debian/control'
--- debian/control	2010-08-03 21:32:09 +0000
+++ debian/control	2010-08-10 15:49:40 +0000
@@ -51,6 +51,7 @@
     all .so files in a binary package.
   - dch-repeat - used to repeat a change log into an older release.
   - dgetlp - download a source package from the Launchpad library.
+  - errno - search POSIX error codes by error number, name, or description
   - get-branches - used to branch/checkout all the bzr branches in a Launchpad
     team.
   - get-build-deps - install the build dependencies needed for a package

=== modified file 'debian/copyright'
--- debian/copyright	2010-07-11 18:30:08 +0000
+++ debian/copyright	2010-08-10 15:49:40 +0000
@@ -8,6 +8,7 @@
 	Bryce Harrington <bryce@xxxxxxxxxx>
 	Daniel Hahler <ubuntu@xxxxxxxxxx>
 	Daniel Holbach <daniel.holbach@xxxxxxxxxx>
+	Dustin Kirkland <kirkland@xxxxxxxxxx>
 	Emmet Hikory <persia@xxxxxxxxxx>
 	Iain Lane <iain@xxxxxxxxxxxxxxxxxxx>
 	James Westby <james.westby@xxxxxxxxxx>
@@ -35,6 +36,7 @@
 	(C) 2007, Albert Damen <albrt@xxxxxxx>
 	(C) 2006-2007, Albin Tonnerre <lut1n.tne@xxxxxxxxx>
 	(C) 2006-2007, Daniel Holbach <daniel.holbach@xxxxxxxxxx>
+	(C) 2010, Dustin Kirkland <kirkland@xxxxxxxxxx>
 	(C) 2008, Iain Lane <iain@xxxxxxxxxxxxxxxxxxx>
 	© 2009, James Westby <james.westby@xxxxxxxxxx>
 	(C) Jamin W. Collins <jcollins@xxxxxxxxxxxxxxxx>

=== added file 'doc/errno.1'
--- doc/errno.1	1970-01-01 00:00:00 +0000
+++ doc/errno.1	2010-08-10 15:49:40 +0000
@@ -0,0 +1,22 @@
+.TH errno 1 "10 Aug 2010" ubuntu-dev-tools "ubuntu-dev-tools"
+.SH NAME
+errno \- search POSIX error codes by error number, error name, or error description
+
+.SH DESCRIPTION
+\fBerrno\fP is a simple script that interprets a POSIX error code, or finds error codes related to a search string.
+
+.SH EXAMPLE
+  $ errno 36
+  ENAMETOOLONG    36      /* File name too long */
+
+  $ errno perm
+  EPERM            1      /* Operation not permitted */
+  EACCES          13      /* Permission denied */
+
+.SH SEE ALSO
+\fBerrno\fP(2)\fP, \fBerrno\fP(3), \fI/usr/include/asm/errno.h\fP
+
+.SH AUTHOR
+This manpage and the utility was written by Dustin Kirkland <dustin.kirkland@xxxxxxxxx> for Ubuntu systems (but may be used by others).  Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 published by the Free Software Foundation.
+
+On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.

=== added file 'errno'
--- errno	1970-01-01 00:00:00 +0000
+++ errno	2010-08-10 15:49:40 +0000
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+#
+#    errno - search POSIX error codes by error number, error name,
+#            or error description
+#    Copyright (C) 2010 Dustin Kirkland <kirkland@xxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Header finding trick from Kees Cook <kees@xxxxxxxxxx>
+headers=$(echo "#include <asm/errno.h>" | gcc -E - | grep "\.h" | awk -F\" '{print $2}' | sort -u)
+
+if echo "$code" | egrep -qs "^[0-9]+$"; then
+	# Input is a number, search for a particular matching code
+	egrep -h "^#define\s.*\s+$code\s+/" $headers | sed 's/^#define\s*//'
+else
+	# Input is not a number, search for any matching strings
+	grep -hi "$code" $headers | sed 's/^#define\s*//'
+fi

=== modified file 'setup.py'
--- setup.py	2010-08-02 18:41:09 +0000
+++ setup.py	2010-08-10 15:49:40 +0000
@@ -20,6 +20,7 @@
                'dch-repeat',
                'dgetlp',
                'edit-patch',
+               'errno',
                'get-branches',
                'get-build-deps',
                'grab-attachments',


Follow ups