[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. 0.0.96-14-ga3b1322

Ryan Niebur ryanryan52 at gmail.com
Tue Jun 9 05:43:47 UTC 2009


The following commit has been merged in the master branch:
commit ceaf63eb3eb35c592efd27fd37318762b49dd3eb
Author: Ryan Niebur <ryanryan52 at gmail.com>
Date:   Mon Jun 8 22:36:33 2009 -0700

    stop using sed during build to add in the version and load path, just figure it out at runtime

diff --git a/apt-listbugs b/apt-listbugs
index 8abcb71..e40f55d 100755
--- a/apt-listbugs
+++ b/apt-listbugs
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby -Ilib/
+#!/usr/bin/ruby
 #
 # apt-listbugs: retrieves bug reports and lists them
 #
@@ -223,7 +223,13 @@ apt.conf(5), sensible-browser(1), www-browser(1), querybts(1)
 
 =end
 
-$VERSION = "#APT_LISTBUGS_VERSION#"
+if File.expand_path(__FILE__).match(/^\/usr\/s?bin\//)
+  $LOAD_PATH.unshift("/usr/share/apt-listbugs")
+  $VERSION = `dpkg-query -W -f='${Version}' apt-listbugs`
+else
+  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
+  $VERSION = `dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2`
+end
 
 require 'getoptlong'
 require 'debian'
diff --git a/aptcleanup b/aptcleanup
index 2798293..f25e899 100755
--- a/aptcleanup
+++ b/aptcleanup
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby -Ilib/
+#!/usr/bin/ruby
 #
 # aptcleanup: filters /etc/apt/preferences to unpin packages when bugs are fixed
 #
@@ -24,6 +24,12 @@
 #
 # 
 
+if File.expand_path(__FILE__).match(/^\/usr\/share\/apt-listbugs\//)
+  $LOAD_PATH.unshift("/usr/share/apt-listbugs")
+else
+  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
+end
+
 require 'debian/apt_preferences'
 require 'tempfile'
 
diff --git a/debian/changelog b/debian/changelog
index e1622b1..3bd9a37 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-apt-listbugs (0.1.0) UNRELEASED; urgency=low
+apt-listbugs (0.1.1) UNRELEASED; urgency=low
 
   [ Ryan Niebur ]
   * Add DM-Upload-Allowed field, I am now a DM
@@ -9,7 +9,11 @@ apt-listbugs (0.1.0) UNRELEASED; urgency=low
   * improve logic: apt-listbugs may now pin uninstalled packages too
   * simplify code and add some robustness checks in aptcleanup
 
- -- Ryan Niebur <ryanryan52 at gmail.com>  Sun, 07 Jun 2009 23:56:40 -0700
+  [ Ryan Niebur ]
+  * stop using sed during build to add in the version and load path,
+    just figure it out at runtime
+
+ -- Ryan Niebur <ryanryan52 at gmail.com>  Mon, 08 Jun 2009 22:36:27 -0700
 
 apt-listbugs (0.0.96) unstable; urgency=low
 
diff --git a/debian/rules b/debian/rules
index 60d57f6..d52d298 100755
--- a/debian/rules
+++ b/debian/rules
@@ -45,17 +45,10 @@ override_dh_auto_test:
 
 override_dh_auto_install:
 	# Add here commands to install the package into debian/apt-listbugs.
-	sed -e 's/#APT_LISTBUGS_VERSION#/$(VERSION)/' \
-		-e 's,#!/usr/bin/ruby -Ilib/,#!/usr/bin/ruby -I/usr/share/apt-listbugs,' \
-		< apt-listbugs \
-		> $(DEB_DESTDIR)/usr/sbin/apt-listbugs
-	chmod 755 $(DEB_DESTDIR)/usr/sbin/apt-listbugs
+	install -m 755 apt-listbugs $(DEB_DESTDIR)/usr/sbin/apt-listbugs
 	install -m 644 10apt-listbugs $(DEB_DESTDIR)/etc/apt/apt.conf.d/
 	install -m 644 ignore_bugs $(DEB_DESTDIR)/usr/share/apt-listbugs/
-	sed -e 's,#!/usr/bin/ruby -Ilib/,#!/usr/bin/ruby -I/usr/share/apt-listbugs,' \
-		< aptcleanup \
-		> $(DEB_DESTDIR)/usr/share/apt-listbugs/aptcleanup
-	chmod 755 $(DEB_DESTDIR)/usr/share/apt-listbugs/aptcleanup
+	install -m 755 aptcleanup $(DEB_DESTDIR)/usr/share/apt-listbugs/aptcleanup
 	install -m 644 lib/debian/*.rb $(DEB_DESTDIR)/usr/share/apt-listbugs/debian/
 	install -m 644 lib/apt-listbugs/*.rb $(DEB_DESTDIR)/usr/share/apt-listbugs/apt-listbugs/
 	for mo in $(MOFILES); do \

-- 
apt-listbugs development tree



More information about the Apt-listbugs-commits mailing list