Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280892 - KDE Guide: Cleaning Up KDE: Overlay unmerging command regex buggy
Summary: KDE Guide: Cleaning Up KDE: Overlay unmerging command regex buggy
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL: http://www.gentoo.org/proj/en/desktop...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-09 16:22 UTC by Navid Zamani
Modified: 2009-11-16 13:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Navid Zamani 2009-08-09 16:22:43 UTC
The regular expression in the block “Code Listing 3.3” has a little bug.
The line reads
> emerge -C $(find ./ -name \*.ebuild |sed -e "s:.ebuild::" -e "s:./::" |awk -F'/' '{print "="$1"/"$3}')
where it should read
> emerge -C $(find ./ -name \*.ebuild |sed -e "s:\.ebuild::" -e "s:./::" |awk -F'/' '{print "="$1"/"$3}')
Or in short: There are ebuilds that have the word "ebuild" followed by a character, in their *name*. And this thing then finds and replaces that part, instead of the last one.
An even more secure version would be:
> emerge -C $(find ./ -name \*.ebuild |sed -e "s:\.ebuild$::" -e "s:./::" |awk -F'/' '{print "="$1"/"$3}')
And I’d recommend using that one, if it not still had the risk of parameter overload. (Meaning that there can be so many ebuilds that you have to use xargs.)

So it definitely needs to change. :)

Reproducible: Always

Steps to Reproduce:
1. layman -a arcon
2. cd /usr/local/portage/layman/arcon
3. emerge -C $(find ./ -name \*.ebuild |sed -e "s:.ebuild::" -e "s:./::" |awk -F'/' '{print "="$1"/"$3}')

Actual Results:  
!!! '=app-portage/update-live-ebuilds-9999.ebuild' is not a valid package atom.
!!! Please check ebuild(5) for full details.


Expected Results:  
(demerging all packages from the arcon overlay.)

One thing unclear, is how to demerge only those, where an ebuild in main portage exists. Or only those where one of the same main version or full version exists.
Comment 1 Navid Zamani 2009-08-09 16:24:18 UTC
Oops, I meant „with a character in front of“ not „followed by a character“.
I also meant „unmerging“ not „demerging“.
Sorry, English is not my first language, but my third. :)
Comment 2 Tomáš Chvátal (RETIRED) gentoo-dev 2009-11-16 13:30:30 UTC
Guide updated.
Thanks for the updated command :]