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

Bug#47379: [patch] local install



On Mon, Jan 26, 2004 at 11:15:39AM -0800, Matt Zimmerman wrote:
> On Mon, Dec 08, 2003 at 12:46:27PM +0100, Michael Vogt wrote:
> > I attached a patch against apt-0.5.14 that makes local installs
> > possible. It's proof-of-concept for now and has a _ugly_ hack in
> > it when generating the tagfile for the given debian package. 
> > Nothing that can't be fixed, I just wanted to post it as it is so we
> > can start discussing how to improve it.
> > 
> > It's very much inspired by how apt-rpm does it. It works for local
> > .deb files only for now. Apt-rpm has support for build-dep, source,
> > http and ftp too. We can add this later once the patch is cleaned up.  
> > 
> > I don't know if the patch will break the ABI. I add a new
> > debSinglePkgIndex class in deb/debindexfile.h
> 
> Thanks for the patch.  If it's going to call out to dpkg, I think it should
> definitely use popen or fork/exec rather than system() and a temporary file,
> but that's easy to fix.

Thanks for your reply.

It really shouldn't call dpkg that way. This was the "_ugly_ hack" I
talked about when I first send in the patch. It was just a
proof-of-concept and the easiest way for me to get the required
information. 

This is the relevant part:

+    // create file fd
+    FileFd Pkg(FieldsFile,FileFd::ReadOnly);
+
+    debListParser Parser(&Pkg);

We need a FileFd that contains the needed tags. In what way we obtain
the tags is irrelevant of course. I hope we find a better way than the
above for this :)
 
> The changes to srcrecords.cc and apt-get.cc seem unrelated; were they
> intentional?

srcrecords.cc is in by accident. The apt-rpm version can do stuff
like: 
% apt-get build-dep apt-listchanges-1.49-11104cl.src.rpm
which I didn't tackled.

I'm not entirely sure about apt-get.cc. I think it was needed, but I
can retest it. 

thanks,
 Michael

-- 
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo



Reply to: