Re: How to make a meta package unremovable?
On Thu, Jun 9, 2011 at 22:54, Erik Schanze (Debian) schan...@gmx.de wrote: Does anybody have an additionally idea how to solve this, to prevent the removal of one package without hanging on user input and prevent automatic inclusion in PBuilder installation? With my APT hat on i can tell you that APT (and friends) currently have no option to forbid the removal of packages without other side-effects. You can set a package on hold, so that it will not be removed, but it will also not be considered for an upgrade. (You can use this in you pbuilder - set the non-installed package on hold and it will not be considered for installation) For essentials you have already listed the problems with it. What could be done is tweaking resolver scoring points, but honestly: that is black-magic even for me -- and as you can only change this for priorities it has side-effects for other packages with this priority and these would be still allowed to remove your package… (i said this only for completeness, i would not recommend to even try it) So, back to square one: Interesting feature. I might give it a try for next or next-next abi break (pkgDepCache::IsDeleteOk() can be used for this, but if it's implemented similar to APT::NeverAutoRemove we will need aggressive caching or some operations will get horrible slow - e.g. aptitude would love it) Best regards David Kalnischkies -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/BANLkTi=pqifezko-pghssrzb+jued8a...@mail.gmail.com
Re: How to make a meta package unremovable?
David Kalnischkies kalnischk...@gmail.com writes: On Thu, Jun 9, 2011 at 22:54, Erik Schanze (Debian) schan...@gmx.de wrote: Does anybody have an additionally idea how to solve this, to prevent the removal of one package without hanging on user input and prevent automatic inclusion in PBuilder installation? [...] What could be done is tweaking resolver scoring points, but honestly: that is black-magic even for me -- and as you can only change this for priorities it has side-effects for other packages with this priority and these would be still allowed to remove your package… (i said this only for completeness, i would not recommend to even try it) sbuild seems to use this when installing build dependencies with the aptitude-based resolver. It passes -o Aptitude::ProblemResolver::Hints::KeepDummy=reject $dummy_pkg_name :UNINST along with some other options (cf. lib/Sbuild/AptitudeResolver.pm in the sbuild source package). I don't know whether one wants to use this somewhere else or not. Regards, Ansgar -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87y616c5x6@marvin.43-1.org
Re: How to make a meta package unremovable?
2011/6/13 Ansgar Burchardt ans...@debian.org: David Kalnischkies kalnischk...@gmail.com writes: What could be done is tweaking resolver scoring points, but honestly: that is black-magic even for me -- and as you can only change this for priorities it has side-effects for other packages with this priority and these would be still allowed to remove your package… (i said this only for completeness, i would not recommend to even try it) sbuild seems to use this when installing build dependencies with the aptitude-based resolver. It passes -o Aptitude::ProblemResolver::Hints::KeepDummy=reject $dummy_pkg_name :UNINST along with some other options (cf. lib/Sbuild/AptitudeResolver.pm in the sbuild source package). I don't know whether one wants to use this somewhere else or not. Thats something different and indeed a way to forbid certain actions on certain packages for the aptitude resolver, but these are not supported by any other solver, most notable APTs so most front-ends (if not all beside aptitude) do not understand it. If the system just uses aptitude it might be feasable to drop a config file in /etc/apt/apt.conf.d/ for this option. What I meant is something similar, through completely different, in the APT resolver. A Package gets a certain score (Debug::pkgProblemResolver::ShowScores -- beware the output is huge!) based on various things including the priority. The score decides which package wins in a fight - Debug::pkgProblemResolver. So if the score is high, the package always wins - so it can't be removed as only loosers will be removed. ;) But as said, its hard to influence it in the right way in this usecase, so better forget that i have said it. It was just for completition. Best regards David Kalnischkies -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/BANLkTi=pa11ujgc_2u1b-npkvmcgrxl...@mail.gmail.com
Re: How to make a meta package unremovable?
Hi, On 2011-06-13 12:56, David Kalnischkies wrote: With my APT hat on i can tell you that APT (and friends) currently have no option to forbid the removal of packages without other side-effects. Please refrain from uncondionally stating something about friends' functionality. Libcupt actually has the possibility to prevent the removal of any package without any other side-effects, though it is not available from the console front-end. I don't think this will help the topic starter, but I don't want to see false statements unanswered. What could be done is tweaking resolver scoring points, but honestly: that is black-magic [...] it has side-effects for other packages with this priority [...] For completeness, the points above are also applicable not for all friends. -- Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com C++/Perl developer, Debian Developer -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110613163415.GA4458@r500-debian
Re: How to make a meta package unremovable?
Hi Russ, thank you for you response. Am 09.06.2011 23:31, schrieb Russ Allbery: Erik Schanze (Debian) schan...@gmx.de writes: - Upgrade process hangs waiting for the user input This should only happen if you run it interactively. If you don't run it interactively, then it should realize that it can't prompt and just abort. Yes, you are right. One disadvantage seems to be solved, but the drawback with PBuilder remains. I could try some exclude options in PBuilder command line, but an other way would be better. Has noone and idea? Or would it better to ask on debian-devel? Best regards, Erik -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4df48e55.6080...@gmx.de
Re: How to make a meta package unremovable?
On 06/12/2011 06:00 PM, Erik Schanze (Debian) wrote: Yes, you are right. One disadvantage seems to be solved, but the drawback with PBuilder remains. I could try some exclude options in PBuilder command line, but an other way would be better. Has noone and idea? Or would it better to ask on debian-devel? Best regards, Erik If it's really for private use only, maybe you can set the package as essential? Thomas -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4df4c538.9020...@goirand.fr
How to make a meta package unremovable?
Hi mentors, hope this is the right list for it, I wouldn't abuse debian-devel for it. [please keep me on CC, I'm not subscribed] I maintain a custom Debian installation on Clients without any user interaction during upgrade, so everything has to go automatically. I created a meta package to define dependencies to all packages I need on the clients and I'd like to make this meta package unremovable during dist-upgrade. An automatic removal by accident during $ apt-get -y --force-yes dist-upgrade because of missing depends or conflicts must be prevented. It`s better to aboard the upgrade then. I see this possibilities: * Set Essential: Yes in debian/control of meta package: + works as expected, even apt-get remove metapackage askes for additional user input that will not happen on the clients. - Upgrade process hangs waiting for the user input - If I build a PBuilder environment from this repository, it will load this Essential package and install a bunch of packages I do not want in PBuilder. (OK, I could try to exclude this package PBuilder command line, but ugly anyway) * Set APT::Get::Remove false in apt.conf: - affects all packages and prevents removal of obsolete packages I want to be removed. * APT pinning seems not to do it (as I tried). Does anybody have an additionally idea how to solve this, to prevent the removal of one package without hanging on user input and prevent automatic inclusion in PBuilder installation? Best regards, Erik -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4df132f6.8000...@gmx.de
Re: How to make a meta package unremovable?
Erik Schanze (Debian) schan...@gmx.de writes: I maintain a custom Debian installation on Clients without any user interaction during upgrade, so everything has to go automatically. I created a meta package to define dependencies to all packages I need on the clients and I'd like to make this meta package unremovable during dist-upgrade. An automatic removal by accident during $ apt-get -y --force-yes dist-upgrade because of missing depends or conflicts must be prevented. It`s better to aboard the upgrade then. I see this possibilities: * Set Essential: Yes in debian/control of meta package: + works as expected, even apt-get remove metapackage askes for additional user input that will not happen on the clients. - Upgrade process hangs waiting for the user input This should only happen if you run it interactively. If you don't run it interactively, then it should realize that it can't prompt and just abort. -- Russ Allbery (r...@debian.org) http://www.eyrie.org/~eagle/ -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87mxhqzo72@windlord.stanford.edu