Re: [proaudio] laditools ebuild fix (was: Several ebuilds)

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


2013/12/1 Zlobin Nikita <nick87720z@xxxxxxxxx>
В письме от 1 декабря 2013 13:41:27 пользователь Karl Lindén написал:
> The error was due to the python-r1 eclasses' changed wrapping behaviour.
> The proper fix (which is future proof) is to search for the wmladi files
> and remove them.
>
> This is fixed in the latest revision (r2811). Please test it out! Thanks
> for the report!
>
> Regards,
> Karl
>
> 2013/11/30 Zlobin Nikita <nick87720z@xxxxxxxxx>
>
> > Ebuild is in archive in message:
> > http://www.mail-archive.com/proaudio@xxxxxxxxxxxxxxxxxxx/msg05497.html
> >
> > Failed to install with USE=-wmaker, trying to remove unexisting
> > file. I added flags -rf to these commands which makes it invulnerable to
> > this error - there is nothing to worry about, because their unexistance is
> > goal of these commands.
I looked ebuild contents directly in email, reported by subversion. You are
grepping by simply "wmladi". This may affect not only wmladi* but rather
*wmladi*. Imho, it is better to not do patters wider than it is necessary to
avoid unexpected issues. grep -E '^wmladi' should be fine.

I'm not sure, what dir ${D}. If it is prefix or root instead if bindir
(/usr/bin), than it would cause huge bug - files in /usr/share and /usr/lib
will be removed as well. Examples of better full command, including find:
* find "${D}" | grep -F '/usr/bin/wmladi'
* find "${D}/usr/bin" | grep -E '^wmladi'   
Second, imho, is faster, because its work is as little as possible. And i
prefer to explicitly specify kind of grep pattern - fixed, extended, perl, etc.



Well, I see your point, but we cannot make any assumptions about where the python-r1 eclasses will put the scripts (from which wmladi is to be removed). Currently they go into /usr/lib/python-exec/python${impl}/, but since it was changed recently it is not wise to assume that it will remain unchanged. A change would break the ebuild once again. In other words: find needs to work from ${D} to catch both wrapper and target script.

The greedy _expression_ is intended because there are obviously no files containing "wmladi" in their name that should be installed if USE="-wmaker". Please note that ${D} is the temporary installation directory so the hack is not touching anything but the files of the package.

However, the hack might behave strangely if a directory with content has "wmladi" in its name, but the ebuild will still work because the "|| die" was omitted after the rm command. Currently there is no such directory so it's safe.

Sorry for the empty mail.

Regards,
Karl


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/