[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Should have an option for specifying which package to work on



Package: haskell-devscripts
Version: 0.6.13
Severity: normal
Tags: patch

The script reads the information from dh_listpackages, but it would be
good to
have an option to make it possible to treat it binary package generated by
the
current source package separetly.  That's what this patch does.  The patched
version is being used in gtk2hs.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages haskell-devscripts depends on:
ii  dctrl-tools                   2.13.0     Command-line tools to process
Debi
ii  debhelper                     7.0.17     helper programs for debian/rules
ii  ghc6                          6.8.2-7    GHC - the Glasgow Haskell
Compilat
ii  xutils-dev                    1:7.4+3    X Window System utility
programs f

haskell-devscripts recommends no packages.

haskell-devscripts suggests no packages.

-- no debconf information
diff -ruN haskell-devscripts-0.6.13.orig/dh_haskell_depends haskell-devscripts-0.6.13/dh_haskell_depends
--- haskell-devscripts-0.6.13.orig/dh_haskell_depends	2008-04-08 02:20:58.000000000 -0300
+++ haskell-devscripts-0.6.13/dh_haskell_depends	2008-10-13 11:56:48.000000000 -0200
@@ -199,6 +199,7 @@
 args=
 ignores=
 files=
+pkgs=
 until [ -z "$1" ]
 do 
   case "$1" in
@@ -212,6 +213,16 @@
 	  ignores="$ignores $pkg"
 	  ;;
 
+      -P*)
+          pkg=${1##-P}
+          pkgs="$pkgs $pkg"
+          ;;
+
+      --package=*)
+          pkg=${1##--exclude=}
+          pkgs="$pkgs $pkg"
+          ;;
+
       -*)
 	  args="$args $1"
 	  ;;
@@ -226,8 +237,11 @@
   esac
   shift
 done
+if [ -z "$pkgs$" ] ; then
+    pkgs=`dh_listpackages $args`
+fi
 
-for pkg in `dh_listpackages $args`; do
+for pkg in $pkgs; do
     sfile=debian/$pkg.substvars
     touch $sfile
 

Reply to: