[Bug 460894] New: create_md5sums does not handle multiple arguments
https://bugzilla.novell.com/show_bug.cgi?id=460894 Summary: create_md5sums does not handle multiple arguments Product: openSUSE 11.1 Version: Final Platform: Other OS/Version: openSUSE 11.1 Status: NEW Severity: Minor Priority: P5 - None Component: AutoYaST AssignedTo: ug@novell.com ReportedBy: bh-novell@mk-sys.cz QAContact: qa@suse.de Found By: --- Created an attachment (id=261429) --> (https://bugzilla.novell.com/attachment.cgi?id=261429) quick fix The create_md5sums script from inst-source-utils package doesn't handle multiple arguments correctly. Running create_md5sums dir1 dir2 tries to create sums in directory 'dir1 dir2' while in 10.3 it created sums in directories dir1 and dir2. Included quick fix doesn't handle directories with names including spaces (but current create_md5sums doesn't handle them either). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User bh-novell@mk-sys.cz added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c1 --- Comment #1 from Michal Kubeček <bh-novell@mk-sys.cz> 2008-12-19 10:58:26 MST --- Created an attachment (id=261431) --> (https://bugzilla.novell.com/attachment.cgi?id=261431) fixed version of create_md5sums This version fixes handling of directories and files with names containing spaces as well. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 Uwe Gansert <ug@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ug@novell.com AssignedTo|ug@novell.com |lrupp@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User lrupp@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c2 Lars Vogdt <lrupp@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |lrupp@novell.com Info Provider| |bh-novell@mk-sys.cz --- Comment #2 from Lars Vogdt <lrupp@novell.com> 2009-01-21 07:56:46 MST --- Cool! Thanks! But I want to avoid the people just stupidly calling "create_md5sums" get MD5SUM files in their current directory. So: are you fine with removing the first part of your patch? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 Lars Vogdt <lrupp@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low Platform|Other |All Found By|--- |Community User Severity|Minor |Enhancement -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User bh-novell@mk-sys.cz added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c3 Michal Kubeček <bh-novell@mk-sys.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|bh-novell@mk-sys.cz | --- Comment #3 from Michal Kubeček <bh-novell@mk-sys.cz> 2009-01-22 17:16:47 MST --- No objections from me. In fact, the only reason why I did this change was the line test -z "$ROOTDIRS" && ROOTDIRS="$MYPWD" which is useless otherwise. But what you say in Comment #2 makes sense. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User lrupp@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c4 Lars Vogdt <lrupp@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #4 from Lars Vogdt <lrupp@novell.com> 2009-01-26 09:48:12 MST --- ok, thanks. Keeping this in my mind for the next update of inst-source-utils. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 Lars Vogdt <lrupp@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |464903 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User lrupp@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c5 --- Comment #5 from Lars Vogdt <lrupp@novell.com> 2009-01-27 07:15:24 MST --- Created an attachment (id=267921) --> (https://bugzilla.novell.com/attachment.cgi?id=267921) Enhanced create_md5sums script This is the version for the next inst-source-utils update. Including your fixes and an additional "--quiet" option. Please test ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 Lars Vogdt <lrupp@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |bh-novell@mk-sys.cz -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User bh-novell@mk-sys.cz added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c6 Michal Kubeček <bh-novell@mk-sys.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|bh-novell@mk-sys.cz | --- Comment #6 from Michal Kubeček <bh-novell@mk-sys.cz> 2009-01-27 19:01:17 MST --- Created an attachment (id=268125) --> (https://bugzilla.novell.com/attachment.cgi?id=268125) proposed fix of 297921 The version from Comment #5 does not handle spaces in arguments correctly, like in create_md5sums 'some dir' (subdirectories are OK). Proposed fix is attached. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User lrupp@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c7 Lars Vogdt <lrupp@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |bh-novell@mk-sys.cz --- Comment #7 from Lars Vogdt <lrupp@novell.com> 2009-01-28 01:54:43 MST --- Thanks! I really forgot the fix in the for-loop... But one question is left on my side: --- bug-460894_create_md5sums-4 2009-01-28 09:45:36.000000000 +0100 +++ /usr/bin/create_md5sums 2009-01-28 09:53:03.000000000 +0100 @@ -67,12 +67,11 @@ ROOTDIRS="$*" TMPFILE=$(mktemp /tmp/.create_md5sums.XXXXXX) MYPWD=$(pwd) -ROOTDIRS= -if [ $# -le 0 ]; then ROOTDIRS="$MYPWD"; fi +test -z "$ROOTDIRS" && ROOTDIRS="$MYPWD" for ROOTDIR in "${ROOTDIRS:-$@}" ; do case "$ROOTDIR" in /*) ;; *) ROOTDIR="$MYPWD/$ROOTDIR" ;; Whats the real different behind this two versions? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User bh-novell@mk-sys.cz added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c8 Michal Kubeček <bh-novell@mk-sys.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|bh-novell@mk-sys.cz | --- Comment #8 from Michal Kubeček <bh-novell@mk-sys.cz> 2009-01-28 20:44:34 MST --- The problem is that once you do ROOTDIRS="$*", you cannot distinguish create_md5sums a b # two directories: 'a' and 'b' create_md5sums 'a b' # one direcotry: 'a b' as ROOTDIRS contains 'a b' in both cases. The version named /usr/bin/create_md5sums (lines starting with plus sign) in Comment #7 for create_md5sums a b tries to process directory 'a b' (as version in 11.1 does). Of course if the script were not to process current directory when no directory provided, the whole fragment could be simplified to TMPFILE=$(mktemp /tmp/.create_md5sums.XXXXXX) MYPWD=$(pwd) for ROOTDIR in "$@"; do case "$ROOTDIR" in ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=460894 User lrupp@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=460894#c9 --- Comment #9 from Lars Vogdt <lrupp@novell.com> 2009-02-03 04:30:51 MST --- Created an attachment (id=269581) --> (https://bugzilla.novell.com/attachment.cgi?id=269581) fixed create_md5sums file Thanks. I've attached the hopefully "final" version for the next inst-source-utils update. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com