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

Bug#227805: marked as done (/usr/bin/apt-cache: using a command-line specified sources.list (apt-cache -o, -p oddities))



Your message dated Wed, 14 Jan 2004 17:41:44 -0800
with message-id <20040115014144.GG27204@alcor.net>
and subject line Bug#227805: /usr/bin/apt-cache: using a command-line specified sources.list (apt-cache -o, -p oddities)
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; 15 Jan 2004 01:15:54 +0000
>From nadim@sina.arabeyes.org Wed Jan 14 19:15:53 2004
Return-path: <nadim@sina.arabeyes.org>
Received: from arabeyes.org (sinaarabeyes.org) [216.18.0.60] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Agw6z-00046c-00; Wed, 14 Jan 2004 19:15:53 -0600
Received: by sinaarabeyes.org (Postfix, from userid 1001)
	id 3A2AC27ADC; Wed, 14 Jan 2004 17:16:19 -0800 (PST)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Nadim Shaikli <shaikli@yahoo.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: /usr/bin/apt-cache: using a command-line specified sources.list (apt-cache
 -o, -p oddities)
X-Mailer: reportbug 2.37
Date: Wed, 14 Jan 2004 17:16:19 -0800
Message-Id: <[🔎] 20040115011619.3A2AC27ADC@sinaarabeyes.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_01_14 
	(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-1.4 required=4.0 tests=FORGED_YAHOO_RCVD,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_01_14
X-Spam-Level: 

Package: apt
Version: 0.5.14
Severity: normal
File: /usr/bin/apt-cache

I was trying to query a different sourcelist for a particular package
without changing my /etc/apt/sources.list.  So I seem to have ventured
into unchartered terretory.

I did the following.

1. Created a file in /test/my_source, in it I had

deb ftp://ftp.nerim.net/debian-marillat/ testing main non-free contrib

The actual URI is immaterial - you can replace 'ftp.nerim.net/debian-marillat'
with say 'archive.progeny.com/debian' or whatever (same problem).

2. I then try to do a search on this new source list file via (as both
   normal user and 'root'),

apt-cache -o=Dir::Etc::SourceList=/test/my_source -p /tmp/my_db search moo

and I get some odd errors about,

W: Couldn't stat source package list ftp://ftp.nerim.net
testing/main Packages
(/var/lib/apt/lists/ftp.nerim.net_debian-marillat_dists_testing_main_binary-i386_Packages)
- stat (2 No such file or directory)

which leads me to question why is it going to /var/lib/apt/lists (I did
use the -p option which ought to be have it be reside somewhere else, no?).
If I use something that is listed in /var/lib/apt/lists/, I get the following
error if I run as non-root,

E: Could not open file /var/cache/apt/srcpkgcache.bin - open
(13 Permission denied)

The fundemental problem I have with all of this, is that one is unable
to query outside what is listed in /etc/apt/sources.list and it seems
to me some of the hooks are there to get that done (or maybe I'm
misunderstanding things).  It seems that in order to do a search a
cache file must be generted and to generate a cache file one has to
do a 'apt-get update' and with the above I would screw my system
over, so isn't there a way to search a different source list without
completely changing my system.  If not, why are all those options
availble on the command-line on 'apt-cache' and 'apt-get' (namely
"pkg-cache", "Dir::Etc::SourceList", etc) ?

In passing, apt-cache's (and apt-get's) manpages about the '-o'
syntax option is VERY confusing.  I believe it needs to be
'-o=CONF_VAR=value' and not '-o CONF_VAR=value' or '-o=CONF value'
as is noted in the man page (it would be best if '-o CONF=value'
was made to work).  In the manpages there is also no mention of
using multiple '-o' options.  So is '-o=CONF_VAR1=value1
-o=CONF_VAR2=value2' (ie. two -o on the same command-line) legal ?
It would be nice if the manpage noted something with this regard.

Regards.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux sina 2.4.22 #2 Thu Sep 18 20:47:45 PDT 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages apt depends on:
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.3.2-4    GCC support library
ii  libstdc++5                  1:3.3.2-4    The GNU Standard C++ Library v3

-- no debconf information


---------------------------------------
Received: (at 227805-done) by bugs.debian.org; 15 Jan 2004 01:41:46 +0000
>From mdz@alcor.net Wed Jan 14 19:41:46 2004
Return-path: <mdz@alcor.net>
Received: from mta10.adelphia.net [68.168.78.202] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AgwW1-0006iT-00; Wed, 14 Jan 2004 19:41:45 -0600
Received: from mizar.alcor.net ([68.64.159.24]) by mta10.adelphia.net
          (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP
          id <20040115014145.JPQG19141.mta10.adelphia.net@mizar.alcor.net>;
          Wed, 14 Jan 2004 20:41:45 -0500
Received: from mdz by mizar.alcor.net with local (Exim 4.30)
	id 1AgwW0-0000TY-SR; Wed, 14 Jan 2004 17:41:44 -0800
Date: Wed, 14 Jan 2004 17:41:44 -0800
From: Matt Zimmerman <mdz@debian.org>
To: Nadim Shaikli <shaikli@yahoo.com>, 227805-done@bugs.debian.org
Subject: Re: Bug#227805: /usr/bin/apt-cache: using a command-line specified sources.list (apt-cache -o, -p oddities)
Message-ID: <20040115014144.GG27204@alcor.net>
References: <[🔎] 20040115011619.3A2AC27ADC@sinaarabeyes.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[🔎] 20040115011619.3A2AC27ADC@sinaarabeyes.org>
User-Agent: Mutt/1.5.5.1+cvs20040105i
Sender: Matt Zimmerman <mdz@alcor.net>
Delivered-To: 227805-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_01_14 
	(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=no 
	version=2.60-bugs.debian.org_2004_01_14
X-Spam-Level: 

On Wed, Jan 14, 2004 at 05:16:19PM -0800, Nadim Shaikli wrote:

> I was trying to query a different sourcelist for a particular package
> without changing my /etc/apt/sources.list.  So I seem to have ventured
> into unchartered terretory.
> 
> I did the following.
> 
> 1. Created a file in /test/my_source, in it I had
> 
> deb ftp://ftp.nerim.net/debian-marillat/ testing main non-free contrib
> 
> The actual URI is immaterial - you can replace 'ftp.nerim.net/debian-marillat'
> with say 'archive.progeny.com/debian' or whatever (same problem).
> 
> 2. I then try to do a search on this new source list file via (as both
>    normal user and 'root'),
> 
> apt-cache -o=Dir::Etc::SourceList=/test/my_source -p /tmp/my_db search moo
> 
> and I get some odd errors about,
> 
> W: Couldn't stat source package list ftp://ftp.nerim.net
> testing/main Packages
> (/var/lib/apt/lists/ftp.nerim.net_debian-marillat_dists_testing_main_binary-i386_Packages)
> - stat (2 No such file or directory)
> 
> which leads me to question why is it going to /var/lib/apt/lists (I did
> use the -p option which ought to be have it be reside somewhere else, no?).
> If I use something that is listed in /var/lib/apt/lists/, I get the following
> error if I run as non-root,

First, you did not run apt-get update (which is why the file does not
exist).  Also, it is using /var/lib/apt/lists because that is the default
value of Dir::State::Lists.  The -p option only controls the location of the
package cache (pkgcache.bin).

> E: Could not open file /var/cache/apt/srcpkgcache.bin - open
> (13 Permission denied)

While you changed the location of the binary package cache with -p, you did
not change the location of the source package cache (-s), which is why it is
trying to open it in the default location.

> The fundemental problem I have with all of this, is that one is unable to
> query outside what is listed in /etc/apt/sources.list and it seems to me
> some of the hooks are there to get that done (or maybe I'm
> misunderstanding things).  It seems that in order to do a search a cache
> file must be generted and to generate a cache file one has to do a
> 'apt-get update' and with the above I would screw my system over, so isn't
> there a way to search a different source list without completely changing
> my system.  If not, why are all those options availble on the command-line
> on 'apt-cache' and 'apt-get' (namely "pkg-cache", "Dir::Etc::SourceList",
> etc) ?

Everything needed is already configurable.

> In passing, apt-cache's (and apt-get's) manpages about the '-o'
> syntax option is VERY confusing.  I believe it needs to be
> '-o=CONF_VAR=value' and not '-o CONF_VAR=value' or '-o=CONF value'
> as is noted in the man page (it would be best if '-o CONF=value'
> was made to work).  In the manpages there is also no mention of
> using multiple '-o' options.  So is '-o=CONF_VAR1=value1
> -o=CONF_VAR2=value2' (ie. two -o on the same command-line) legal ?
> It would be nice if the manpage noted something with this regard.

Both syntaxes are correct; the argument is "CONF_VAR=value", and there is an
optional "=" between the option and its argument.  I think it is implicitly
obvious that the -o option can be used more than once, but if you can find a
good way to clarify this in the man page, send a patch.

-- 
 - mdz



Reply to: