Re: apt-get --print-uris in NoLocking mode
On Thu, May 31, 2001 at 10:59:53PM -0400, Rob Mahurin wrote: > 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. Hmmm, wait a minute: 10:37 $ apt-get --print-uris -o Debug::NoLocking=yes install proftpd Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: proftpd 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 357kB of archives. After unpacking 897kB will be used. 'ftp://ftp-linux.cc.gatech.edu/pub/linux/distributions/debian/dists/potato/main/binary-i386/net/proftpd_1.2.0pre12 10:38 $ apt-get --print-uris -o Debug::NoLocking=yes install proftpd | grep ^\' | cut -d\' -f 2 | xargs wget --10:42:43-- ftp://ftp-linux.cc.gatech.edu:21/pub/linux/distributions/debian/dists/potato/main/binary-i386/net/pb => `proftpd_1.2.0pre10-2.0potato1.deb' Connecting to ftp-linux.cc.gatech.edu:21... Why can I do this and Santi can't? (My /var/cache/apt doesn't conatain a lock file, but with NoLocking=yes, that shouldn't matter.) Rob -- No small art is it to sleep: it is necessary for that purpose to keep awake all day. -- Nietzsche
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 who couldn't spell? A: He spent the night in a warehouse.
Re: apt-get --print-uris in NoLocking mode
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. -- DEBIAN NEWBIE TIP #2 from Will Trillich <[EMAIL PROTECTED]> : Confused about using "apt-get" to keep your Debian UP-TO-DATE? See http://newbieDoc.sourceForge.net/system/apt-get-intro.html Also see http://newbieDoc.sourceForge.net/ ...
apt-get --print-uris in NoLocking mode
Hi *, I have a problem with apt-get. 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. bash$ ls -la /var/cache/apt/ drwxr-xr-x3 root root 1024 May 19 01:26 ./ drwxr-xr-x7 root root 1024 Mar 22 00:19 ../ drwxr-xr-x3 root root18432 May 19 01:09 archives/ -rw-r-1 root root0 Feb 23 00:04 lock -rw-r--r--1 root root 3114578 May 19 01:26 pkgcache.bin -rw-r--r--1 root root 2967658 May 19 00:35 srcpkgcache.bin And I thing that it must be possible to get. Can someone help me with this? Thank you. Sant --