View previous topic :: View next topic |
Author |
Message |
massysett Apprentice
Joined: 06 Jan 2006 Posts: 296 Location: Silver Spring, Maryland USA
|
Posted: Tue Apr 18, 2006 2:37 am Post subject: "Gentoo does not handle reverse dependencies"? mea |
|
|
People often say that Portage does not handle reverse dependencies. See for example here. Or see here on Gentoo Wiki.
What does this mean, exactly, when people say that? For instance Gentoo Wiki says you can break your whole system by unmerging glibc. Of course this would be hard to inadvertently do as glibc is in the system list. But I always do Code: | equery d packagename | before I unmerge anything. If that command spits out anything--duh--don't unmerge the package.
Sometimes emerges can break linking, but that's what revdep-rebuild is for. It works fine for me, though it does give strange output for openoffice-bin.[/code]
So what do people mean, Portage doesn't handle reverse dependencies? Am I missing something? Is all that people mean is, they want emerge to check for dependencies before unmerging? _________________ Draft Windows-to-Linux Guide |
|
Back to top |
|
|
Q-collective Advocate
Joined: 22 Mar 2004 Posts: 2071
|
Posted: Tue Apr 18, 2006 2:38 am Post subject: |
|
|
A simple example of what is meant with it:
Now, try to unmerge all of that |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Tue Apr 18, 2006 4:15 am Post subject: |
|
|
Even better than above, is unmerging package X, which has dependency Y, but NOT unmerging Y, because A, F and M also depend on Y. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Tue Apr 18, 2006 4:53 am Post subject: |
|
|
I would do something like:
emerge -p --nospinner kde-meta > whackit.sh 2>&1
vi whackit.sh (spend a few minutes cutting, pasting, and inserting column blocks)
Then when I was done playing with kde, I would use the script I hacked together to remove it. (one big emerge -C pretty much)
If I was being really lazy, I would just make a stage4 backup, then format and restore later. _________________
Bones McCracker wrote: | On the other hand, regex is popular with the ladies. |
|
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Tue Apr 18, 2006 6:37 am Post subject: |
|
|
yabbadabbadont wrote: | vi whackit.sh (spend a few minutes cutting, pasting, and inserting column blocks) | Make a pass (or few) through sed. Takes much less time. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
omp Retired Dev
Joined: 10 Sep 2005 Posts: 1018 Location: Glendale, California
|
Posted: Tue Apr 18, 2006 7:34 am Post subject: |
|
|
I just use ecatmur's dep script for reverse dependancies. _________________ meow. |
|
Back to top |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Tue Apr 18, 2006 9:16 pm Post subject: |
|
|
pjp wrote: | yabbadabbadont wrote: | vi whackit.sh (spend a few minutes cutting, pasting, and inserting column blocks) | Make a pass (or few) through sed. Takes much less time. |
Only if you already are an expert at regular expressions and using sed.... _________________
Bones McCracker wrote: | On the other hand, regex is popular with the ladies. |
|
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Tue Apr 18, 2006 10:49 pm Post subject: |
|
|
yabbadabbadont wrote: | Only if you already are an expert at regular expressions and using sed.... | It isn't that difficult to do this type of sed/awk. I'm no expert. I just followed some guides and worked at it.
Here's an example for xorg-x11 7: Code: | emerge -pq --nocolor xorg-x11 | grep -v "blocks B" | sed -e 's/\[ebuild [A-Z ]*\] /=/g' | awk '{ print $1 }' | - The 'q' option eliminates the trailing "USE" info, though it isn't really necessary for this method.
- Since X 7 is blocked by 6.x, I just used grep to exclude the blockers, sending the list of "new" stuff to sed.
- 's' in sed is for search and replace, and takes the form of: s/search term/replace with/g 'g' refers to a global (line?) search IIRC.
- \[ and \] "escape" the [ and ] characters, as they have special meaning. Since the output begins with [ebuild we want that [ to be "replaced." That is what "escaping" refers to. Notice the next set, [A-Z ], which refers to all capitalized letters A through Z, including a space at the end. This pair of [] is interpreted as being special, because they aren't escaped. The following * says "match any number of the characters in the set (the set is A-Z plus space). I replace the beginning info with an = which is required (or >, <, >=, <=) when (un)masking specific versions.
- The awk line prints the first "column" of info, which happens to be the category/package-version info. It excludes the trailing old version in brackets, since it would be in "column 2" (delimited by spaces).
Play around with sed and awk to see what they do. You can start with "By Example" articles at: http://www.gentoo.org/doc/en/list.xml (search for "by example"). There is also a series for bash.
Make notes as you go along, because you'll probably discover things that aren't easy to remember until you use it regularly (I almost always have to "refresh" my memory on how to do certain stuff, especially the [A-Z ] parts). _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Tue Apr 18, 2006 10:52 pm Post subject: |
|
|
Too much work. I'll just spend 5 minutes (at most) in vi and have it done... _________________
Bones McCracker wrote: | On the other hand, regex is popular with the ladies. |
|
|
Back to top |
|
|
Fitzzy n00b
Joined: 07 Nov 2005 Posts: 17 Location: Fitzville
|
Posted: Wed Apr 19, 2006 2:51 am Post subject: |
|
|
It is a very nice feature to have, reverse dependencies, but it is orders of magnitude more difficult to implement than a normal forward dependency handling. |
|
Back to top |
|
|
Master_Of_Disaster l33t
Joined: 28 Feb 2003 Posts: 610 Location: 15.05072° East, 48.13747° North (aka Mauer), Austria
|
Posted: Wed Apr 19, 2006 10:57 am Post subject: |
|
|
And what about Code: | emerge -C <package> && emerge depclean | ?
Given that your world file is sane, shouldn't this take care of removing unwanted dependencies of <package>? _________________ post tenebras lux, post fenestras tux
Registered Linux User Nr. 312509
Adopt an unanswered post today! |
|
Back to top |
|
|
Q-collective Advocate
Joined: 22 Mar 2004 Posts: 2071
|
Posted: Wed Apr 19, 2006 11:41 am Post subject: |
|
|
Fitzzy wrote: | It is a very nice feature to have, reverse dependencies, but it is orders of magnitude more difficult to implement than a normal forward dependency handling. |
It is not hard, it just requires rewriting a lot of portage |
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Wed Apr 19, 2006 2:28 pm Post subject: |
|
|
Fitzzy wrote: | It is a very nice feature to have, reverse dependencies, but it is orders of magnitude more difficult to implement than a normal forward dependency handling. |
Actually, given a sane underlying model and classes, it's a heck of a lot easier. The main reason Portage doesn't have it is that Portage doesn't have a sane underlying model or classes. |
|
Back to top |
|
|
ferringb Retired Dev
Joined: 03 Apr 2003 Posts: 357
|
Posted: Wed Apr 19, 2006 7:11 pm Post subject: |
|
|
Fitzzy wrote: | It is a very nice feature to have, reverse dependencies, but it is orders of magnitude more difficult to implement than a normal forward dependency handling. |
Actually...
Proper resolver has to back track and yank pulled in dependencies when a particular branch it was executing turned out to be unsatisfiable. Revdep's are the same thing- load up full graph, yoink the desired node, and iterate till the graph stabilizes/completes. Depending on your design, either you tracked the info as you went, or you just difference the two state graphs, then start the removing. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed Apr 19, 2006 9:47 pm Post subject: |
|
|
Split off the Portage is NOT Gentoo discussion. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
omp Retired Dev
Joined: 10 Sep 2005 Posts: 1018 Location: Glendale, California
|
Posted: Thu Apr 20, 2006 12:44 am Post subject: |
|
|
Master_Of_Disaster wrote: | And what about Code: | emerge -C <package> && emerge depclean | ?
Given that your world file is sane, shouldn't this take care of removing unwanted dependencies of <package>? | The outcome of depclean isn't always too nice. Make sure to go over the list first. _________________ meow. |
|
Back to top |
|
|
lynxnyl Apprentice
Joined: 15 Aug 2004 Posts: 253 Location: Ljubljana, Slovenija
|
Posted: Thu Apr 20, 2006 7:41 pm Post subject: |
|
|
Yeah, reverse dependencies, triggers, conflict resolution (...) are all great features. Too bad gent^Wportage doesn't have them, this makes package managment a lot easier/faster. _________________ Have a sorcerous day! |
|
Back to top |
|
|
ewan.paton Veteran
Joined: 29 Jul 2003 Posts: 1219 Location: glasgow, scotland
|
Posted: Thu Apr 20, 2006 8:59 pm Post subject: |
|
|
i remember some time ago there was a project about putting the bckend of portage into an sql database, i would imagine revers dependance would be a hell of a lot easier with a table of installed packages, each ebuild being used as a row with its dependences, a table of instaled packages and some sql magic.
unfortunaly last i heard about the project was sever years ago and im not a developer so could be talking out my ass about how easy it would be, also it would require a database as part of the base system. _________________ Giay tay nam | Giay nam cao cap | Giay luoi
Last edited by ewan.paton on Thu Dec 11, 2014 7:40 pm; edited 1 time in total |
|
Back to top |
|
|
lynxnyl Apprentice
Joined: 15 Aug 2004 Posts: 253 Location: Ljubljana, Slovenija
|
Posted: Fri Apr 21, 2006 9:38 am Post subject: |
|
|
One can use a text based database. With these numbers it is bordering on being inefficient, but that is much better than bringing in the overhead of a "real" db.
Doesn't portage already cache some of the info? I think that's it. _________________ Have a sorcerous day! |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9533 Location: beyond the rim
|
|
Back to top |
|
|
lynxnyl Apprentice
Joined: 15 Aug 2004 Posts: 253 Location: Ljubljana, Slovenija
|
Posted: Fri Apr 21, 2006 3:29 pm Post subject: |
|
|
I think it is obvious people are talking about unmerge dependency handling. _________________ Have a sorcerous day! |
|
Back to top |
|
|
calr0x Apprentice
Joined: 16 Aug 2004 Posts: 244
|
Posted: Sat Nov 18, 2006 6:02 am Post subject: |
|
|
I'ma let ya in on a lil' tip here.. That's some nerd shit there... _________________ Edit the subject of the original post w/ [SOLVED] at the end if this thread is resolved. |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9533 Location: beyond the rim
|
Posted: Sat Nov 18, 2006 8:19 am Post subject: |
|
|
calr0x wrote: |
I'ma let ya in on a lil' tip here.. That's some nerd shit there... |
Thanks for that constructive comment. Certainly motivates me to put more work into portage. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Sat Nov 18, 2006 8:49 pm Post subject: |
|
|
Nevermind him... just get the "you probably mean" parts working :D _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
|
Back to top |
|
|
|