[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#217014: marked as done (apt-utils: [apt-ftparchive] add Architecture filter support)



Your message dated Sat, 8 May 2004 16:14:32 -0700
with message-id <20040508231432.GW5654@alcor.net>
and subject line Bug#217014: apt-utils: [apt-ftparchive] add Architecture filter support
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)

--------------------------------------
Received: (at submit) by bugs.debian.org; 22 Oct 2003 05:25:26 +0000
>From guillem@zulo.hadrons.org Wed Oct 22 00:25:16 2003
Return-path: <guillem@zulo.hadrons.org>
Received: from docsis224-101.menta.net (pulsar.hadrons.org) [62.57.224.101] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1ACBUh-00029x-00; Wed, 22 Oct 2003 00:25:16 -0500
Received: from zulo.hadrons.org ([192.168.1.5] ident=mail)
	by pulsar.hadrons.org with esmtp (Exim 3.35 #1 (Debian))
	id 1ACBVU-000315-00
	for <submit@bugs.debian.org>; Wed, 22 Oct 2003 07:26:04 +0200
Received: from guillem by zulo.hadrons.org with local (Exim 3.36 #1 (Debian))
	id 1ACBTf-00016N-00
	for <submit@bugs.debian.org>; Wed, 22 Oct 2003 07:24:11 +0200
Date: Wed, 22 Oct 2003 07:24:11 +0200
From: Guillem Jover <guillem@debian.org>
To: submit@bugs.debian.org
Subject: apt-utils: [apt-ftparchive] add Architecture filter support
Message-ID: <20031022052411.GA3333@zulo.hadrons.org>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="J2SCkAp4GZ/dPZZf"
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
Sender: Guillem Jover <guillem@zulo.hadrons.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-7.9 required=4.0
	tests=HAS_PACKAGE,PATCH_UNIFIED_DIFF
	autolearn=ham version=2.53-bugs.debian.org_2003_10_21
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_21 (1.174.2.15-2003-03-30-exp)


--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: apt-utils
Version: 0.5.14
Severity: wishlist
Tags: patch

Hi,

I'm using apt-ftparchive with a pool style repository, but it did not
filter the debs to be put on Packages depending on Architecture. So
every package in the pool was repeated in every Packages file regardless
of its Architecture.

In the fix I've only set Architecture inside LoadTree to retain the
expected behaviour on the other functions, if you think this is not
desirable I can modify the patch.

I attach the conf I'm using and a patch that solves it. So now I can use
it with my mini-dak almost properly =P (only missing distro filtering).

regards,
guillem

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="apt-0.5.14_arch_filter_support.patch"

Index: apt-ftparchive.cc
===================================================================
RCS file: /cvs/deity/apt/ftparchive/apt-ftparchive.cc,v
retrieving revision 1.8
diff -u -r1.8 apt-ftparchive.cc
--- apt-ftparchive.cc	18 Jul 2003 15:28:58 -0000	1.8
+++ apt-ftparchive.cc	22 Oct 2003 02:31:04 -0000
@@ -72,6 +72,7 @@
    string CntCompress;
    string SrcCompress;
    string PathPrefix;
+   string Architecture;
    unsigned int DeLinkLimit;
    mode_t Permissions;
    
@@ -168,6 +169,8 @@
    Packages.DirStrip = ArchiveDir;
    Packages.InternalPrefix = flCombine(ArchiveDir,InternalPrefix);
 
+   Packages.Architecture = Architecture;
+
    Packages.Stats.DeLinkBytes = Stats.DeLinkBytes;
    Packages.DeLinkLimit = DeLinkLimit;
 
@@ -472,6 +475,7 @@
 	    
 	    Itm.BinOverride = SubstVar(Block.Find("BinOverride"),Vars);
 	    Itm.InternalPrefix = SubstVar(Block.Find("InternalPrefix",DIPrfx.c_str()),Vars);
+	    Itm.Architecture = Arch;
 
 	    if (stringcasecmp(Arch,"source") == 0)
 	    {
Index: writer.cc
===================================================================
RCS file: /cvs/deity/apt/ftparchive/writer.cc,v
retrieving revision 1.7
diff -u -r1.7 writer.cc
--- writer.cc	10 Feb 2003 07:34:41 -0000	1.7
+++ writer.cc	22 Oct 2003 02:31:05 -0000
@@ -348,8 +348,18 @@
    if (Delink(FileName,OriginalPath,Stats.DeLinkBytes,St) == false)
       return false;
    
-   // Lookup the overide information
    pkgTagSection &Tags = Db.Control.Section;
+
+   // Test for a valid Architecture
+   if (Architecture.empty() == false)
+   {
+      string PackageArchitecture = Tags.FindS("Architecture");
+
+      if (PackageArchitecture != Architecture && PackageArchitecture != "all")
+	  return false;
+   }
+
+   // Lookup the override information
    string Package = Tags.FindS("Package");
    Override::Item Tmp;
    Override::Item *OverItem = Over.GetItem(Package);
Index: writer.h
===================================================================
RCS file: /cvs/deity/apt/ftparchive/writer.h,v
retrieving revision 1.4
diff -u -r1.4 writer.h
--- writer.h	26 Jun 2001 02:50:27 -0000	1.4
+++ writer.h	22 Oct 2003 02:31:05 -0000
@@ -87,6 +87,7 @@
    // General options
    string PathPrefix;
    string DirStrip;
+   string Architecture;
    FILE *Output;
    struct CacheDB::Stats &Stats;
    

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="apt-archive.conf"

Default {
  Packages::Compress	". gzip bzip2";
  Sources::Compress	". gzip bzip2";
};

Dir {
  ArchiveDir		"/site/ftp.gnuab.org";
  OverrideDir		"indices";
  CacheDir		"cache";
};

TreeDefault {
  Directory		"pool/";
  SrcDirectory		"pool/";
};

Tree "dists/unstable" {
  Sections		"main";
  Architectures		"source i386 hurd-i386 freebsd-i386 netbsd-i386";
};

Tree "dists/unreleased" {
  Sections		"main";
  Architectures		"source i386 hurd-i386 freebsd-i386 netbsd-i386";
};


--J2SCkAp4GZ/dPZZf--

---------------------------------------
Received: (at 217014-done) by bugs.debian.org; 8 May 2004 23:15:04 +0000
>From mdz@alcor.net Sat May 08 16:15:04 2004
Return-path: <mdz@alcor.net>
Received: from mta9.adelphia.net [68.168.78.199] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BMb28-0001d9-00; Sat, 08 May 2004 16:15:04 -0700
Received: from mizar.alcor.net ([69.167.148.207]) by mta9.adelphia.net
          (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP
          id <20040508231433.XYSC26615.mta9.adelphia.net@mizar.alcor.net>
          for <217014-done@bugs.debian.org>; Sat, 8 May 2004 19:14:33 -0400
Received: from mdz by mizar.alcor.net with local (Exim 4.33)
	id 1BMb1c-00044s-TV
	for 217014-done@bugs.debian.org; Sat, 08 May 2004 16:14:32 -0700
Date: Sat, 8 May 2004 16:14:32 -0700
From: Matt Zimmerman <mdz@debian.org>
To: 217014-done@bugs.debian.org
Subject: Re: Bug#217014: apt-utils: [apt-ftparchive] add Architecture filter support
Message-ID: <20040508231432.GW5654@alcor.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.5.1+cvs20040105i
Sender: Matt Zimmerman <mdz@alcor.net>
Delivered-To: 217014-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

Submitter has been convinced that this feature is unnecessary. :-)

-- 
 - mdz



Reply to: