Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...} (http://www.linux-archive.org/debian-user/321714-local-install-apt-get-still-producing-caches-var-lib-dpkg-info-alternatives-info.html)

Albretch Mueller 02-06-2010 12:13 PM

local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}
 
~
After taking snapshots of my file system before and after
installations using apt-get, I noticed lots of files in:
~
/var/lib/dpkg/{info,alternatives,info, ...}
~
relating to the files I installed, but those files I had grabbed
locally like this:
~
_SL=<some partial local repo/directory>
apt-get update -o Dir::Etc::SourceList=${_SL}
apt-get install -y -V -o Dir::Etc::SourceList=${_SL} kate
~
dpkg does have an admindir option to set the temporary local cache
~
# dpkg --help | grep admindir
--admindir=<directory> Use <directory> instead of /var/lib/dpkg.
~
but I don't see an "admindir" option in apt-get
~
# apt-get --help | grep admindir
# apt-get --help | grep admin
# apt-get --help | grep var
~
and apt-get(8) does not say a thing about caching files at:
~
/var/lib/dpkg
~
I am not using dpkg to any install packages, just to list installed
packages a la:
~
dpkg -l > dpkg00.txt
~
using the "clean" option of apt-get may delete the deb installation
files I do keep locally
~
How do I set the "/var/lib/dpkg" directory to be used by apt-get?
~
How is it being set to beging with if I don't explicitly use dpkg to
install packages?
~
Thank you
lbrtchx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Albretch Mueller 02-06-2010 09:37 PM

local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}
 
On Sat, Feb 6, 2010 at 1:24 PM, Andrei Popescu <andreimpopescu@gmail.com> wrote:
> On Sat,06.Feb.10, 13:13:33, Albretch Mueller wrote:
>
>> *How is it being set to beging with if I don't explicitly use dpkg to
>> install packages?
>
> Only dpkg installs packages. APT "just" takes care of resolving
> dependencies and downloading the apropiate .deb files which are then
> passed to dpkg.
~
I see but I can't find out how to change that directory, which is
what I need ;-)
~
lbrtchx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Albretch Mueller 02-07-2010 07:41 AM

local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}
 
On Sun, Feb 7, 2010 at 1:05 AM, Andrei Popescu <andreimpopescu@gmail.com> wrote:
> On Sat,06.Feb.10, 22:37:13, Albretch Mueller wrote:
>> On Sat, Feb 6, 2010 at 1:24 PM, Andrei Popescu <andreimpopescu@gmail.com> wrote:
>> > On Sat,06.Feb.10, 13:13:33, Albretch Mueller wrote:
>> >
>> >> *How is it being set to beging with if I don't explicitly use dpkg to
>> >> install packages?
>> >
>> > Only dpkg installs packages. APT "just" takes care of resolving
>> > dependencies and downloading the apropiate .deb files which are then
>> > passed to dpkg.
>> ~
>> *I see but I can't find out how to change that directory, which is
>> what I need ;-)
>> ~
>
> What exactly are you trying to achieve? Maybe there is a better way.
~
Well, as I said, I need to reset the default "/var/lib/dpkg"
directory to be used by apt-get/dpkg and the reason why I need to do
so is because if you are using a liveCD then that directory will
actually be:
~
"<ramdisk>/var/lib/dpkg"
~
which eats on your system's resources badly. Also dpkg uses those
folders as kind of caches (as if you were downloading files off a
network/the Internet), but if you have those files on your local file
system then that strategy doesn't make much sense
~
There should be a way to somehow change that directory, without
poking into the source files
~
Thanks
lbrtchx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Albretch Mueller 02-10-2010 05:56 PM

local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}
 
~
I get those "what are you really trying to do?" questions all the
time. Let me start by explaining to you, why I do things in a certain
way
~
I love live CDs and use them all the time. I carry one of them, my
pen drive and/or my external micro drive almost everywhere in one of
my pockets. I am not the kind of person that could be carrying a
laptop around if I have to carry something I would rather carry a good
book
~
live CDs actually mount "/" in "/ramdisk" (or similarly) so any work
you do you may lose since it is not saved in an actual drive
~
I am trying to tax RAM the possibly least I can, because I usually
have more than one long running program needing resources in my home
computer(s)
~
When I get to some place with a free x86 seat (I teach), sometimes
you can restart/reboot it, but sometimes you can not. When you can,
usually you have no way of knowing which drives/partitions may
correspond to your micro drive
~
I used RootDir as you suggested and did a few changes that were
explicitly enough reported by apt-get, but then I got the following
error:
~
E: Read error - read (21: Is a directory)
~
which is cryptic to me. I included a log of what I did bellow
~
How can I fix this error?
~
Thanks
lbrtchx
~
# apt-get update -o RootDir=/media/sdb2/inst/sw/deb -o
Dir::Etc::SourceList=/etc/apt/local00_sources.list
Ign file: i386/ Release.gpg
Ign file: i386/ Release
Reading package lists... Error!
E: Read error - read (21: Is a directory)
E: The package lists or status file could not be parsed or opened.
~
# cat /media/sdb2/inst/sw/deb/etc/apt/local00_sources.list
deb file:/media/sdb2/inst/sw/deb/arc i386/
~
# ls -l /media/sdb2/inst/sw/deb/arc/i386
total 412628
-rw-r--r-- 1 root root 93861 Jan 25 05:51 Packages.gz
-rw-r--r-- 1 root root 45730 Jan 8 17:32 acpid_1%3a2.0.0-2_i386.deb
...
-rw-r--r-- 1 root root 75952 Dec 28 21:22 zlib1g_1%3a1.2.3.4.dfsg-3_i386.deb
~


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Albretch Mueller 02-10-2010 08:10 PM

local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}
 
> Googling "debian live cd persist" shows:
>
> http://wiki.debian.org/DebianLive/Howto/Custom_Install
>
>> Purpose
>>
>> Do a custom install of Debian Live on a removable flash drive or hard
>> disc with a persistent home directory or entire root filesystem, and
>> create a partition for sharing documents or files with other
>> operating systems.
~
OK, let's not even get into the assumptions this generally useful
Howto and you are making
~
on a pen drive you can not actually keep as much data as some local
debian repo would need (a micro drive would nicely do) and or you
would like
~
My whole point is that you can not assume a certain dir structure
once you plug the micro drive
~
It is kind of funy to see how one naturally thinks there should be
something wrong with someone who doesn't do things the way "I"
understand
~
lbrtchx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Albretch Mueller 02-10-2010 08:14 PM

local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}
 
~
I did strace the process run by the script
~
strace -e trace=open,read,write -s 8192 -o debug.webserver.txt sh ./ri08.sh
~
but I can not see what is producing the "(21: Is a directory)" error
~
apt-get update -o RootDir=/media/sdb2/inst/sw/deb -o
Dir::Etc::SourceList=/etc/apt/local00_sources.list
Ign file: i386/ Release.gpg
Ign file: i386/ Release
Reading package lists... Error!
E: Read error - read (21: Is a directory)
E: The package lists or status file could not be parsed or opened.
~
I will have to strace the running process and all other process
launched from it I guess
~
THanks
lbrtchx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Albretch Mueller 02-11-2010 03:00 AM

local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}
 
> ... GRUB 2 should be able to find your kernel based on filesystem UUID
~
Boyd, how am I gona know the filesystem UUID of a machine I have
never used? ;-)
~
Also from their own manual:
~
http://grub.enbug.org/Manual
~
UUID entries - Test these first. They are automatically generated by
some grub.d scripts. Sometimes they don't work
~
Since you mentioned GRUB 2 to which extent can you probe a box using
it? I addition to fs UUID entries it would be great if they had some
way of probing hardware a bit more. Remember that I want to be able to
sit on any x86-based box and be good to go
~
Thanks
lbrtchx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Albretch Mueller 02-11-2010 02:49 PM

local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}
 
On Thu, Feb 11, 2010 at 4:22 AM, Boyd Stephen Smith Jr.
<bss@iguanasuicide.net> wrote:
> In <9ef66fac1002102000u63567764s84a867b7376c487f@mail .gmail.com>, Albretch
> Mueller wrote:
>>> ... GRUB 2 should be able to find your kernel based on filesystem UUID
>>
>> Boyd, how am I gona know the filesystem UUID of a machine I have
>>never used? ;-)
>
> The only filesystems you need (for booting and package installation) should be
> on the USB device. *The filesystem UUID for those won't change from machine to
> machine.
~
Thank you Boyd I just tested if my external microdrive would report
its UUID and it did
~
# blkid /dev/sdc1
/dev/sdc1: UUID="7a3f9c93-f08f-4585-b86e-1e02df8ef133" SEC_TYPE="ext2"
TYPE="ext3"
~
I will have to customize a live CD to automatically use some start up
kernel options depending on either probes or my selection. cheatcodes
passed to the kernel have repeatedly saved my life
~
lbrtchx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 02:00 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.