From 5b28c8040795b53a4df54f33e57976720558ed32 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Wed, 1 Aug 2007 19:51:20 -0300 Subject: [PATCH] * Applied patch from Aurelien Jarno to fix wrong directory downloading on non-linux architectures (closes: #435597) --- apt-pkg/init.cc | 8 +------- apt-pkg/init.h | 2 -- buildlib/config.h.in | 7 ++----- cmdline/apt-cache.cc | 4 ++-- cmdline/apt-cdrom.cc | 4 ++-- cmdline/apt-config.cc | 4 ++-- cmdline/apt-extracttemplates.cc | 4 ++-- cmdline/apt-get.cc | 4 ++-- cmdline/apt-sortpkgs.cc | 4 ++-- configure.in | 11 ++--------- debian/changelog | 7 +++++++ ftparchive/apt-ftparchive.cc | 4 ++-- 12 files changed, 26 insertions(+), 37 deletions(-) diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 2f15486d..3ebd592c 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -24,8 +24,6 @@ const char *pkgVersion = VERSION; 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 @@ const char *pkgOS = COMMON_OS; 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 --git a/apt-pkg/init.h b/apt-pkg/init.h index bc0e5503..b33d2db8 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -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 --git a/buildlib/config.h.in b/buildlib/config.h.in index 8a65a229..eddb1624 100644 --- a/buildlib/config.h.in +++ b/buildlib/config.h.in @@ -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 --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index cc4c1559..c0655da4 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1711,8 +1711,8 @@ bool GenCaches(CommandLine &Cmd) /* */ 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 --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 7434a722..379a433e 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -135,8 +135,8 @@ bool DoIdent(CommandLine &) /* */ 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 --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 34365dc2..63fa0867 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -67,8 +67,8 @@ bool DoDump(CommandLine &CmdL) /* */ 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 --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index c87b436b..6d580cc2 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -222,8 +222,8 @@ bool DebFile::ParseInfo() /* */ 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 --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index df041407..b216204d 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2582,8 +2582,8 @@ bool DoMoo(CommandLine &CmdL) /* */ 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 --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 8909c382..7b2a74ae 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -141,8 +141,8 @@ bool DoIt(string InFile) /* */ 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 --git a/configure.in b/configure.in index c3345139..0294b9ae 100644 --- a/configure.in +++ b/configure.in @@ -80,20 +80,13 @@ dnl Converts the ARCH to be something singular for this general CPU family 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 --git a/debian/changelog b/debian/changelog index 7add9273..873df169 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.7.6) unstable; urgency=low + + * Applied patch from Aurelien Jarno to fix wrong + directory downloading on non-linux architectures (closes: #435597) + + -- Otavio Salvador Wed, 01 Aug 2007 19:49:51 -0300 + apt (0.7.5) unstable; urgency=low [ Otavio Salvador ] diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index 290326ec..3b1e8063 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -544,8 +544,8 @@ void LoadBinDir(vector &PkgList,Configuration &Setup) /* */ 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; -- 2.20.1