timestamp overkill?
I just noticed that there are two identical functions in image.bbclass to set/update the image timestamp. Why? Left over from a previous era?
$ find meta* -name "*.bb*" -or -name "*.inc" | xargs grep create_etc_timestamp
meta/classes/image.bbclass:create_etc_timestamp() {
meta/classes/image.bbclass:# export the zap_root_password, create_etc_timestamp and remote_init_link
meta/classes/image.bbclass:EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startupNotice that 'create_etc_timestamp' does not seem to be used by any recipe. Perhaps it should be removed?
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 11 lines · Gary Thomas
I just noticed that there are two identical functions in image.bbclass to set/update the image timestamp. Why? Left over from a previous era?
$ find meta* -name "*.bb*" -or -name "*.inc" | xargs grep create_etc_timestamp meta/classes/image.bbclass:create_etc_timestamp() { meta/classes/image.bbclass:# export the zap_root_password, create_etc_timestamp and remote_init_link meta/classes/image.bbclass:EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startupNotice that '
create_etc_timestamp' does not seem to be used by any recipe. Perhaps it should be removed?
The one that is unused should probably be removed. Please file a bug and/or submit a patch!
Cheers,
Richard
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Gary Thomas
I just noticed that there are two identical functions in image.bbclass to set/update the image timestamp. Why? Left over from a previous era?
$ find meta* -name "*.bb*" -or -name "*.inc" | xargs grep create_etc_timestamp meta/classes/image.bbclass:create_etc_timestamp() { meta/classes/image.bbclass:# export the zap_root_password, create_etc_timestamp and remote_init_link meta/classes/image.bbclass:EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startup
Quoted 5 lines
Quoted 2 lines
Notice that '
create_etc_timestamp' does not seem to be used by any recipe. Perhaps it should be removed?The one that is unused should probably be removed. Please file a bug and/or submit a patch!
Attached.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
From 78b0d6c5a12d53afb13a20e51e1653bd572c52c6 Mon Sep 17 00:00:00 2001
From: Gary Thomas <[email protected]>
Date: Wed, 10 Nov 2010 07:08:48 -0700
Subject: [PATCH] Remove superfluous 'create_etc_timestamp()' function - seems to be a duplicate of 'rootfs_update_timestamp()'
--- meta/classes/image.bbclass | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
meta/classes/image.bbclass +0 -4
@@ -182,10 +182,6 @@ zap_root_password () { mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd } -create_etc_timestamp() { - date -u +%2m%2d%2H%2M%4Y >${IMAGE_ROOTFS}/etc/timestamp -} - # Turn any symbolic /sbin/init link into a file remove_init_link () { if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then
Signature · 1 line
1.6.2.5