Your message dated Sun, 4 Nov 2007 15:23:20 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#398625: adapted patch against current dpkg
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: dpkg
Version: 1.10.18
Severity: wishlist
Tags: patch

Hello dpkg developers,

As discussed in #218893,
here a patch that implement support in dpkg-buildpackage
for `Build-Options: build-arch' in debian/control as
defined in the matching patch to debian-policy.

When a package specify the Build-Options 'build-arch', dpkg-buildpackage
will assume that build-arch and build-indep are implemented in
debian/rules and act accordingly.

Cheers,
-- 
Bill. <[EMAIL PROTECTED]>

Imagine a large red swirl here. 

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux seventeen 2.4.24 #1 Mon Jan 5 19:10:08 CET 2004 i686
Locale: LANG=français, LC_CTYPE=français

Versions of packages dpkg depends on:
ii  dselect                     1.10.18      a user tool to manage Debian packa
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared libraries an

-- no debconf information
--- dpkg-1.10.18/scripts/controllib.pl  2003-09-19 19:29:09.000000000 +0200
+++ dpkg-1.10.18.new/scripts/controllib.pl      2003-11-17 18:03:25.000000000 
+0100
@@ -15,7 +15,8 @@
 
 grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size
                          Build-Depends Build-Depends-Indep 
-                         Build-Conflicts Build-Conflicts-Indep));
+                         Build-Conflicts Build-Conflicts-Indep
+                          Build-Options));
 @pkg_dep_fields = qw(Replaces Provides Depends Pre-Depends Recommends Suggests
                      Conflicts Enhances);
 @src_dep_fields = qw(Build-Depends Build-Depends-Indep
@@ -300,6 +301,15 @@
     $index || &syntax("empty file");
     return $index;
 }
+sub parsebuildoption
+{
+  $controlfile=$_[0];
+  &parsecontrolfile;
+  my $opts=$fi{'C Build-Options'};
+  return if (!defined($opts));
+  $opts=~ s/ //;
+  return split(',',$opts);
+}
 
 sub unknown {
     &warn("unknown information field " . $fi{"o:$_"} . " in input data in 
$_[0]");
@@ -328,4 +338,8 @@
     }
 }
 
+if ($0 =~ /controllib\.pl$/ )
+{
+  eval join(' ',@ARGV);
+}
 1;
--- dpkg-1.10.18/scripts/dpkg-buildpackage.sh   2003-09-20 02:57:39.000000000 
+0200
+++ dpkg-1.10.18.new/scripts/dpkg-buildpackage.sh       2003-11-17 
18:18:17.000000000 +0100
@@ -2,7 +2,8 @@
 
 set -e
 
-version="1.10.10"; # This line modified by Makefile
+version="1.10.18"; # This line modified by Makefile
+dpkglibdir=".";    # This line modified by Makefile
 
 progname="`basename \"$0\"`"
 usageversion () {
@@ -61,6 +62,7 @@
 checkbuilddep=true
 checkbuilddep_args=''
 binarytarget=binary
+buildtarget=build
 sourcestyle=''
 version=''
 since=''
@@ -156,6 +158,16 @@
 sversion=`echo "$version" | perl -pe 's/^\d+://'`
 pv="${package}_${sversion}"
 pva="${package}_${sversion}_${arch}"
+buildoptions=(`perl $dpkglibdir/controllib.pl \
+        'print parsebuildoption("debian/control")'`)
+
+if [ $binarytarget = binary-arch ] ; then
+  for opt in $buildoptions; do
+    if [ $opt = build-arch ] ; then
+      buildtarget='build-arch'
+    fi
+  done
+fi
 
 signfile () {
        if test "$signinterface" = "gpg" ; then
@@ -196,7 +208,7 @@
        cd ..; withecho dpkg-source $passopts $diffignore $tarignore -b 
"$dirn"; cd "$dirn"
 fi
 if [ x$sourceonly = x ]; then
-       withecho debian/rules build 
+       withecho debian/rules $buildtarget
        withecho $rootcommand debian/rules $binarytarget
 fi
 if [ "$usepause" = "true" ] && \
--- dpkg-1.10.18/scripts/Makefile.in    2002-05-20 06:40:27.000000000 +0200
+++ dpkg-1.10.18.new/scripts/Makefile.in        2003-11-16 21:01:09.000000000 
+0100
@@ -108,3 +108,5 @@
 %: %.sh 
        $(SED) -e "s:version=\"[^\"]*\":version=\"$(VERSION)\":" \
                < $< > $@
+       $(SED) -e "s:dpkglibdir=\"[^\"]*\":dpkglibdir=\"$(dpkglibdir)\":" \
+               < $< > $@

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Simon Richter writes ("Bug#398625: adapted patch against current dpkg"):
> I have written a new implementation of the patch proposed earlier,
> against the current shell script.

As discussed on debian-devel, I think this approach is fundamentally
wrong.

Failure of a rules target should not be treated as an invitation to
try a different target.  The package should declare (eg with
Build-Options) what the situation is.

The appropriate approach is still being discussed, but I don't think
it is correct at this stage for us to be thinking about writing
implementations in dpkg-buildpackage.

Please go back to the mailing lists and try to get something
resembling rough consensus on a better approach.

In the meantime I don't think this bug represents any desirable or
intended change to dpkg, so I'm going to close it.

Thanks,
Ian.


--- End Message ---

Reply via email to