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 Development

 
 
LinkBack Thread Tools
 
Old 02-03-2011, 11:10 PM
Stanislav Maslovski
 
Default does aptitude really need to lock the status database when downloading?

Hi debian-devel,

I wanted to ask this for quite a long time: Does aptitude (I think
apt-get does the same) really have to lock "the status database area"
when _downloading_ packages?

For example, I am running an update on a slow connection and want to
uninstall or install with dpkg a few packages while the others are
being downloaded. Should not this be possible? I understand that there
can be a situation that a dependency could be affected by such an
action, but is not it easy to check for this right before unpacking?

--
Stanislav


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110204001054.GA31724@kaiba.homelan">http://lists.debian.org/20110204001054.GA31724@kaiba.homelan
 
Old 02-03-2011, 11:21 PM
Eduard Bloch
 
Default does aptitude really need to lock the status database when downloading?

#include <hallo.h>
* Stanislav Maslovski [Fri, Feb 04 2011, 03:10:54AM]:
> Hi debian-devel,
>
> I wanted to ask this for quite a long time: Does aptitude (I think
> apt-get does the same) really have to lock "the status database area"
> when _downloading_ packages?
>
> For example, I am running an update on a slow connection and want to
> uninstall or install with dpkg a few packages while the others are
> being downloaded. Should not this be possible? I understand that there
> can be a situation that a dependency could be affected by such an
> action, but is not it easy to check for this right before unpacking?

If you want to have that level of control, why don't you just check it
manually? Use --download-only with apt-get (no dpkg locking this way)
and when it's done, use apt-get without it to install the packages after
making sure that there is no dpkg active anymore.

Regards,
Eduard.

--
Wir lassen uns beide von unseren Frauen scheiden und ziehen zusammen.
-- Toni Polster (über sein verbessertes Verhältnis zu Trainer Peter Neururer)


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110204002107.GA14615@rotes76.wohnheim.uni-kl.de">http://lists.debian.org/20110204002107.GA14615@rotes76.wohnheim.uni-kl.de
 
Old 02-04-2011, 01:29 AM
Julian Taylor
 
Default does aptitude really need to lock the status database when downloading?

On Fri, 2011-02-04 at 03:10 +0300, Stanislav Maslovski wrote:
> Hi debian-devel,
>
> I wanted to ask this for quite a long time: Does aptitude (I think
> apt-get does the same) really have to lock "the status database area"
> when _downloading_ packages?
>
> For example, I am running an update on a slow connection and want to
> uninstall or install with dpkg a few packages while the others are
> being downloaded. Should not this be possible? I understand that there
> can be a situation that a dependency could be affected by such an
> action, but is not it easy to check for this right before unpacking?
>
> --
> Stanislav
>
>

FYI,
There is a blueprint in ubuntu aimed for natty concerning this feature:
https://blueprints.launchpad.net/ubuntu/+spec/other-foundations-n-update-manager-incremental-updates
>support downloading in parallel while upgrading the chunks: TODO

Regards,
Julian
 
Old 02-04-2011, 07:39 AM
Adam Borowski
 
Default does aptitude really need to lock the status database when downloading?

On Fri, Feb 04, 2011 at 03:29:14AM +0100, Julian Taylor wrote:
> On Fri, 2011-02-04 at 03:10 +0300, Stanislav Maslovski wrote:
> > For example, I am running an update on a slow connection and want to
> > uninstall or install with dpkg a few packages while the others are
> > being downloaded. Should not this be possible? I understand that there
> > can be a situation that a dependency could be affected by such an
> > action, but is not it easy to check for this right before unpacking?
>
> FYI,
> There is a blueprint in ubuntu aimed for natty concerning this feature:
> https://blueprints.launchpad.net/ubuntu/+spec/other-foundations-n-update-manager-incremental-updates
> >support downloading in parallel while upgrading the chunks: TODO

While somewhat worse as it pauses the download, here's what I used to do in
the days of slow links and no apt cache:

apt-get xxx --no-download --fix-missing

It does what it can do with already downloaded packages, silently ignoring
the rest.

--
1KB // Microsoft corollary to Hanlon's razor:
// Never attribute to stupidity what can be
// adequately explained by malice.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110204083959.GA8233@angband.pl">http://lists.debian.org/20110204083959.GA8233@angband.pl
 
Old 02-04-2011, 07:57 AM
Stanislav Maslovski
 
Default does aptitude really need to lock the status database when downloading?

On Fri, Feb 04, 2011 at 01:21:07AM +0100, Eduard Bloch wrote:
> #include <hallo.h>
> * Stanislav Maslovski [Fri, Feb 04 2011, 03:10:54AM]:
> > Hi debian-devel,
> >
> > I wanted to ask this for quite a long time: Does aptitude (I think
> > apt-get does the same) really have to lock "the status database area"
> > when _downloading_ packages?
> >
> > For example, I am running an update on a slow connection and want to
> > uninstall or install with dpkg a few packages while the others are
> > being downloaded. Should not this be possible? I understand that there
> > can be a situation that a dependency could be affected by such an
> > action, but is not it easy to check for this right before unpacking?
>
> If you want to have that level of control, why don't you just check it
> manually? Use --download-only with apt-get (no dpkg locking this way)
> and when it's done, use apt-get without it to install the packages after
> making sure that there is no dpkg active anymore.

This is possible, however, it is an extra busy work for a user. In any
case, I think that holding a lock only for downloading is an overkill
and this can be relaxed.

As Julian Taylor mentioned, there is also another side of the same
problem: aptitude itself can be improved so that it is able to
download and unpack in parallel. If it were doing this then the lock
would be justified.

--
Stanislav


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110204085722.GA6573@kaiba.homelan">http://lists.debian.org/20110204085722.GA6573@kaiba.homelan
 
Old 02-04-2011, 08:00 AM
Olaf van der Spek
 
Default does aptitude really need to lock the status database when downloading?

On Fri, Feb 4, 2011 at 9:57 AM, Stanislav Maslovski
<stanislav.maslovski@gmail.com> wrote:
> This is possible, however, it is an extra busy work for a user. In any
> case, I think that holding a lock only for downloading is an overkill
> and this can be relaxed.

What if you would launch two download-only ops at the same time?
Isn't a lock needed in that case as well?

--
Olaf


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTimgXJ6vtx5QX8XDBzUAaOxb+jgbn0jUZ2tyaOG0@mail .gmail.com">http://lists.debian.org/AANLkTimgXJ6vtx5QX8XDBzUAaOxb+jgbn0jUZ2tyaOG0@mail .gmail.com
 
Old 02-04-2011, 08:05 AM
Adam Borowski
 
Default does aptitude really need to lock the status database when downloading?

On Fri, Feb 04, 2011 at 10:00:40AM +0100, Olaf van der Spek wrote:
> On Fri, Feb 4, 2011 at 9:57 AM, Stanislav Maslovski
> <stanislav.maslovski@gmail.com> wrote:
> > This is possible, however, it is an extra busy work for a user. In any
> > case, I think that holding a lock only for downloading is an overkill
> > and this can be relaxed.
>
> What if you would launch two download-only ops at the same time?
> Isn't a lock needed in that case as well?

A per-file lock, yeah. Nothing more.

--
1KB // Microsoft corollary to Hanlon's razor:
// Never attribute to stupidity what can be
// adequately explained by malice.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110204090537.GA8617@angband.pl">http://lists.debian.org/20110204090537.GA8617@angband.pl
 
Old 02-04-2011, 08:23 AM
Stanislav Maslovski
 
Default does aptitude really need to lock the status database when downloading?

On Fri, Feb 04, 2011 at 10:00:40AM +0100, Olaf van der Spek wrote:
> On Fri, Feb 4, 2011 at 9:57 AM, Stanislav Maslovski
> <stanislav.maslovski@gmail.com> wrote:
> > This is possible, however, it is an extra busy work for a user. In any
> > case, I think that holding a lock only for downloading is an overkill
> > and this can be relaxed.
>
> What if you would launch two download-only ops at the same time?
> Isn't a lock needed in that case as well?

That should a different lock. Currently, when _dowloading_ aptitude
holds a lock that prevents _installing_.

--
Stanislav


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110204092307.GA10851@kaiba.homelan">http://lists.debian.org/20110204092307.GA10851@kaiba.homelan
 
Old 02-04-2011, 10:38 AM
David Kalnischkies
 
Default does aptitude really need to lock the status database when downloading?

On Fri, Feb 4, 2011 at 01:10, Stanislav Maslovski
<stanislav.maslovski@gmail.com> wrote:
> For example, I am running an update on a slow connection and want to
> uninstall or install with dpkg a few packages while the others are
> being downloaded. Should not this be possible? I understand that there
> can be a situation that a dependency could be affected by such an
> action, but is not it easy to check for this right before unpacking?

As always, the (small) APT team is happy to apply well crafted patches.
(and i am sure that is true for aptitude as well)

The usecase is so small that until now nobody cared to jump through
the holes to ensure that the calculation done before the download is
still valid after the download and if not recalculate it.
So feel free to tackle it.

Remember that a recalculation will require to check that nothing is changed
in regards to the dependency tree: If we would need to use another path
we also install/remove other packages so we need to re-ask if the
solution is okay, downloading again, recalculating, …
Which breaks the user-interface as nobody (no user and no program)
expects a second (and third and so on) question round.
But beside that: Yes, it is easy.


Workarounds were already presented, so i just want to add that you can
also disable locking completely with Debug::NoLocking in apt-get
(i guess aptitude accepts it also, but i haven't test it)
if you are feeling *extremely* lucky…


Best regards

David Kalnischkies


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinA=rrDoyEXMWNukEOmxDMW+7Jor7WB96C1pCMq@mail .gmail.com">http://lists.debian.org/AANLkTinA=rrDoyEXMWNukEOmxDMW+7Jor7WB96C1pCMq@mail .gmail.com
 
Old 02-04-2011, 10:47 AM
Fernando Lemos
 
Default does aptitude really need to lock the status database when downloading?

On Fri, Feb 4, 2011 at 6:57 AM, Stanislav Maslovski
<stanislav.maslovski@gmail.com> wrote:
[...]
>> If you want to have that level of control, why don't you just check it
>> manually? Use --download-only with apt-get (no dpkg locking this way)
>> and when it's done, use apt-get without it to install the packages after
>> making sure that there is no dpkg active anymore.
>
> This is possible, however, it is an extra busy work for a user. In any
> case, I think that holding a lock only for downloading is an overkill
> and this can be relaxed.

As far as I can tell (and please correct me if I'm wrong), when you
do, say, an "apt-get upgrade", apt prepares an upgrade "plan" that
uses a given set of packages. If apt wouldn't lock and parallel to
that you do an "apt-get install", for example, the original "plan"
might not be valid anymore (e.g., new "Breaks" or "Conflicts" were
introduced). So a new plan would have to be created, the user would
have to be asked for confirmation again. Doesn't sound that great.

> As Julian Taylor mentioned, there is also another side of the same
> problem: aptitude itself can be improved so that it is able to
> download and unpack in parallel. If it were doing this then the lock
> would be justified.

As far as I know, apt-get already downloads in parallel. Not sure
about aptitude.

Regards,


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTim31Hson4sEw-zVtkowQmyhkFAu=a+UmmoemCZ1@mail.gmail.com">http://lists.debian.org/AANLkTim31Hson4sEw-zVtkowQmyhkFAu=a+UmmoemCZ1@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 09:39 AM.

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