This patch documents the previously-undocumented ecosadmin.tcl option for keeping target records when removing packages and implements a --remove_targets option.
It also fixes CDL test definitions for the USB serial and network autotest packages for compatibility with the eCos Configuration Tool. Checked-in. John Dallaway
Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/ChangeLog,v retrieving revision 1.212 diff -U5 -r1.212 ChangeLog --- ChangeLog 20 Aug 2009 17:00:30 -0000 1.212 +++ ChangeLog 13 Nov 2009 11:29:18 -0000 @@ -1,5 +1,10 @@ +2009-11-13 John Dallaway <[email protected]> + + * ecosadmin.tcl: Keep target records containing removed packages + by default. Add "--remove_targets" switch to force removal. + 2009-08-20 John Dallaway <[email protected]> * ecos.db: Add uSTL package. 2009-07-14 John Dallaway <[email protected]> Index: ecosadmin.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/ecosadmin.tcl,v retrieving revision 1.18 diff -U5 -r1.18 ecosadmin.tcl --- ecosadmin.tcl 29 Jan 2009 17:47:51 -0000 1.18 +++ ecosadmin.tcl 13 Nov 2009 11:29:19 -0000 @@ -10,11 +10,11 @@ # #=============================================================================== ## ####ECOSGPLCOPYRIGHTBEGIN#### ## ------------------------------------------- ## This file is part of eCos, the Embedded Configurable Operating System. -## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. ## ## 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 ## Software Foundation; either version 2 or (at your option) any later ## version. @@ -116,11 +116,11 @@ variable check_database_arg 0; # check variable accept_license_arg 0; # --accept_license variable extract_license_arg 0; # --extract_license variable add_package ""; # add FILE variable remove_package ""; # remove PACKAGE - variable keep_targets_arg ""; # --keep_targets + variable keep_targets_arg 1; # --keep_targets, --remove_targets variable merge_repository ""; # merge REPOSITORY variable version_arg ""; # --version VER # Details of all known packages, targets and templates # read from the ecos.db file @@ -431,10 +431,16 @@ if { [regexp -- {^-?-keep_targets$} $args($i)] == 1 } { set ecosadmin::keep_targets_arg 1 continue } + # check for --remove_targets + if { [regexp -- {^-?-remove_targets$} $args($i)] == 1 } { + set ecosadmin::keep_targets_arg 0 + continue + } + # check for the add command if { [regexp -- {^-?-?add=?(.*)$} $args($i) dummy match1] == 1 } { if { $match1 != "" } { set ecosadmin::add_package $match1 } else { @@ -507,14 +513,14 @@ proc ecosadmin::argument_help { } { puts "Usage: ecosadmin \[ command \]" puts " commands are:" - puts " list : list packages" - puts " check : check database" - puts " add FILE : add packages" - puts " remove PACKAGE \[ --version VER \] : remove a package" + puts " list : list packages" + puts " check : check database" + puts " add FILE : add packages" + puts " remove PACKAGE \[ --version VER \] \[ --remove_targets \] : remove a package" } # }}} # {{{ Packages file @@ -1186,14 +1192,14 @@ # this procedure is called when the interpreter encounters a command in the datafile on the second pass proc filter { command name body } { if { ( $command == "target" ) && ( ( [ target_requires_any_package $name $ecosadmin::removed_packages ] != 0 ) || ( [ target_requires_missing_package $name ] != 0 ) ) } { # the target requires a package which has been removed if { $ecosadmin::keep_targets_arg != 1 } { - # "--keep_targets" not specified so remove targets with missing packages + # "--remove_targets" specified so remove the target ecosadmin::report "removing target $name" } else { - # "--keep_targets" specified so remove missing packages from the target definition + # remove missing packages from the target definition puts $ecosadmin::outfile "$command $name \{\n$ecosadmin::target_attributes \tpackages \{" foreach pkg $ecosadmin::target_packages { if { ([ lsearch $ecosadmin::removed_packages $pkg ] == -1) && ([ lsearch $ecosadmin::known_packages $pkg ] != -1) } { # package exists and has not been listed for removal so keep it in the target definition puts $ecosadmin::outfile "\t\t$pkg" Index: io/usb/serial/slave/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/io/usb/serial/slave/current/ChangeLog,v retrieving revision 1.5 diff -U5 -r1.5 ChangeLog --- io/usb/serial/slave/current/ChangeLog 29 Jan 2009 17:49:48 -0000 1.5 +++ io/usb/serial/slave/current/ChangeLog 13 Nov 2009 11:29:19 -0000 @@ -1,5 +1,10 @@ +2009-11-13 John Dallaway <[email protected]> + + * cdl/usb_serial.cdl: Specify test executable names for compatibility + with the eCos Configuration Tool. + 2008-11-03 Gabor Toeroek <[email protected]> * cdl/usbs_serial.cdl: Fix typo introduced by Andrew Lunn in the previous patch when CYGBLD_IO_USB_SLAVE_SERIAL_BUSPOWERED as renamed CYGOPT_IO_USB_SLAVE_SERIAL_BUSPOWERED. @@ -31,11 +36,11 @@ //=========================================================================== // ####GPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. // // This program 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 Software Foundation; either version 2 or (at your option) any // later version. Index: io/usb/serial/slave/current/cdl/usbs_serial.cdl =================================================================== RCS file: /cvs/ecos/ecos/packages/io/usb/serial/slave/current/cdl/usbs_serial.cdl,v retrieving revision 1.4 diff -U5 -r1.4 usbs_serial.cdl --- io/usb/serial/slave/current/cdl/usbs_serial.cdl 29 Jan 2009 17:49:48 -0000 1.4 +++ io/usb/serial/slave/current/cdl/usbs_serial.cdl 13 Nov 2009 11:29:19 -0000 @@ -6,11 +6,11 @@ # # ==================================================================== ## ####ECOSGPLCOPYRIGHTBEGIN#### ## ------------------------------------------- ## This file is part of eCos, the Embedded Configurable Operating System. -## Copyright (C) 2008 Free Software Foundation, Inc. +## Copyright (C) 2008, 2009 Free Software Foundation, Inc. ## ## 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 ## Software Foundation; either version 2 or (at your option) any later ## version. @@ -273,11 +273,11 @@ cdl_option CYGPKG_IO_USB_SLAVE_SERIAL_TESTS { display "USBS serial example/test programs" no_define flavor data - calculated { "tests/usbserial_echo.c tests/usb2serial.c" } + calculated { "tests/usbserial_echo tests/usb2serial" } description " usbserial_echo will echo charactors received over the usb serial port back to the sender. usb2serial acts as a bridge between a USB serial slave and a real serial port. It is hard coded to use Index: net/autotest/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos-opt/net/net/autotest/current/ChangeLog,v retrieving revision 1.2 diff -U5 -r1.2 ChangeLog --- net/autotest/current/ChangeLog 29 Jan 2009 17:49:55 -0000 1.2 +++ net/autotest/current/ChangeLog 13 Nov 2009 11:29:20 -0000 @@ -1,5 +1,10 @@ +2009-11-13 John Dallaway <[email protected]> + + * cdl/net_autotest.cdl: Specify test executable names for + compatibility with the eCos Configuration Tool. + 2002-02-01 Gary Thomas <[email protected]> * tests/slowpingmux.c (ping_test): * tests/routeping.inl: (ping_test): * tests/floodpingmux.c: (net_test): @@ -269,11 +274,11 @@ //=========================================================================== // ####GPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2009 Free Software Foundation, Inc. // // This program 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 Software Foundation; either version 2 or (at your option) any // later version. Index: net/autotest/current/cdl/net_autotest.cdl =================================================================== RCS file: /cvs/ecos/ecos-opt/net/net/autotest/current/cdl/net_autotest.cdl,v retrieving revision 1.2 diff -U5 -r1.2 net_autotest.cdl --- net/autotest/current/cdl/net_autotest.cdl 29 Jan 2009 17:49:55 -0000 1.2 +++ net/autotest/current/cdl/net_autotest.cdl 13 Nov 2009 11:29:20 -0000 @@ -6,11 +6,11 @@ # # ==================================================================== ## ####ECOSGPLCOPYRIGHTBEGIN#### ## ------------------------------------------- ## This file is part of eCos, the Embedded Configurable Operating System. -## Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2009 Free Software Foundation, Inc. ## ## 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 ## Software Foundation; either version 2 or (at your option) any later ## version. @@ -65,29 +65,29 @@ cdl_option CYGPKG_NET_AUTOTEST_TESTS { display "Networking tests" flavor data no_define calculated { "\ - tests/floodping.c \ - tests/floodpingmux.c \ - tests/route_3.c \ - tests/route_3_4.c \ - tests/route_4.c \ - tests/route_none.c \ - tests/slowping.c \ - tests/slowpingmux.c \ - tests/snmpwalk.c \ - tests/snmpmulti.c \ - tests/snmppings.c \ - tests/tftp_serv_get.c \ - tests/tftp_serv_put.c \ - tests/tftp_serv_g0.c \ - tests/tftp_serv_p0.c \ - tests/tftp_serv_g512.c \ - tests/tftp_serv_p512.c \ - tests/tftp_serv_g1M.c \ - tests/tftp_serv_p1M.c" + tests/floodping \ + tests/floodpingmux \ + tests/route_3 \ + tests/route_3_4 \ + tests/route_4 \ + tests/route_none \ + tests/slowping \ + tests/slowpingmux \ + tests/snmpwalk \ + tests/snmpmulti \ + tests/snmppings \ + tests/tftp_serv_get \ + tests/tftp_serv_put \ + tests/tftp_serv_g0 \ + tests/tftp_serv_p0 \ + tests/tftp_serv_g512 \ + tests/tftp_serv_p512 \ + tests/tftp_serv_g1M \ + tests/tftp_serv_p1M" } description " This option specifies the set of tests for the networking package." }
