Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282686 - sys-apps/portage - document /etc/portage/sets/ in portage.5 man page (WAS: app-portage/eix: strange behaviour when tarball file is present into /etc/portage/sets directory)
Summary: sys-apps/portage - document /etc/portage/sets/ in portage.5 man page (WAS: ap...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-25 12:16 UTC by Fabiano Francesconi
Modified: 2013-12-01 07:33 UTC (History)
2 users (show)

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 Fabiano Francesconi 2009-08-25 12:16:40 UTC
If a tarball (like in the following example) is present into /etc/portage/sets/* directory, running eix will cause problems.

Infact it tries to read its content with no luck.

I think there should be a prior check in order to avoid behaviour like following:

whitebox ~ # cp /home/elbryan/download/kde-5b2fc54fa5d1c8aeddaeb05f044bf28754bb18be.tar.bz2 /etc/portage/sets/

whitebox sets # eix eix
-- Invalid line 1 in /etc/portage/sets/kde-5b2fc54fa5d1c8aeddaeb05f044bf28754bb18be.tar.bz2: 'BZh91AY&SY����?��ΐJ����y{�]��P��RHG7���`$��}^����Z�f���=Z$J�
'P5= D␊&M&@␋ P4OPh"�y�*y44���f�@M(��M��M0��(�M!��LPh�&�04�(ɣF
    Can't read category.

...
...
...
...

At the end of the process, shell needs to be reset.

Deleting tarball file will solve the problem, obviously :)
Comment 1 Martin Väth 2009-08-25 17:56:53 UTC
I consider this as desired behavior and not as a bug:
The /etc/portage/sets directory is there to store sets;
unless the tarball is a hidden file i.e. (starting with .), it should be
considered as a "sets" file. Since it has not the proper format for such
a file, eix throws a corresponding error (depending on the "format"
of the file).
Comment 2 Fabiano Francesconi 2009-08-25 18:02:07 UTC
(In reply to comment #1)
> I consider this as desired behavior and not as a bug:
> The /etc/portage/sets directory is there to store sets;
> unless the tarball is a hidden file i.e. (starting with .), it should be
> considered as a "sets" file. Since it has not the proper format for such
> a file, eix throws a corresponding error (depending on the "format"
> of the file).
> 

Well then.. if this is a desider behaviour then eix should avoid to output characters that are unable of being rendered with the result of corrupting the shell giving almost no error.

Should be written something like "$file does not contain a valid "sets structure", this way will be ignored by eix" or whatever.

Try yourself to put that file there (it's kde sets tarball file). You'll see what happens. Almost nothing can be read anymore (with gnome-terminal). Btw: It _DOES_ contain sets.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-25 18:35:16 UTC
A valid complaint, but in my opinion a portage documentation change to explicitly state what is allowed would be more useful. Otherwise, you will have third party tools chasing their tail on what to support or not.
Comment 4 Fabiano Francesconi 2009-08-25 19:18:43 UTC
(In reply to comment #3)
> A valid complaint, but in my opinion a portage documentation change to
> explicitly state what is allowed would be more useful. Otherwise, you will have
> third party tools chasing their tail on what to support or not.
> 

Mh.. Summarizing? If something that could be done is did wrongly: message, if something that could not be done compromizes an entire tool: no message.

I'm not whining for nothing. I think this "message" is a small brix into the walls of this brilliant tool.
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-08-25 19:25:16 UTC
(In reply to comment #4)

See..sets are not a standard thingy yet. There is improper documentation, and proposals to change the format. Not to mention that the only set support is in masked portage. It is not much use for third party tools to code to one way or the other..yet. I'm not a portage developer, or an eix developer - so, from now on I will stay out of this bug. =P
Comment 6 Fabiano Francesconi 2009-08-25 19:32:00 UTC
(In reply to comment #5)
> (In reply to comment #4)
> 
> See..sets are not a standard thingy yet. There is improper documentation, and
> proposals to change the format. Not to mention that the only set support is in
> masked portage. It is not much use for third party tools to code to one way or
> the other..yet. I'm not a portage developer, or an eix developer - so, from now
> on I will stay out of this bug. =P
> 

Of course, I know that. Portage 2.2 is still supreme hard masked atm.
Mine wants to be more a suggestion than a complain.

I hope to see this evolving into something :P
Comment 7 Martin Väth 2009-08-25 20:03:01 UTC
(In reply to comment #2)
> Btw: It _DOES_ contain sets.

What do you mean by this: Is portage able to read an *.tar.bz2 directly as
a set definition? How? What is the format of this *.tar.bz2?
Which other formats are supported?
So far, I only know that StaticFileSet contains ASCII-Files.
If this specification has changed, then perhaps eix should react on it.

If, on the other hand, you only mean that it contains sets if it is unpacked,
then the behavior of eix is absolutely correct: If you feed a binary to a
program expecting ascii, you should not wonder if the commented output prints
rubbish of that binary: There is no definite way to tell whether there are
just some strange symbols in a line or whether it is a binary.
Comment 8 Zac Medico gentoo-dev 2009-08-25 23:06:01 UTC
(In reply to comment #7)
> What do you mean by this: Is portage able to read an *.tar.bz2 directly as
> a set definition? How? What is the format of this *.tar.bz2?
> Which other formats are supported?

We don't support tarballs.

> So far, I only know that StaticFileSet contains ASCII-Files.
> If this specification has changed, then perhaps eix should react on it.

There was no change.
Comment 9 Fabiano Francesconi 2009-08-25 23:27:14 UTC
(In reply to comment #7)
> (In reply to comment #2)
> > Btw: It _DOES_ contain sets.
> 
> What do you mean by this: Is portage able to read an *.tar.bz2 directly as
> a set definition? How? What is the format of this *.tar.bz2?
> Which other formats are supported?
> So far, I only know that StaticFileSet contains ASCII-Files.
> If this specification has changed, then perhaps eix should react on it.
> 
> If, on the other hand, you only mean that it contains sets if it is unpacked,
> then the behavior of eix is absolutely correct: If you feed a binary to a
> program expecting ascii, you should not wonder if the commented output prints
> rubbish of that binary: There is no definite way to tell whether there are
> just some strange symbols in a line or whether it is a binary.
> 

I'm sorry. I do not master English very well and I misread your previous post.
At first I didn't think about using tar.bz2 files as 'sets container', misreading your post I thought you were referring such that possibility.

I repeat, I think that would be nice to have a warning because the output is very corrupted and can really drive someone crazy :P

How that I discovered that thing? I've simply uncompressed that file and I forgot to delete it and.. KABOOM!

Well then.. I assume this can be closed.
Comment 10 Martin Väth 2009-08-26 19:21:40 UTC
(In reply to comment #8)
Zac, thanks for the clarification.

So I consider this bug as closed (concerning eix) - of course, I actually
leave it open since the bug's summary and assignment has changed:
I suppose it should now serve as a reminder concerning the portage manpage.

To explain my reasons once more why I consider the bug (concerning eix)
as invalid/cantfix: If a compiler gets feed a binary file as sourcefile and
then prints a message containing a faulty "source line" you would also not
complain about the compiler: There just is no reliable way to
distinguish binary from text data; moreover, semi-intelligent heuristics
which might be attempted as a "workaround" usually do more harm than good.
Comment 11 SpanKY gentoo-dev 2013-12-01 07:33:09 UTC
portage(5) has a section on /etc/portage/sets/ now.  if it needs something else, please file a new bug detailing things.