Procházet zdrojové kódy

* Applied patch from Aurelien Jarno <aurel32@debian.org> to fix wrong
directory downloading on non-linux architectures (closes: #435597)

Otavio Salvador před 19 roky
rodič
revize
5b28c80407

+ 1 - 7
apt-pkg/init.cc

@@ -24,8 +24,6 @@ const char *pkgVersion = VERSION;
 const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "."
 const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "."
                             Stringfy(APT_PKG_MINOR) "." 
                             Stringfy(APT_PKG_MINOR) "." 
                             Stringfy(APT_PKG_RELEASE);
                             Stringfy(APT_PKG_RELEASE);
-const char *pkgCPU = COMMON_CPU;
-const char *pkgOS = COMMON_OS;
     
     
 // pkgInitConfig - Initialize the configuration class			/*{{{*/
 // pkgInitConfig - Initialize the configuration class			/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
@@ -35,11 +33,7 @@ const char *pkgOS = COMMON_OS;
 bool pkgInitConfig(Configuration &Cnf)
 bool pkgInitConfig(Configuration &Cnf)
 {
 {
    // General APT things
    // 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::Build-Essential::", "build-essential");
    Cnf.Set("APT::Install-Recommends", false);
    Cnf.Set("APT::Install-Recommends", false);
    Cnf.Set("APT::Install-Suggests", false);
    Cnf.Set("APT::Install-Suggests", false);

+ 0 - 2
apt-pkg/init.h

@@ -23,8 +23,6 @@
     
     
 extern const char *pkgVersion;
 extern const char *pkgVersion;
 extern const char *pkgLibVersion;
 extern const char *pkgLibVersion;
-extern const char *pkgOS;
-extern const char *pkgCPU;
 
 
 bool pkgInitConfig(Configuration &Cnf);
 bool pkgInitConfig(Configuration &Cnf);
 bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys);
 bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys);

+ 2 - 5
buildlib/config.h.in

@@ -32,11 +32,8 @@
 /* If there is no socklen_t, define this for the netdb shim */
 /* If there is no socklen_t, define this for the netdb shim */
 #undef NEED_SOCKLEN_T_DEFINE
 #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 */
 /* The version number string */
 #undef VERSION
 #undef VERSION

+ 2 - 2
cmdline/apt-cache.cc

@@ -1711,8 +1711,8 @@ bool GenCaches(CommandLine &Cmd)
 /* */
 /* */
 bool ShowHelp(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)
    if (_config->FindB("version") == true)
      return true;
      return true;

+ 2 - 2
cmdline/apt-cdrom.cc

@@ -135,8 +135,8 @@ bool DoIdent(CommandLine &)
 /* */
 /* */
 int ShowHelp()
 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)
    if (_config->FindB("version") == true)
       return 0;
       return 0;
    
    

+ 2 - 2
cmdline/apt-config.cc

@@ -67,8 +67,8 @@ bool DoDump(CommandLine &CmdL)
 /* */
 /* */
 int ShowHelp()
 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)
    if (_config->FindB("version") == true)
       return 0;
       return 0;
    
    

+ 2 - 2
cmdline/apt-extracttemplates.cc

@@ -222,8 +222,8 @@ bool DebFile::ParseInfo()
 /* */
 /* */
 int ShowHelp(void)
 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) 
 	if (_config->FindB("version") == true) 
 		return 0;
 		return 0;

+ 2 - 2
cmdline/apt-get.cc

@@ -2582,8 +2582,8 @@ bool DoMoo(CommandLine &CmdL)
 /* */
 /* */
 bool ShowHelp(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)
    if (_config->FindB("version") == true)
    {
    {

+ 2 - 2
cmdline/apt-sortpkgs.cc

@@ -141,8 +141,8 @@ bool DoIt(string InFile)
 /* */
 /* */
 int ShowHelp()
 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)
    if (_config->FindB("version") == true)
       return 0;
       return 0;
    
    

+ 2 - 9
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 This is often the dpkg architecture string.
 dnl First check against the full canonical canoncial-system-type in $target
 dnl First check against the full canonical canoncial-system-type in $target
 dnl and if that fails, just look for the cpu
 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`"
 archset="`dpkg-architecture -qDEB_HOST_ARCH`"
 if test "x$archset" = "x"; then
 if test "x$archset" = "x"; then
    AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
    AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
 fi
 fi
 AC_MSG_RESULT($archset)
 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
 dnl We use C99 types if at all possible
 AC_CACHE_CHECK([for C99 integer types],c9x_ints,[
 AC_CACHE_CHECK([for C99 integer types],c9x_ints,[

+ 7 - 0
debian/changelog

@@ -1,3 +1,10 @@
+apt (0.7.6) unstable; urgency=low
+
+  * Applied patch from Aurelien Jarno <aurel32@debian.org> to fix wrong
+    directory downloading on non-linux architectures (closes: #435597)
+
+ -- Otavio Salvador <otavio@debian.org>  Wed, 01 Aug 2007 19:49:51 -0300
+
 apt (0.7.5) unstable; urgency=low
 apt (0.7.5) unstable; urgency=low
 
 
   [ Otavio Salvador ]
   [ Otavio Salvador ]

+ 2 - 2
ftparchive/apt-ftparchive.cc

@@ -544,8 +544,8 @@ void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup)
 /* */
 /* */
 bool ShowHelp(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)
    if (_config->FindB("version") == true)
       return true;
       return true;