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

Bug#40230: marked as done (apt can't handle 'file' methods)



Your message dated Tue, 29 Jun 1999 22:13:10 -0600 (MDT)
with message-id <Pine.LNX.3.96.990629221224.11028L-100000@Wakko.deltatee.com>
and subject line Fixed..
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'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Ian Jackson
(administrator, Debian bugs database)

Received: (at submit) by bugs.debian.org; 26 Jun 1999 22:28:28 +0000
Received: (qmail 8454 invoked from network); 26 Jun 1999 22:28:28 -0000
Received: from merle.acns.nwu.edu (129.105.16.57)
  by master.debian.org with SMTP; 26 Jun 1999 22:28:28 -0000
Received: from localhost (bjo748@localhost)
	by merle.acns.nwu.edu (8.8.7/8.8.7) with SMTP id RAA07552
	for <submit@bugs.debian.org>; Sat, 26 Jun 1999 17:28:27 -0500 (CDT)
Date: Sat, 26 Jun 1999 17:28:27 -0500 (CDT)
From: Brad Jorsch <bjo748@merle.acns.nwu.edu>
Reply-To: Brad Jorsch <bjo748@merle.acns.nwu.edu>
To: submit@bugs.debian.org
Subject: apt can't handle 'file' methods
Message-ID: <[🔎] Pine.HPP.3.93.990626165701.1351A-100000@merle.acns.nwu.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Package: apt
Version: 0.3.9

I keep a few locally-build deb files in /usr/local/debs (e.g. kernels from
make-kpkg), and use dpkg-scanpackages to create a Package file so dselect
won't claim they're all "obsolete/local".

In my /etc/apt/sources.list, i have the following line to read that
packages file:
deb file:/usr/local debs/

When i try to use the apt method in dselect or apt-get update, it gives
the following error messages:
  Err file:/usr/local/ debs/ Packages
    Invalid URI, local URIS must not start with //
  Ign file:/usr/local/ debs/ Release  

I decided to look in the source to find out the proper format for a file
line. It appears that the file method (methods/file.cc) expects the Host
field of the URI parsed from sources.list to be empty, and this is somehow
not happening. Next, i looked in apt-pkg/contrib/strutl.cc at the
function CopyFrom, to determine how the file line was being parsed.

On line 718 of strutl.cc (downloaded from ftp.debian.org), the function
makes this check:
   if (At == SingleSlash)
It turns out that, when parsing a line "file:/usr/local debs", At is
actually one greater than SingleSlash! This confuses the function, and it
ends up assigning "sr/local debs/" to Host (and "/" to User).

I propose that the above line 718 be changed as follows:
   if (At >= SingleSlash)
This way, the URI will be correctly parsed.

I'm using potato with a custom kernel 2.2.10.


Reply to: