# HG changeset patch # User jld # Date 1075458377 0 # Node ID 111c2191e6f57443cadbbe4fd68b8f6e53fec04c # Parent ba7fea8efa2f9ded5b0efe058fc038e663e1c55a * ecos.db: Add 'hardware' attribute to CYGPKG_DEVS_ETH_ARM_KS32C5000. * ecosadmin.tcl: Delete empty directories in the repository following eCos package removal. Read the hardware attribute from package records in ecos.db. diff --git a/host/tools/configtool/standalone/wxwin/mainwin.cpp b/host/tools/configtool/standalone/wxwin/mainwin.cpp --- a/host/tools/configtool/standalone/wxwin/mainwin.cpp +++ b/host/tools/configtool/standalone/wxwin/mainwin.cpp @@ -552,7 +552,7 @@ void ecMainFrame::OnAbout(wxCommandEvent // ecAboutDialog dialog(this, ecID_ABOUT_DIALOG, _("About eCos Configuration Tool")); // dialog.ShowModal(); wxString msg; - msg.Printf("eCos Configuration Tool %s (%s %s)\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003\nCopyright (C) eCosCentric Limited 2004", ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__); + msg.Printf("eCos Configuration Tool %s (%s %s)\n\nCopyright (c) Red Hat, Inc. 1998-2002\nCopyright (c) John Dallaway 2003\nCopyright (c) eCosCentric Limited 2004", ecCONFIGURATION_TOOL_VERSION, __DATE__, __TIME__); wxMessageBox(msg, _("About eCos Configuration Tool"), wxICON_INFORMATION | wxOK); } diff --git a/packages/ChangeLog b/packages/ChangeLog --- a/packages/ChangeLog +++ b/packages/ChangeLog @@ -1,3 +1,11 @@ +2004-01-30 John Dallaway + + * ecos.db: Add 'hardware' attribute to CYGPKG_DEVS_ETH_ARM_KS32C5000. + + * ecosadmin.tcl: Delete empty directories in the repository following + eCos package removal. Read the hardware attribute from package records + in ecos.db. + 2004-01-19 Nick Garnett * ecos.db: Added FAT12/16 filesystem packages. diff --git a/packages/ecos.db b/packages/ecos.db --- a/packages/ecos.db +++ b/packages/ecos.db @@ -11,6 +11,7 @@ ## ------------------------------------------- ## This file is part of eCos, the Embedded Configurable Operating System. ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +## Copyright (C) 2004 eCosCentric Limited ## ## eCos is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free @@ -1343,6 +1344,7 @@ package CYGPKG_DEVS_ETH_ARM_EDB7XXX { package CYGPKG_DEVS_ETH_ARM_KS32C5000 { alias { "Samsung KS32C5000 ethernet driver" eth_ks32c5000 } + hardware directory devs/eth/arm/ks32c5000 script ks32c5000_eth.cdl description "Ethernet driver for Samsung ks32c5000/S3c4510." diff --git a/packages/ecosadmin.tcl b/packages/ecosadmin.tcl --- a/packages/ecosadmin.tcl +++ b/packages/ecosadmin.tcl @@ -19,6 +19,7 @@ ## This file is part of eCos, the Embedded Configurable Operating System. ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. ## Copyright (C) 2003 John Dallaway +## Copyright (C) 2004 eCosCentric Limited ## ## eCos is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free @@ -555,6 +556,7 @@ proc ecosadmin::read_data { silentflag } set_package_data "$name,alias" "" set_package_data "$name,versions" "" set_package_data "$name,dir" "" + set_package_data "$name,hardware" 0 set ::current_package $name eval $body set ::current_package "" @@ -599,10 +601,13 @@ proc ecosadmin::read_data { silentflag } } } + proc hardware { } { + set_package_data "$::current_package,hardware" 1 + } + proc description { str } { } proc disable { str } { } proc enable { str } { } - proc hardware { } { } proc script { str } { } proc set_value { str1 str2 } { } } @@ -1036,7 +1041,16 @@ proc ecosadmin::filter_old_packages { ol if { [ catch { file delete -force -- $package_dir } message ] != 0 } { # issue a warning if package deletion failed - this is not fatal ecosadmin::warning $message - } + } + set dir [ file dirname $package_dir ] + while { [ llength [ glob -nocomplain -- [ file join $dir "*" ] ] ] == 0 } { + # the parent of the deleted directory is now empty so delete it + if { [ catch { file delete -- $dir } message ] != 0 } { + # issue a warning if empty directory deletion failed - this is not fatal + ecosadmin::warning $message + } + set dir [ file dirname $dir ] + } } }