Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124086 - strange ebuild corruption
Summary: strange ebuild corruption
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2006-02-25 10:11 UTC by Joey Hewitt
Modified: 2006-02-25 13:18 UTC (History)
0 users

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

cd /var/db/pkg && find -name *.ebuild -exec grep -H `printf \\\\1` {} \; (ascii-001.txt,1.70 KB, text/plain)
2006-02-25 10:15 UTC, Joey Hewitt

Note You need to log in before you can comment on or make changes to this bug.
Description Joey Hewitt 2006-02-25 10:11:30 UTC
I've been seeing something weird with ebuild files themselves.  For several months I had an old version (installed with a newer one) of the Shorewall firewall that portage would try to unmerge almost every time I emerged something.  It would fail with some errors that looked like bash syntax errors, from the ebuild.  (It's net-firewall/shorewall, but I can't find the old-version number)  Finally yesterday I opened up the file to see what was up, and I think it was the closing quote of the RDEPEND variable, that had some character (displayed as ^A in vim, it appears to be ASCII value 1) instead of the quote.  I replaced it and was able to emerge -C the old Shorewall.

The same thing just happened with Courier-IMAP (net-mail/courier-imap-3.0.2 was the version that failed unmerging when I installed a new one), with the ^A code in the same place and everything.  I fixed that the same way and it worked.

I went to /var/db/pkg and used my crude shell-scripting knowledge to execute
    # find -name *.ebuild -exec grep -H `printf \\\\1` {} \;
in bash.  I'll attach the results - it would seem to indicate this character is floating around in a dozen or so of my /var/db/pkg ebuilds.  I confirmed with my editor on a sampling of the results; they did have the ^A where the output said they did.  Even more interesing is that the same little script found nothing in /usr/portage.

Anyone know what's up?  Failing hardware? :(  This is my personal server, so I hope it's not randomly corrupting my email, etc. :P
Comment 1 Joey Hewitt 2006-02-25 10:15:03 UTC
Created attachment 80713 [details]
cd /var/db/pkg && find -name *.ebuild -exec grep -H `printf \\\\1` {} \;
Comment 2 Peter Gantner (a.k.a. nephros) 2006-02-25 12:56:59 UTC
I can confirm this. The command found three ebuilds on my system.
They all appear to be very old, and for two of them only the header is affected....

However, I could unmerge all of them without problem beacuse they had the ^A appearing not instead of the quote but instead of the space separating two atoms (RDEPEND is corectly surrounded by quotes). My suspicion is that whatever caused these chars to be inserted, it always replaces the first character ater the first atom appearing in the RDEPEND line.
In my case, queue-lint does have it instead of the quote, and the ebuild won't unmerge.

these are the results of Joeys command:

./mail-client/mailx-support-20030215/mailx-support-20030215.ebuild:# $Header: /home/cvsroot/gentoo-x86/mail-client/mailx-supportmailx-support-20030215.ebuild,v 1.8 2004/01/03 13:40:06 aliz Exp $
./media-video/nvoption-0_alpha-r1/nvoption-0_alpha-r1.ebuild:   gnome-base/orbit
./media-plugins/xmms-crystality-0.92/crystality-plugin-0.92.ebuild:# $Header: /home/cvsroot/gentoo-x86/media-plugins/xmms-crystalitycrystality-plugin-0.92.ebuild,v 1.4 2004/02/03 00:16:29 vapier Exp $

and this is the output of emerge -C:

No package files given... Grabbing a set.
/var/db/pkg/net-mail/queue-fix-1.4-r2/queue-fix-1.4-r2.ebuild: line 27: unexpected EOF while looking for matching `"'
/var/db/pkg/net-mail/queue-fix-1.4-r2/queue-fix-1.4-r2.ebuild: line 38: syntax error: unexpected end of file

!!! ERROR: net-mail/queue-fix-1.4-r2 failed.
Call stack:
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-02-25 13:18:42 UTC
Sorry, we can't fix your local corrupted files.