[DNG] desktop-base package review

2016-01-21 Thread aitor_czr

Hi Daniel,

On 01/21/2016 11:11 PM, Daniel Reurich  wrote:

Hi,

I've been hacking on the desktop-base package to add a bunch of features
like monitor size & aspect ratio detection to improve our chances of
selecting the best artwork, adding support for grub2 themes and using an
images manifest so the artwork can be updated without having to hack on
all of the maintainer scripts.  There is now very little resemblance to
debian desktop-base package.

I'd like some other eyes to look over my code and point out any
improvements/flaw.

I haven't tested the code for setting the GRUB_THEME variable in
/etc/default/grub (in debian/postinst) and I think it's rather crude to
do it that way.

I still have to add functionality to debian/postrm to remove the
GRUB_THEME variable (with tests to ensure it's untouched).

The project is located here:
https://git.devuan.org/packages-base/desktop-base/branches

Please fork and make merge requests with any proposed changes.

Cheers,
Daniel.


I agree to add the artwork carried out by Hellekin to desktop-base 
package. It would be also interesting to configure the '/etc/skel' 
folder (skeleton). I would therefore like to suggest some ideas, but 
lately i don't have much free time. Today i've been working on appling a 
multithread proccess in such a way that "/usr/lib/netman/bin/backend 8" 
is called on a separate thread so as to avoid blocking Gtkmm's main loop 
(i.e., the spinner). I do not surrender :)


  Aitor.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] desktop-base package review

2016-01-21 Thread KatolaZ
On Thu, Jan 21, 2016 at 10:02:43PM +, Rainer Weikusat wrote:

[cut]

> update-boot(){
> if [ -n $1 ]; then
> case $1 in
> commented)
> echo -e "\n$DEF_GRUB_COMMENT\n# $DEF_GRUB_SETTING" >> 
> $DEFAULT_GRUB
> return
> ;;
> *)
> echo -e "\n$DEF_GRUB_COMMENT\n$DEF_GRUB_SETTING" >> 
> $DEFAULT_GRUB
> ;;
> esac
> fi 
> 

Hi, 

I haven't read your code, so my comment might be just silly/irrelevant
here, but it is always safer to use ${DEF_GRUB_COMMENT} instead of
$DEF_GRUB_COMMENT (et similia), especially if the variables are used
in strings, or contatenated to strings...

My2Cents

KatolaZ

-- 
[ Enzo Nicosia aka KatolaZ --- GLUG Catania -- Freaknet Medialab ]
[ me [at] katolaz.homeunix.net -- http://katolaz.homeunix.net -- ]
[ GNU/Linux User:#325780/ICQ UIN: #258332181/GPG key ID 0B5F062F ]
[ Fingerprint: 8E59 D6AA 445E FDB4 A153 3D5A 5F20 B3AE 0B5F 062F ]
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] desktop-base package review

2016-01-21 Thread Rainer Weikusat
Daniel Reurich  writes:
> I'd like some other eyes to look over my code and point out any
> improvements/flaw.
>
> I haven't tested the code for setting the GRUB_THEME variable in
> /etc/default/grub (in debian/postinst) and I think it's rather crude to
> do it that way.

Some comments on that:


$DEFAULT_GRUB="/etc/default/grub"


The $ seems to be a syntax error.


update-boot(){
if [ -n $1 ]; then
case $1 in
commented)
echo -e "\n$DEF_GRUB_COMMENT\n# $DEF_GRUB_SETTING" >> 
$DEFAULT_GRUB
return
;;
*)
echo -e "\n$DEF_GRUB_COMMENT\n$DEF_GRUB_SETTING" >> 
$DEFAULT_GRUB
;;
esac
fi 

if which update-grub2 > /dev/null ; then
sync
update-grub2 || true
fi

if [ -x /usr/sbin/update-initramfs ]; then
update-initramfs -u
fi
}


It should be possible to express this as (untested)

---
update_boot() {
if [ "$1" = commented ]; then
echo -e "\n$DEF_GRUB_COMMENT\n# $DEF_GRUB_SETTING" >> 
$DEFAULT_GRUB
return
fi   

echo -e "\n$DEF_GRUB_COMMENT\n$DEF_GRUB_SETTING" >>$DEFAULT_GRUB

if which update-grub2 > /dev/null ; then
sync
update-grub2 || true
fi

if [ -x /usr/sbin/update-initramfs ]; then
update-initramfs -u
fi
}


IMHO, considering the use of printf instead of echo -e is also
worthwhile, as in

printf '\n%s\n#% s\n' "$DEF_GRUB_COMMENT" "$DEF_GRUB_SETTING" >> $DEFAULT_GRUB


   while read confline; do
case confline in
$DEF_GRUB_COMMENT)
theme_default_conf=true;
;;
$DEF_GRUB_SETTING)
theme_parm="matching"
;;
"#$DEF_GRUB_SETTING"|"# $DEF_GRUB_SETTING")
theme_parm="disabled"
--

missing ;;

--
GRUB_THEME=*)
theme_parm="modified"
;;
esac
done
-

This reads from stdin which was probably not intended.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] desktop-base package review

2016-01-21 Thread Daniel Reurich
Hi,

I've been hacking on the desktop-base package to add a bunch of features
like monitor size & aspect ratio detection to improve our chances of
selecting the best artwork, adding support for grub2 themes and using an
images manifest so the artwork can be updated without having to hack on
all of the maintainer scripts.  There is now very little resemblance to
debian desktop-base package.

I'd like some other eyes to look over my code and point out any
improvements/flaw.

I haven't tested the code for setting the GRUB_THEME variable in
/etc/default/grub (in debian/postinst) and I think it's rather crude to
do it that way.

I still have to add functionality to debian/postrm to remove the
GRUB_THEME variable (with tests to ensure it's untouched).

The project is located here:
https://git.devuan.org/packages-base/desktop-base/branches

Please fork and make merge requests with any proposed changes.

Cheers,
Daniel.


-- 
Daniel Reurich
Centurion Computer Technology (2005) Ltd.
021 797 722



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng