Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to make portage downgrade a package? [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Shum
n00b
n00b


Joined: 05 Jan 2011
Posts: 32

PostPosted: Tue Oct 23, 2012 4:09 am    Post subject: How to make portage downgrade a package? [Solved] Reply with quote

Recently dev-python/shiboken-1.1.2 moved to stable and got installed during an emerge world. Unfortunately it broke my system. I've added

Code:

>dev-python/shiboken-1.1.1


to my /etc/portage/package.mask but all this does it make portage warm me that I have a masked package installed:

Code:

sherry ~ # emerge -aDNu --complete-graph --with-bdeps=y world dev-python/shiboken

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] net-misc/wget-1.14 [1.13.4-r1] USE="pcre%* zlib%* -uuid%"
[ebuild     U  ] www-plugins/adobe-flash-11.2.202.243 [11.2.202.238]
[ebuild   R    ] sys-fs/udev-171-r8  USE="(-extras*)"

!!! The following installed packages are masked:
- dev-python/shiboken-1.1.2::gentoo (masked by: package.mask)
/etc/portage/package.mask:
# Breaks PySide


Why isn't it offering to downgrade? I'm sure it's done that before when I've had similar problems and there is a stable ebuild for shiboken-1.1.1 that isn't masked.
How can I make portage downgrade this package?


Last edited by Shum on Tue Oct 23, 2012 10:00 am; edited 1 time in total
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Oct 23, 2012 4:35 am    Post subject: Reply with quote

Code:
emerge =dev-python/shiboken-1.11


There was once a long discussion on a similar topic. The job of the package manager is not to maintain a certain kind of system with certain kind of software -- that's your job. It's just a tool to help you do that by automating many of the steps.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Shum
n00b
n00b


Joined: 05 Jan 2011
Posts: 32

PostPosted: Tue Oct 23, 2012 5:00 am    Post subject: Reply with quote

Thankyou!
I guess I was wrong thinking that portage had done this for me before.

Quote:
The job of the package manager is not to maintain a certain kind of system with certain kind of software


That's a damn shame, I really wish it was. portage is my favorite package manager I've ever used because I can configure it though the /etc/portage config files. If there's one thing I would change about portage I would replace /var/lib/portage/world with another config file. That way, if I want to install something, I can add it to the end of the file (with a comment reminding me why I'm installing it) then just run emerge world.

Actually it sucks that portage removes comment lines in /var/lib/portage/world. I have a bunch of packages in there that I don't remember what they do or if I still need them. Some are programs I don't use anymore, some are dependencies for programs that are installed manually in /usr/local etc.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Oct 23, 2012 5:11 am    Post subject: Reply with quote

Shum wrote:
Quote:
The job of the package manager is not to maintain a certain kind of system with certain kind of software


That's a damn shame, I really wish it was. [...]

If you got into the nitty gritty of what this would entail, you would find that the package manager would have to make a number of choices that not all users would agree upon.

It's much easier to make software which do specific actions rather than maintain specific states. This is why Unix principles work so well, and more "user friendly" philosophies often do not. Provide the user with a toolbox, let him do the specializing and maintenance.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Shum
n00b
n00b


Joined: 05 Jan 2011
Posts: 32

PostPosted: Tue Oct 23, 2012 5:56 am    Post subject: Reply with quote

What I'm talking about it giving the user a config file through which they can define exactly what they want the system state to be. Then giving them a tool that moves the system state to that state. This is what the NixOS package manager does for instance (which I'd consider switching to permanently if NixOS were anywhere near as stable and widely used as Gentoo).

Quote:

the package manager would have to make a number of choices that not all users would agree upon.


I'm not sure what you mean. Could you give me an example? Ideally the configuration system should give the user as much control as they need to specify the choices they want. This is why portage is so great. I can use it to simply install a package. Or I can get into the nitty gritty and tell it that I want to mask particular versions of a package and install all versions of dev-blah/somepackage between 1.0 and 1.3 with a particular USE flag etc. If you allow the configuration system to specify unambiguously what the package manager has to do then you shouldn't have the problem of the package manager making arbitrary or unwanted choices.

Quote:

This is why Unix principles work so well,


Oh I totally agree with the Unix principles, lots of simple tools that do specific tasks. There should be a tool to install a package, a tool to remove a package etc. And my dream package manager should be a tool built on top of these tools.

Quote:

Provide the user with a toolbox, let him do the specializing and maintenance.


I think the best approach depends on what the tools are for. If it's a tool for changing the state of something (such as the state of the system) then give me a tool that lets me set the state directly. I want to pass it the state I want as an argument, not a mutation on the current state. That way there's much less figuring shit out and keeping track of things for me to do.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Oct 23, 2012 8:13 am    Post subject: Reply with quote

Shum wrote:
I'm not sure what you mean. Could you give me an example? Ideally the configuration system should give the user as much control as they need to specify the choices they want. This is why portage is so great. I can use it to simply install a package. Or I can get into the nitty gritty and tell it that I want to mask particular versions of a package and install all versions of dev-blah/somepackage between 1.0 and 1.3 with a particular USE flag etc. If you allow the configuration system to specify unambiguously what the package manager has to do then you shouldn't have the problem of the package manager making arbitrary or unwanted choices.

Like in that other thread, I think we need to define what the problem is. If the problem is unambiguously defined, then you have a chance of finding the most general solution for the problem. And, then we can determine how feasible it is to implement it in the real world.


One general concept:

The most up-to-date set of packages that are self-consistent and consistent with constraints (e.g., package.mask) and requirements (e.g., world file, USE flags) .

Thus, if you update the Portage tree or change the constraints/requirements, you can "reevaluate" and voila the system is "up-to-spec".


Issues that would have to be resolved:

1) Out of all the different package sets consistent with the constraints/requirements, how do you define what is "most up-to-date" ? If this limit exists, can you prove that it is unique? Is it attainable? If not, can you provide a sensible setting to the user?

2) What about settings that affect the build environment but are not in the package algebra, like CFLAGS/LDFLAGS, contents of /etc/savedconfig, etc?

There are probably more, but I can't think of any at the moment.


Currently:

What I like about the current functionality in Portage/Paludis is that it is *only* a resolver and installer.

The only packages that are guaranteed to be made "up-to-date" (or, more precisely set to specific versions, e.g. the latest) are the ones you specify explicitly on the commandline; it will update deep packages as necessary to get there. The software will fail and inform you if you are trying something inconsistent.

You can also ask for deep updating, but it will only propagate updates downward from the worldfile packages, possibly introducing new inconsistencies that requires user intervention to solve (e.g., cycles, new requires USE flags, etc.).

*How* you solve them is up to you. It would be interesting if one could find a unique definition of "up-to-date" or "up-to-spec" and then find an algorithm to implement it, but likely none exists.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Shum
n00b
n00b


Joined: 05 Jan 2011
Posts: 32

PostPosted: Tue Oct 23, 2012 9:59 am    Post subject: Reply with quote

Thanks, that's a good explanation and I see your point. In the general case there's no total ordering on the set of package sets that satisfy the constraints and so there may not be a unique maximally up-to-date set.

It does leave the question though: what's the most flexible package management system you can devise that does let you guarantee that such a set exists? Obviously you can't just let the users/maintainers define whatever constraints they want or they could create a situation where

Code:

packageA-1.1
packageB-1.2


and

Code:

packageA-1.2
packageB-1.1


are both valid package sets but

Code:

packageA-1.2
packageB-1.2


is not.
So you want to give them a way to define constraints within limits. Have some kind constraint-specification language that's just restricted enough to make situations like the one described above impossible to ask for. But for it to still be as useful as possible.

An interesting problem... Ultimately though I think I'd still prefer a system like this over one like portage. I really don't like being able to make random changes to my computer then forget about them. I want the whole state to be written down and defined in a file somewhere - even if it means having restrictions on what states I can have.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Oct 23, 2012 11:27 am    Post subject: Reply with quote

As an exercise, one could implement a package resolver in a constraint programming language, such as Prolog.

This would be a very different approach than Portage and Paludis, which (AFAIK) compute a dependency tree and then attempt to flatten it in order to install packages in the right sequence, identifying inconsistencies in this step.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum