FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-06-2010, 12:24 PM
Andrei Popescu
 
Default local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}

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.

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 02-07-2010, 12:05 AM
Andrei Popescu
 
Default local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}

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.

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 02-08-2010, 03:06 PM
"Boyd Stephen Smith Jr."
 
Default local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}

In <9ef66fac1002060513q7316011fvececd062063ade1b@mail .gmail.com>, Albretch
Mueller wrote:
>~
> 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, ...}

Right, that's where dpkg keeps information about installed packages. Which
files they own, their pre- and post- install and removal scripts,
alternatives, diversions, etc.

> 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

It's not a cache. It is the information dpkg needs to manipulate a package
during the time it is installed.

> and apt-get(8) does not say a thing about caching files at:
>~
> /var/lib/dpkg

It's not a cache.

> I am not using dpkg to any install packages, just to list installed
>packages a la:

Like Andrei covered, apt-get uses dpkg internally.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
 
Old 02-08-2010, 03:19 PM
"Boyd Stephen Smith Jr."
 
Default local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}

In <9ef66fac1002070041q10da895en25d5be9efb4ede41@mail .gmail.com>, Albretch
Mueller wrote:
>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

As Andrei suggests, this is a bad idea. So, we'd like to attempt to solve
your real problem without executing this bad plan.

>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.

Feel free to mount this from some other read-write location.

> Also dpkg uses those
>folders as kind of caches

They aren't caches. If you delete them, dpkg will no longer have access to
the information...

>(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

No, dpkg doesn't know how anything about /etc/apt/sources.list. In fact, it
has no method *at all* of locating .deb files that aren't passed on the
command-line.

As such, /var/lib/dpkg is required for dpkg to operate on installed packages.
If you remove information from there, your package manager will "forget" it.

For a great example, move /var/lib/dpkg/status to some other location (you'll
want to but it back later) and then try installing the simplest of packages.

> There should be a way to somehow change that directory, without
>poking into the source files

It's unlikely to be useful, but it is already documented in manual section 5,
page "apt.conf".
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
 
Old 02-10-2010, 06:40 PM
Andrei Popescu
 
Default local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}

On Wed,10.Feb.10, 18:56:49, Albretch Mueller wrote:
> ~
> 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

It is not rare that when given the *real* problem a different solution
is found which is easier/more efficient/..., that's why I'm asking.

> 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

Makes sense.

> 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

AFAICT removable storage is always mounted in /media/<label> if it has a
label. Or you can add a custom fstab to the Live CD with a LABEL= entry.

My first thought for the use case you are implying would be to install a
complete Debian on a pen drive. Without bothering too much I was able to
install stable (including X, but no applications) in less than 1 GB
without any compression (the filesystem of a Live CD is usually
compressed).

You would need some more for applications and all X drivers, but I think
it should fit in 2 GB and the smallest pen drives I have seen lately are
at least 4 GB. This means a reasonable amount of additional space.

For older computers which won't boot from USB you can use a CD
containing only /boot (I'm doing this on the same machine running from
the USB stick). That would fit on a business-card size CD if you can
find one (or even better a CD-RW).

If you just need some additional apps on the Live CD consider building
your own image (package live-helper), it's not very difficult.

I'm sure other suggestions can come up if you provide more details about
your use case. GNU/Linux and especially Debian is extremely flexible.

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 02-10-2010, 06:58 PM
Tony Nelson
 
Default local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}

On 10-02-10 13:56:49, Albretch Mueller wrote:
> ~
> 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
> ~
...

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.
...

--
__________________________________________________ __________________
TonyN.:' <mailto:tonynelson@georgeanelson.com>
' <http://www.georgeanelson.com/>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-10-2010, 08:51 PM
"Boyd Stephen Smith Jr."
 
Default local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}

On Wednesday 10 February 2010 15:10:16 Albretch Mueller wrote:
> My whole point is that you can not assume a certain dir structure
> once you plug the micro drive

I can. If you can't, you are doing it wrong. :P

Seriously, if you can get the BIOS to load the bootloader from the USB device,
GRUB 2 should be able to find your kernel based on filesystem UUID, and the
kernel should be able to find your '/' based on the filesystem UUID, and the
startup scripts should be able to find anything else listed in your fstab by
UUID.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
 
Old 02-11-2010, 03:22 AM
"Boyd Stephen Smith Jr."
 
Default local install with apt-get still producing caches in /var/lib/dpkg/{info,alternatives,info, ...}

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.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
 

Thread Tools




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

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org