Re: [gentoo-dev] Re: New eclass osgi.eclass

2007-12-06 Thread Petteri Räty
Steve Long kirjoitti:
> Alistair Bush wrote:
>> Im sure Elvanor can't wait for you constructive feedback on his eclass
>> and depending on your feedback the eclass will enter the tree this
>> weekend.
>>
> A couple of very minor performance points, which I think are more
> significant in eclasses. Firstly the basename thing Donnie pointed out
> before:

Well usually you don't noticy any differences. In global scope things
could have some effect of course.

> 
> You have a couple of functions that take, say, 4 or 5 arguments. It would be
> more robust to use a case, eg:
> case $# in
> 5)..;;
> 4)..;;
> *) die "Incorrect use of $FUNCNAME";;
> esac
> ..than if (($#>4)); then ..; else .. ;fi
> 

Well imho they are equivalent and eclass maintainers should go with what
they prefer.

> 
> With regard to:
>  debug-print-function ${FUNCNAME} $*
> if you want debug-print-function to get the arguments correctly, use "$@"
> not $* (cf 'Special Parameters' in man bash for a proper explanation: this
> applies to all arrays. http://wooledge.org/mywiki/BashFAQ/073 shows how to
> manipulate all members of an array, eg to add a prefix.)

Doesn't matter as arguments are just written to a file and for some
reason this form is used all over the base in eclasses but shouldn't
hurt to use "[EMAIL PROTECTED]" with new code.

> 
> This use of counter in _java-pkg_osgijar-fromfile is odd:
> while [[ -n "${1}" ]]; do
> # while [[ $1 ]] or while (($#)) also work
>if [[ "${1}" == "--noversion" ]]; then
>   noversion=1
>else
>   arguments[${counter}]="${1}"
>   ((++counter))
>fi
>shift 1 # just shift?
> done
> 
> (([EMAIL PROTECTED] < 3)) && die "At least three arguments (not
> counting --noversion) are needed for java-pkg_osgijar-fromfile()"
> 
> You can either just add to the array with: arguments+=("$1")
> or add using the counter: arguments[counter++]="$1"
> and then check: ((counter < 3)) && die ..
> 
> Arithmetic context[1] applies in array indexes, so you don't need to use a $
> for variables and you can post/pre-incr etc there.
> Yuu can also use it for C-style flags, with 0 as false and non-zero true:
> if [[ "${noversion}" == 1 ]];
> can be
> if ((noversion));
> 
> This is handy since unset variables evaluate as zero, which is false inside
> ((..)), so a simple flag=1 is all that's needed, ie you don't have to set a
> default, although ofc it's more robust to do so, especially for functions.
> declare -i flag=0 # makes a local var which can only have integer values
> assigned (setting it to string typically evaluates to zero; arithmetic
> context is used for all assignments, so a string which happens to be a
> variable with an integer will return that value.)
> 
> [1] http://wooledge.org/mywiki/ArithmeticExpression
> 

We really don't need to create the arguments array at all. We could just
check if ${1} is --noversion and then use shift. After that we can use
the positional arguments as usual so instead of ${arguments[0]} we can
use just ${1}.

Regards,
Petteri




signature.asc
Description: OpenPGP digital signature


[gentoo-dev] .desktop file cleanup

2007-12-06 Thread Petteri Räty
In celebration of the Finnish Independence Day let's cleanup the
.desktop files we have in the three.
Results: http://dev.gentoo.org/~betelgeuse/desktop-files/results.txt
Script: http://dev.gentoo.org/~betelgeuse/desktop-files/baddesktop

Regards,
Petteri



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] RFC: categorizing RDEPEND to help --newuse

2007-12-06 Thread Petteri Räty
Please comment on my ideas in http://bugs.gentoo.org/show_bug.cgi?id=201499

Regards,
Petteri



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] .desktop file cleanup

2007-12-06 Thread Petteri Räty
Petteri Räty kirjoitti:
> In celebration of the Finnish Independence Day let's cleanup the
> .desktop files we have in the three.
> Results: http://dev.gentoo.org/~betelgeuse/desktop-files/results.txt
> Script: http://dev.gentoo.org/~betelgeuse/desktop-files/baddesktop
> 
> Regards,
> Petteri
> 

As pointed out by zmedico in
https://bugs.gentoo.org/show_bug.cgi?id=201498 you should use
make_desktop_entry if the .desktop file you are installing doesn't have
any extra value like translations.

Regards,
Petteri



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] Re: .desktop file cleanup

2007-12-06 Thread Christian Faulhammer
Petteri Räty <[EMAIL PROTECTED]>:

> In celebration of the Finnish Independence Day let's cleanup the
> .desktop files we have in the three.
> Results: http://dev.gentoo.org/~betelgeuse/desktop-files/results.txt
> Script: http://dev.gentoo.org/~betelgeuse/desktop-files/baddesktop

*desktop-file-validate /usr/portage/app-admin/keepassx/files/keepassx.desktop 
*desktop-file-validate 
/usr/portage/app-editors/jasspa-microemacs/files/jasspa-microemacs.desktop

 Both fixed.

V-Li

-- 
Christian Faulhammer, Gentoo Lisp project
http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

http://www.faulhammer.org/>


signature.asc
Description: PGP signature


[gentoo-dev] Re: .desktop file cleanup

2007-12-06 Thread Christian Faulhammer
Petteri Räty <[EMAIL PROTECTED]>:

> Petteri Räty kirjoitti:
> > In celebration of the Finnish Independence Day let's cleanup the
> > .desktop files we have in the three.
> > Results: http://dev.gentoo.org/~betelgeuse/desktop-files/results.txt
> > Script: http://dev.gentoo.org/~betelgeuse/desktop-files/baddesktop
> As pointed out by zmedico in
> https://bugs.gentoo.org/show_bug.cgi?id=201498 you should use
> make_desktop_entry if the .desktop file you are installing doesn't
> have any extra value like translations.

/usr/portage/sci-mathematics/coq/files/coqide.desktop: warning: value
"Application;Edutainment;Mathematics;" for key "Categories" in group
"Desktop Entry" contains a deprecated value "Application"

 But make_desktop_entry does assign Application.

V-Li

-- 
Christian Faulhammer, Gentoo Lisp project
http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

http://www.faulhammer.org/>


signature.asc
Description: PGP signature


[gentoo-dev] Re: .desktop file cleanup

2007-12-06 Thread Christian Faulhammer
Christian Faulhammer <[EMAIL PROTECTED]>:

>  But make_desktop_entry does assign Application.

 Please just ignore me.

V-Li

-- 
Christian Faulhammer, Gentoo Lisp project
http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

http://www.faulhammer.org/>


signature.asc
Description: PGP signature


Re: [gentoo-dev] X drivers up for grabs

2007-12-06 Thread Piotr Jaroszyński
> (Nelson impression...) haha, peper!
>
> Start checkin out Ubuntu... compnerd says they apply 120 patches to this
> driver..
>
> Also, start fixing the issues it has with HAL 0.5.10 since that's going
> to hit the tree for real shortly. If you need a version to test against,
> try Gentopia's overlay.

mmm fun. I will look into all that during the weekend and at least I know who 
to harass :)

-- 
Best Regards,
Piotr Jaroszyński
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-dev] X drivers up for grabs

2007-12-06 Thread Doug Klima
Piotr Jaroszyński wrote:
>> (Nelson impression...) haha, peper!
>>
>> Start checkin out Ubuntu... compnerd says they apply 120 patches to this
>> driver..
>>
>> Also, start fixing the issues it has with HAL 0.5.10 since that's going
>> to hit the tree for real shortly. If you need a version to test against,
>> try Gentopia's overlay.
>> 
>
> mmm fun. I will look into all that during the weekend and at least I know who 
> to harass :)
>
>   
Actually, I am no longer involved with HAL and am currently in the
process of removing all traces of it off my system.
-- 
[EMAIL PROTECTED] mailing list



[gentoo-dev] Help for arch teams

2007-12-06 Thread Christian Faulhammer
Hi,

[CC some arch teams, too, as not all devs read -dev]

As promised [1] about two months ago, the template for Gatt, that
handles all the commit stuff for architecture developers, is now ready
to be used by the public. Some bugs in Gatt needed to be resolved and
heavy testing has been done. 

1. Emerge the package with Gatt
2. Test the software
3. Use the template named "keywords" shipped with Gatt to create a
script for stabilisation Execute it on the system you have commit
access from

All needed commands are given in the TUTORIAL file, so I concentrate on
what the script can do for you: 

* determine if it is a keywording or stabilisation request
* determine if it is a security stabilisation and set ChangeLog/commit
message plus Bugzilla handling correctly
* update of cvs tree before doing any work
* setting needed keyword 
* setting ChangeLog scan for QA errors (repoman)
* commit it to the repository
* uncc arch from bug including message "arch stable" 
* and close bug if needed (not when security related) always
with confirmation

Test it and report back.  Thanks.

V-Li

[1]
http://www.faulhammer.org/index.php?option=com_content&task=view&id=198>

-- 
Christian Faulhammer, Gentoo Lisp project
http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

http://www.faulhammer.org/>


signature.asc
Description: PGP signature


[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in rox-base/rox-clib: ChangeLog rox-clib-2.1.10.ebuild

2007-12-06 Thread Donnie Berkholz
On 15:53 Thu 06 Dec , Jim Ramsay (lack) wrote:
> 1.1  rox-base/rox-clib/rox-clib-2.1.10.ebuild
> 
> file : 
> http://sources.gentoo.org/viewcvs.py/gentoo-x86/rox-base/rox-clib/rox-clib-2.1.10.ebuild?rev=1.1&view=markup
> plain: 
> http://sources.gentoo.org/viewcvs.py/gentoo-x86/rox-base/rox-clib/rox-clib-2.1.10.ebuild?rev=1.1&content-type=text/plain

> src_install() {
>   local baselibdir="/usr/$(get_libdir)"
>   local NATIVE_FEED_DIR="/usr/share/0install.net/native_feeds"
>   local ICON_CACHE_DIR="/var/cache/0install.net/interface_icons"
> 
>   #  clean up source instead of remove it!
>   ( cd src && make clean )
> 
>   # remove silly .cvs files
>   find . -name '.cvs*' | xargs rm -f >/dev/null 2>&1
>   dodoc ${baselibdir}/${APPNAME}
>   dodir ${baselibdir}/${APPNAME}
>   cp -r . "${D}${baselibdir}/${APPNAME}"
>   (
>   cd Help
>   dodoc Authors Changes ToDo README Versions
>   )

Instead of these subshells to save the original directory, a more common 
technique is pushd/popd. Another possibility is 'cd foo; stuff; cd -', 
but that doesn't stack.

>   0distutils ROX-CLib.xml > tmp.native_feed || die "0distutilss feed edit 
> failed"
>   insinto "${baselibdir}/ROX-CLib/"
>   newins tmp.native_feed ROX-CLib.xml
> 
>   local feedname
>   feedname=$(0distutils -e tmp.native_feed) || "0distutils URI escape 
> failed"
>   dosym "${baselibdir}/ROX-CLib/ROX-CLib.xml" 
> "${NATIVE_FEED_DIR}/${feedname}"
> 
>   local cachedname
>   cachedname=$(0distutils -c tmp.native_feed) || "0distutils URI escape 
> failed"
>   dosym "${baselibdir}/ROX-CLib/.DirIcon" 
> "${ICON_CACHE_DIR}/${cachedname}"
> 
> }

Thanks,
Donnie
-- 
[EMAIL PROTECTED] mailing list