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

Re: apt-get --print-uris in NoLocking mode



On Wed, May 30, 2001 at 03:42:23PM -0500, will trillich wrote:
> On Sun, May 20, 2001 at 01:56:23AM +0200, Santi B?jar wrote:
> >    I try to get a list of all the .deb to be installed (with
> >    --print-uris), but I have to do it like root. I thought that if I add
> > a "-o Debug::NoLocking=yes" would make it possible to run it like
> > user. But I get this:
> > 
> > bash$ apt-get --print-uris -o Debug::NoLocking=yes upgrade
> > E: Unable to write to /var/cache/apt/
> > E: The package lists or status file could not be parsed or opened.
> 
> installing a package is something that'll affect anything from a
> tiny pocket of a remote corner of a dusty drawer in the far
> reaches of your system -- to upgrading your kernel.
> 
> you wouldn't want gomer or floyd or opie to be able to do that,
> now, would you? gotta be root to do root-level things.

Ahh, but Santi's not trying to install, I don't think, but just get
the list of uris (perhaps to pipe to wget); --print-uris is a
glorified^Wenhanced --no-act.  I don't much care if gomer knows my
download queue.  I think you should be able to run this command
without root privileges.

Imagine (guessing on the output format and syntax here):

apt-get --print-uris upgrade | tr " " "\n" | grep ^http | \
  xargs wget && dpkg -i *.deb && rm -rf *.deb

versus 

apt-get --print-uris upgrade | tr " " "\n" | grep ^http | \
  xargs wget && dpkg -i *.deb && rm -rf * .deb
                                        ^^^
Sure, I wouldn't do either of these things, but I can imagine reasons
to do something similar, and I'm such a putz that I'd much rather have
my script execute without any privileges.  I don't see why you need to
be root to get a URL listing.

Rob

-- 
Q:	Heard about the <ethnic> who couldn't spell?
A:	He spent the night in a warehouse.



Reply to: