First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 137784
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Stefan Schweizer <genstef@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Martin Väth <vaeth@mathematik.uni-wuerzburg.de>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
file_maybe_dir.patch Patch for eix-0.5.5 to consider dirs as a file patch Martin Väth 2006-06-23 15:54 0000 1.09 KB Details | Diff
maskfile_maybe_dir.patch Patch for eix-0.5.5 to consider mask-dirs as a file patch Martin Väth 2006-06-24 01:26 0000 1.11 KB Details | Diff
maskfile_maybe_dir.patch Patch for eix-0.5.5 to consider mask-dirs as a file patch Martin Väth 2006-06-24 01:29 0000 1.11 KB Details | Diff
read_recursive.patch Cleaner version of previous patches and a bugfix for an unreported bug patch Martin Väth 2006-07-02 04:54 0000 6.12 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 137784 depends on: Show dependency tree
Bug 137784 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-06-23 15:52 0000
One of the features of portage-2.1 is that /etc/portage/package.* can be
directories instead of files. However, this feature is not known to eix. I add
a patch for eix-0.5.5 which adds this feature in a very simple manner: Whenever
a requested file is a directory, all its content is considered as a single
file.

------- Comment #1 From Martin Väth 2006-06-23 15:54:00 0000 -------
Created an attachment (id=89960) [details]
Patch for eix-0.5.5 to consider dirs as a file

------- Comment #2 From Vlastimil Babka (Caster) 2006-06-23 16:12:45 0000 -------
Nice. Tried the patch and package.keywords dir is now parsed correctly.
packages.mask and packages.unmask not, though.

------- Comment #3 From Martin Väth 2006-06-24 01:26:56 0000 -------
Created an attachment (id=89981) [details]
Patch for eix-0.5.5 to consider mask-dirs as a file

You are right. I had not tested this case, and to my surprise, eix uses another
mechanism when reading mask-files. The attached patch does the same thing with
the corresponding mask-file-reading-function as my previous patch did with the
"general" file-reading-function. (Note: I have not merged the patches, i.e.
both patches should be used together to have the same behavior for all files in
/etc/portage/* - hopefully, I did not forget yet another file in there?)

------- Comment #4 From Martin Väth 2006-06-24 01:29:12 0000 -------
Created an attachment (id=89982) [details]
Patch for eix-0.5.5 to consider mask-dirs as a file

You are right. I had not tested this case, and to my surprise, eix uses another
mechanism when reading mask-files. The attached patch does the same thing with
the corresponding mask-file-reading-function as my previous patch did with the
"general" file-reading-function. (Note: I have not merged the patches, i.e.
both patches should be used together to have the same behavior for all files in
/etc/portage/* - hopefully, I did not forget yet another file in there?)

------- Comment #5 From Martin Väth 2006-07-02 04:54:30 0000 -------
Created an attachment (id=90681) [details]
Cleaner version of previous patches and a bugfix for an unreported bug

The attached patch makes the previous patches obsolete. In addition, it fixes
another bug of eix which I found by accident when writing this patch.

In detail:

1. Portage actually reads the /etc/portage/package.* recursively. The new patch
of eix now also reads recursively (not just one level).

2. Some internal cleanup which will simplify future changes:
   (a) The previous patch (and the unpatched eix) contained essentially a copy
for the "file-reading" code when reading {un,}mask-files. With the new patch,
pushback_lines() is used in both cases.
   (b) The patched file-reading functions now all have an optional argument
"recursive" (with the obvious meaning). So it is now easy to restore the old
behavior for certain files, if required (currently, this is not used, i.e. also
the files in /usr/portage are possibly read recursively - this might be
considered as a bug or as a feature for future changes of portage).

3. The original eix had a bug in pushback_files(): The argument "exclude" never
had any effect, because the "continue" statement in its test refers to the
inner while loop, not as intended to the enclosing loop. Apparently, this bug
did not cause a severe problem before (because "." and ".." were ignored
anyway, because they are not ordinary files, and "parent" usually does not
contain something which might confuse eix). However, for the recursive reading
it is important that "." and ".." actually get "exclude"d to avoid infinite
loops.

Security note: Symbolic links are not treated special, so a recursive symbolic
link might hang eix forever.

------- Comment #6 From Stefan Schweizer 2006-07-11 17:47:29 0000 -------
thanks, this is fixed in 0.5.6

------- Comment #7 From Jakub Moc (RETIRED) 2006-07-12 05:45:18 0000 -------
*** Bug 140102 has been marked as a duplicate of this bug. ***

First Last Prev Next    No search results available      Search page      Enter new bug