Re: [OE-core] [PATCH 1/2] [V2] systemd: Remove init.d dir if systemd unit file is present and sysvinit not a distro feature

2013-07-29 Thread Burton, Ross
On 29 July 2013 15:36, Phil Blundell wrote: >> Not sure we need the listdir(), why should the function only delete >> the directory if it has contents? If it doesn't have contents you'll >> be packaging an empty directory. > > The directory he's deleting is different to the one that he's listing.

Re: [OE-core] [PATCH 1/2] [V2] systemd: Remove init.d dir if systemd unit file is present and sysvinit not a distro feature

2013-07-29 Thread Phil Blundell
On Mon, 2013-07-29 at 15:34 +0100, Burton, Ross wrote: > On 29 July 2013 09:09, Shakeel, Muhammad wrote: > > +# If systemd_unitdir contains anything, delete sysv_initddir > > +if (os.path.exists(systemd_unitdir) and > > os.listdir(systemd_unitdir)): > > +shutil.rmtree(

Re: [OE-core] [PATCH 1/2] [V2] systemd: Remove init.d dir if systemd unit file is present and sysvinit not a distro feature

2013-07-29 Thread Burton, Ross
On 29 July 2013 09:09, Shakeel, Muhammad wrote: > +# If systemd_unitdir contains anything, delete sysv_initddir > +if (os.path.exists(systemd_unitdir) and os.listdir(systemd_unitdir)): > +shutil.rmtree(sysv_initddir) Not sure we need the listdir(), why should the funct

[OE-core] [PATCH 1/2] [V2] systemd: Remove init.d dir if systemd unit file is present and sysvinit not a distro feature

2013-07-29 Thread Shakeel, Muhammad
From: Muhammad Shakeel If systemd is supported DISTRO_FEATURE and sysvinit is not and also if systemd_unitdir contains anything then no need to keep init.d scripts for sysvinit compatibility. Signed-off-by: Muhammad Shakeel --- meta/classes/systemd.bbclass | 15 +++ 1 file change