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 11-19-2010, 04:55 AM
Jason Heeris
 
Default Preventing installation of specific virtual packages

This originally arose from a discussion on debian-live[1] (sorry to
anyone who reads both lists, but it seemed more appropriate to
continue this tangent here).

I wanted to block installation of a couple of recommended packages in
the chroot stage of a live-build, while letting all other recommends
be installed as usual. It was suggested that I use apt-pinning to do
this, like so:

----
Package: whatever
Pin: release *
Pin-Priority: -1
----

However, one of those recommended packages is "default-mta |
mail-transport-agent". I tried:

----
Package: default-mta
Pin: release *
Pin-Priority: -1

Package: mail-transport-agent
Pin: release *
Pin-Priority: -1
----

But this has no effect — exim4-daemon-light still gets installed,
despite only being recommended. Is it possible to use pinning to do
this, or another method involving apt(itude) configuration? I'd rather
avoid an equivs package or the like, because that adds extra steps to
the build process (and I can't just zip up my config area and use it
elsewhere, I need to carry any equiv sources around too).

Cheers,
Jason

[1] http://lists.debian.org/debian-live/2010/11/msg00147.html


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTi=+in4ZdCL0X8bJwW9X+ruMs8BzB314extJd0Ni@mail .gmail.com">http://lists.debian.org/AANLkTi=+in4ZdCL0X8bJwW9X+ruMs8BzB314extJd0Ni@mail .gmail.com
 
Old 11-19-2010, 05:03 AM
Alan Ianson
 
Default Preventing installation of specific virtual packages

On Fri, 2010-11-19 at 13:55 +0800, Jason Heeris wrote:
> This originally arose from a discussion on debian-live[1] (sorry to
> anyone who reads both lists, but it seemed more appropriate to
> continue this tangent here).
>
> I wanted to block installation of a couple of recommended packages in
> the chroot stage of a live-build, while letting all other recommends
> be installed as usual. It was suggested that I use apt-pinning to do
> this, like so:
>
> ----
> Package: whatever
> Pin: release *
> Pin-Priority: -1
> ----
>
> However, one of those recommended packages is "default-mta |
> mail-transport-agent". I tried:
>
> ----
> Package: default-mta
> Pin: release *
> Pin-Priority: -1
>
> Package: mail-transport-agent
> Pin: release *
> Pin-Priority: -1
> ----
>
> But this has no effect — exim4-daemon-light still gets installed,
> despite only being recommended. Is it possible to use pinning to do
> this, or another method involving apt(itude) configuration? I'd rather
> avoid an equivs package or the like, because that adds extra steps to
> the build process (and I can't just zip up my config area and use it
> elsewhere, I need to carry any equiv sources around too).

Aptitude installs recommends by default. That can be turned off in
"Options -> Preferences -> Dependency handling -> Install recommended
packages automatically".

I have never turned the option off myself so I'm not sure if it'll do
what you need but you could try if you haven't already.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1290146594.11491.3.camel@debian.ok.shawcable.net"> http://lists.debian.org/1290146594.11491.3.camel@debian.ok.shawcable.net
 
Old 11-19-2010, 05:25 AM
Jason Heeris
 
Default Preventing installation of specific virtual packages

On 19 November 2010 14:03, Alan Ianson <agianson@gmail.com> wrote:
> Aptitude installs recommends by default. That can be turned off in
> "Options -> Preferences -> Dependency handling -> Install recommended
> packages automatically".

I still want to install *most* recommends, just not quite *all*. So
turning this option off makes a lot of extra work for me :/

— Jason


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTike0+d2R76gm7-oSqWMFpMM8n1666KAsNsXg0uw@mail.gmail.com">http://lists.debian.org/AANLkTike0+d2R76gm7-oSqWMFpMM8n1666KAsNsXg0uw@mail.gmail.com
 
Old 11-19-2010, 09:17 AM
Camalen
 
Default Preventing installation of specific virtual packages

On Fri, 19 Nov 2010 14:25:27 +0800, Jason Heeris wrote:

> On 19 November 2010 14:03, Alan Ianson <agianson@gmail.com> wrote:
>> Aptitude installs recommends by default. That can be turned off in
>> "Options -> Preferences -> Dependency handling -> Install recommended
>> packages automatically".
>
> I still want to install *most* recommends, just not quite *all*. So
> turning this option off makes a lot of extra work for me :/

Good question.

How can be blocked the installation of a package that is not installed?

Something like having a "global switch" that prevents any of dpkg, apt-
get, aptitude... to get a package going through and warns the user about
it.

Greetings,

--
Camalen


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.11.19.10.17.06@gmail.com">http://lists.debian.org/pan.2010.11.19.10.17.06@gmail.com
 
Old 11-19-2010, 09:24 AM
Jason Heeris
 
Default Preventing installation of specific virtual packages

On 19 November 2010 18:17, Camaleón <noelamac@gmail.com> wrote:
> Something like having a "global switch" that prevents any of dpkg, apt-
> get, aptitude... to get a package going through and warns the user about
> it.

It doesn't need to be global, something that works with either apt or
aptitude will do, since these are the tools that can be used for
live-build to create the image.

Warning the user would be pointless though, since it's not an
interactive process.

— Jason


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinKnbVQu-qsjpruWsGKf6waY2P1XBWFDt08v1SD@mail.gmail.com">htt p://lists.debian.org/AANLkTinKnbVQu-qsjpruWsGKf6waY2P1XBWFDt08v1SD@mail.gmail.com
 
Old 11-19-2010, 09:39 AM
Camalen
 
Default Preventing installation of specific virtual packages

On Fri, 19 Nov 2010 18:24:36 +0800, Jason Heeris wrote:

> On 19 November 2010 18:17, Camalen wrote:
>> Something like having a "global switch" that prevents any of dpkg, apt-
>> get, aptitude... to get a package going through and warns the user
>> about it.
>
> It doesn't need to be global, something that works with either apt or
> aptitude will do, since these are the tools that can be used for
> live-build to create the image.

It has to be global in order to affect all package manager tools. If not,
when a user installs a package by other means, the "tabu" one could be
also installed and that should be prevented.

> Warning the user would be pointless though, since it's not an
> interactive process.

Not all updates/installations are fully interactive. There can be
situations when manual intervention is required. So, if a package policy
is being applied and the user has deciced to block the installation of a
bunch of packages but these packages pull another packages that are
marked as "tabu", a warning message should be displayed to the user,
asking what to do (just in case of conflicts, broken dependencies or
problems).

Note that I'm not talking here about just _your concrete_ situation, this
option could be useful for everyone.

Greetings,

--
Camalen


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2010.11.19.10.39.19@gmail.com">http://lists.debian.org/pan.2010.11.19.10.39.19@gmail.com
 
Old 11-19-2010, 09:51 AM
Jason Heeris
 
Default Preventing installation of specific virtual packages

On 19 November 2010 18:39, Camaleón <noelamac@gmail.com> wrote:
>> On 19 November 2010 18:17, Camaleón wrote:
> It has to be global in order to affect all package manager tools. If not,
> when a user installs a package by other means, the "tabu" one could be
> also installed and that should be prevented.

Well, I'm speaking specifically of the way aptitude/apt works as
invoked by live-build to populate the chroot... once the distro is
built, I don't care if someone installs the package or not (although
since it's mainly for personal use, I'm unlikely to change my mind).

Note that live-build uses one set of settings to create the initial
image (eg. use a local mirror) but separate settings for the live
image itself. The more general case of a single, static system would
require a global mechanism, yes.

(What would be really tricky is per-package settings. I always thought
that there should be a range for the pin priority that says "don't
install if only recommended, but do install for a strict
dependence"...)

— Jason


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTin9U6v1bANxvVZU=KpU9u4XNQuHKuRTbQ8JLaAj@mail .gmail.com">http://lists.debian.org/AANLkTin9U6v1bANxvVZU=KpU9u4XNQuHKuRTbQ8JLaAj@mail .gmail.com
 
Old 11-19-2010, 10:58 PM
Javier Barroso
 
Default Preventing installation of specific virtual packages

On Fri, Nov 19, 2010 at 11:17 AM, Camalen <noelamac@gmail.com> wrote:
> On Fri, 19 Nov 2010 14:25:27 +0800, Jason Heeris wrote:
>
>> On 19 November 2010 14:03, Alan Ianson <agianson@gmail.com> wrote:
>>> Aptitude installs recommends by default. That can be turned off in
>>> "Options -> Preferences -> Dependency handling -> Install recommended
>>> packages automatically".
>>
>> I still want to install *most* recommends, just not quite *all*. So
>> turning this option off makes a lot of extra work for me :/
>
> Good question.
>
> How can be blocked the installation of a package that is not installed?
Pinning it to a negative number [1]? (I didn't try it)

Regards,
[1] http://wiki.debian.org/AptPreferences#NotesfromJoshuaRodman


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTinnKzLf=VSDL56Zw3D8fPghWFYp6e91n6XFhqHD@mail .gmail.com">http://lists.debian.org/AANLkTinnKzLf=VSDL56Zw3D8fPghWFYp6e91n6XFhqHD@mail .gmail.com
 
Old 11-20-2010, 07:58 AM
Jason Heeris
 
Default Preventing installation of specific virtual packages

On 20 November 2010 07:58, Javier Barroso <javibarroso@gmail.com> wrote:
>> How can be blocked the installation of a package that is not installed?
> Pinning it to a negative number [1]? (I didn't try it)

This will work for a normal package, but not for a virtual package,
which is my original problem.

Cheers,
Jason


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTin0P6AsdSq_t6R45eoJXTGrgdXa7H0KLorFicX_@mail .gmail.com">http://lists.debian.org/AANLkTin0P6AsdSq_t6R45eoJXTGrgdXa7H0KLorFicX_@mail .gmail.com
 
Old 11-20-2010, 09:10 AM
"Boyd Stephen Smith Jr."
 
Default Preventing installation of specific virtual packages

On Saturday 20 November 2010 02:58:32 Jason Heeris wrote:
> On 20 November 2010 07:58, Javier Barroso <javibarroso@gmail.com> wrote:
> >> How can be blocked the installation of a package that is not installed?
> >
> > Pinning it to a negative number [1]? (I didn't try it)
>
> This will work for a normal package, but not for a virtual package,
> which is my original problem.

I think you'll just have to use this method to blacklist all the providers of
that virtual package, sorry.

It is easy enough to find a list of the current providers of a virtual, but
you might have to update you pinning whenever a new package is added that
provides the virtual you don't want pulled in as a recommend.
--
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 09:12 AM.

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