Your message dated Wed, 25 Feb 2015 12:36:28 +0100
with message-id <[email protected]>
and subject line Re: Bug#556637: dpkg: support for getting architecture from 
DEB_HOST_ARCH
has caused the Debian Bug report #556637,
regarding dpkg: support for getting architecture from DEB_HOST_ARCH
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
556637: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556637
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dpkg
Version: 1.15.4.1

The dpkg determines the architecture in which it's in from a build time constant. This makes things difficult if we use host's dpkg to operate on packages non-native to host, for example, with scratchbox2.

It would be nice if dpkg would read DEB_HOST_ARCH for example to user a chance to override this if needed.

Patch included.

diff -Nur dpkg-1.15.4.1+maemo2+0m6/src/main.c dpkg-1.15.4.1+maemo2.1/src/main.c
--- dpkg-1.15.4.1+maemo2+0m6/src/main.c	2009-11-11 21:45:25.000000000 +0200
+++ dpkg-1.15.4.1+maemo2.1/src/main.c	2009-11-16 14:39:59.000000000 +0200
@@ -155,7 +155,8 @@
 }
 
 const char thisname[]= "dpkg";
-const char architecture[]= ARCHITECTURE;
+const char buildarchitecture[]= ARCHITECTURE;
+char *architecture = NULL;
 const char printforhelp[]= N_(
 "Type dpkg --help for help about installing and deinstalling packages [*];\n"
 "Use `dselect' or `aptitude' for user-friendly package management;\n"
@@ -694,6 +695,9 @@
   jmp_buf ejbuf;
   static void (*actionfunction)(const char *const *argv);
 
+  architecture = getenv("DEB_HOST_ARCH");
+  if (!architecture) architecture = buildarchitecture;
+
   setlocale(LC_ALL, "");
   bindtextdomain(PACKAGE, LOCALEDIR);
   textdomain(PACKAGE);
diff -Nur dpkg-1.15.4.1+maemo2+0m6/src/main.h dpkg-1.15.4.1+maemo2.1/src/main.h
--- dpkg-1.15.4.1+maemo2+0m6/src/main.h	2009-11-11 21:45:25.000000000 +0200
+++ dpkg-1.15.4.1+maemo2.1/src/main.h	2009-11-16 14:39:15.000000000 +0200
@@ -131,7 +131,8 @@
 extern const char *admindir;
 extern const char *instdir;
 extern struct pkginqueue *ignoredependss;
-extern const char architecture[];
+extern const char buildarchitecture[];
+extern char *architecture;
 
 struct invoke_hook {
 	struct invoke_hook *next;

--- End Message ---
--- Begin Message ---
Control: tag -1 wontfix

Hi!

On Tue, 2009-11-17 at 12:08:53 +0200, Jussi Hakala wrote:
> Package: dpkg
> Version: 1.15.4.1

> The dpkg determines the architecture in which it's in from a build time
> constant. This makes things difficult if we use host's dpkg to operate on
> packages non-native to host, for example, with scratchbox2.
> 
> It would be nice if dpkg would read DEB_HOST_ARCH for example to user a
> chance to override this if needed.

With multiarch this should be pretty much unnecessary. And in any case
I don't think this would be a good idea. So I'm wontfixing and closing
this request.

Thanks,
Guillem

--- End Message ---

Reply via email to