Package: apt Version: 0.7.5 Severity: important Tags: patch Since version 0.7.5, apt tries to get remote files from /binary-kfreebsd-kfreebsd-i386/ instead of /binary-kfreebsd-i386/
This is because apt now uses the output of dpkg-architecture to get the name of the architecture, but still try to do some mix between the name of the OS and the CPU. This result on broken apt on all non-linux architectures. Please find a patch below to fix that. Please note that this bug is not an RC bug as it only breaks non-release architectures but we would really appreciate a new upload as soon as possible. diff -Nru apt-0.7.5/apt-pkg/init.cc apt-0.7.5/apt-pkg/init.cc --- apt-0.7.5/apt-pkg/init.cc 2007-07-24 14:33:27 +0200 +++ apt-0.7.5/apt-pkg/init.cc 2007-08-01 22:44:45 +0200 @@ -24,8 +24,6 @@ const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "." Stringfy(APT_PKG_MINOR) "." Stringfy(APT_PKG_RELEASE); -const char *pkgCPU = COMMON_CPU; -const char *pkgOS = COMMON_OS; // pkgInitConfig - Initialize the configuration class /*{{{*/ // --------------------------------------------------------------------- @@ -35,11 +33,7 @@ bool pkgInitConfig(Configuration &Cnf) { // General APT things - if (strcmp(COMMON_OS,"linux") == 0 || - strcmp(COMMON_OS,"unknown") == 0) - Cnf.Set("APT::Architecture",COMMON_CPU); - else - Cnf.Set("APT::Architecture",COMMON_OS "-" COMMON_CPU); + Cnf.Set("APT::Architecture", COMMON_ARCH); Cnf.Set("APT::Build-Essential::", "build-essential"); Cnf.Set("APT::Install-Recommends", false); Cnf.Set("APT::Install-Suggests", false); diff -Nru apt-0.7.5/apt-pkg/init.h apt-0.7.5/apt-pkg/init.h --- apt-0.7.5/apt-pkg/init.h 2007-07-24 14:33:27 +0200 +++ apt-0.7.5/apt-pkg/init.h 2007-08-01 22:44:29 +0200 @@ -23,8 +23,6 @@ extern const char *pkgVersion; extern const char *pkgLibVersion; -extern const char *pkgOS; -extern const char *pkgCPU; bool pkgInitConfig(Configuration &Cnf); bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys); diff -Nru apt-0.7.5/buildlib/config.h.in apt-0.7.5/buildlib/config.h.in --- apt-0.7.5/buildlib/config.h.in 2007-07-24 14:33:28 +0200 +++ apt-0.7.5/buildlib/config.h.in 2007-08-01 22:49:53 +0200 @@ -32,11 +32,8 @@ /* If there is no socklen_t, define this for the netdb shim */ #undef NEED_SOCKLEN_T_DEFINE -/* Define the cpu name string */ -#undef COMMON_CPU - -/* Define the on name string */ -#undef COMMON_OS +/* Define the arch name string */ +#undef COMMON_ARCH /* The version number string */ #undef VERSION diff -Nru apt-0.7.5/cmdline/apt-cache.cc apt-0.7.5/cmdline/apt-cache.cc --- apt-0.7.5/cmdline/apt-cache.cc 2007-07-24 14:33:29 +0200 +++ apt-0.7.5/cmdline/apt-cache.cc 2007-08-01 22:52:22 +0200 @@ -1711,8 +1711,8 @@ /* */ bool ShowHelp(CommandLine &Cmd) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return true; diff -Nru apt-0.7.5/cmdline/apt-cdrom.cc apt-0.7.5/cmdline/apt-cdrom.cc --- apt-0.7.5/cmdline/apt-cdrom.cc 2007-07-24 14:33:29 +0200 +++ apt-0.7.5/cmdline/apt-cdrom.cc 2007-08-01 22:58:24 +0200 @@ -135,8 +135,8 @@ /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff -Nru apt-0.7.5/cmdline/apt-config.cc apt-0.7.5/cmdline/apt-config.cc --- apt-0.7.5/cmdline/apt-config.cc 2007-07-24 14:33:29 +0200 +++ apt-0.7.5/cmdline/apt-config.cc 2007-08-01 22:58:04 +0200 @@ -67,8 +67,8 @@ /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff -Nru apt-0.7.5/cmdline/apt-extracttemplates.cc apt-0.7.5/cmdline/apt-extracttemplates.cc --- apt-0.7.5/cmdline/apt-extracttemplates.cc 2007-07-24 14:33:29 +0200 +++ apt-0.7.5/cmdline/apt-extracttemplates.cc 2007-08-01 22:58:56 +0200 @@ -222,8 +222,8 @@ /* */ int ShowHelp(void) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff -Nru apt-0.7.5/cmdline/apt-get.cc apt-0.7.5/cmdline/apt-get.cc --- apt-0.7.5/cmdline/apt-get.cc 2007-07-24 14:33:29 +0200 +++ apt-0.7.5/cmdline/apt-get.cc 2007-08-01 22:54:37 +0200 @@ -2582,8 +2582,8 @@ /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) { diff -Nru apt-0.7.5/cmdline/apt-sortpkgs.cc apt-0.7.5/cmdline/apt-sortpkgs.cc --- apt-0.7.5/cmdline/apt-sortpkgs.cc 2007-07-24 14:33:29 +0200 +++ apt-0.7.5/cmdline/apt-sortpkgs.cc 2007-08-01 22:58:38 +0200 @@ -141,8 +141,8 @@ /* */ int ShowHelp() { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; diff -Nru apt-0.7.5/configure apt-0.7.5/configure --- apt-0.7.5/configure 2007-07-31 20:24:13 +0200 +++ apt-0.7.5/configure 2007-08-01 22:50:02 +0200 @@ -4498,8 +4498,8 @@ -{ echo "$as_me:$LINENO: checking system architecture" >&5 -echo $ECHO_N "checking system architecture... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking debian architecture" >&5 +echo $ECHO_N "checking debian architecture... $ECHO_C" >&6; } archset="`dpkg-architecture -qDEB_HOST_ARCH`" if test "x$archset" = "x"; then { { echo "$as_me:$LINENO: error: failed: use --host= or output from dpkg-architecture" >&5 @@ -4509,17 +4509,7 @@ { echo "$as_me:$LINENO: result: $archset" >&5 echo "${ECHO_T}$archset" >&6; } cat >>confdefs.h <<_ACEOF -#define COMMON_CPU "$archset" -_ACEOF - - -{ echo "$as_me:$LINENO: checking system OS" >&5 -echo $ECHO_N "checking system OS... $ECHO_C" >&6; } -osset="`dpkg-architecture -qDEB_HOST_ARCH_OS`" -{ echo "$as_me:$LINENO: result: $osset" >&5 -echo "${ECHO_T}$osset" >&6; } -cat >>confdefs.h <<_ACEOF -#define COMMON_OS "$osset" +#define COMMON_ARCH "$archset" _ACEOF diff -Nru apt-0.7.5/configure.in apt-0.7.5/configure.in --- apt-0.7.5/configure.in 2007-07-31 01:26:08 +0200 +++ apt-0.7.5/configure.in 2007-08-01 22:48:29 +0200 @@ -80,20 +80,13 @@ dnl This is often the dpkg architecture string. dnl First check against the full canonical canoncial-system-type in $target dnl and if that fails, just look for the cpu -AC_MSG_CHECKING(system architecture) +AC_MSG_CHECKING(debian architecture) archset="`dpkg-architecture -qDEB_HOST_ARCH`" if test "x$archset" = "x"; then AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture]) fi AC_MSG_RESULT($archset) -AC_DEFINE_UNQUOTED(COMMON_CPU,"$archset") - -dnl Get a common name for the host OS - this is primarily only for HURD and is -dnl non fatal if it fails -AC_MSG_CHECKING(system OS) -osset="`dpkg-architecture -qDEB_HOST_ARCH_OS`" -AC_MSG_RESULT($osset) -AC_DEFINE_UNQUOTED(COMMON_OS,"$osset") +AC_DEFINE_UNQUOTED(COMMON_ARCH,"$archset") dnl We use C99 types if at all possible AC_CACHE_CHECK([for C99 integer types],c9x_ints,[ diff -Nru apt-0.7.5/ftparchive/apt-ftparchive.cc apt-0.7.5/ftparchive/apt-ftparchive.cc --- apt-0.7.5/ftparchive/apt-ftparchive.cc 2007-07-24 14:33:30 +0200 +++ apt-0.7.5/ftparchive/apt-ftparchive.cc 2007-08-01 22:59:24 +0200 @@ -544,8 +544,8 @@ /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return true; -- System Information: Debian Release: lenny/sid Architecture: kfreebsd-i386 (i686) Kernel: kFreeBSD 6.2-1-686 Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages apt depends on: ii debian-archive-keyring 2007.02.19-0.1 GnuPG archive keys of the Debian a ii libc0.1 2.6-5 GNU C Library: Shared libraries ii libgcc1 1:4.2.1-0 GCC support library ii libstdc++6 4.2.1-0 The GNU Standard C++ Library v3 apt recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]