Bug#418694: jigdo-file md5sum should ignore --no-check-files option

2008-05-14 Thread Chris Lamb
tags 418694 + patch
thanks

Patch attached.

This modifies the call to jigdo-file md5sum, not jigdo-file itself.


Regards,

-- 
Chris Lamb, UK   [EMAIL PROTECTED]
GPG: 0x634F9A20
diff -urNad jigdo-0.7.3.orig/scripts/jigdo-mirror 
jigdo-0.7.3/scripts/jigdo-mirror
--- jigdo-0.7.3.orig/scripts/jigdo-mirror   2008-05-14 22:27:37.0 
+0100
+++ jigdo-0.7.3/scripts/jigdo-mirror2008-05-14 22:32:26.0 +0100
@@ -143,7 +143,9 @@
 # If possible, check md5sum of template data
 if test $templateMD5; then
 set -- `$jigdoFile md5sum --report=quiet template`
-if test $1 = $templateMD5; then
+if $jigdoFile | grep -- --no-check-files /dev/null 21; then
+log [WARNING - Skipping MD5Sum check]
+elif test $1 = $templateMD5; then
 log Template checksum is correct
 else
 log Error - template checksum mismatch


signature.asc
Description: PGP signature


Bug#418694: jigdo-file md5sum should ignore --no-check-files option

2007-04-11 Thread Richard Atterer
Package: jigdo
Version: 0.7.3-1
Severity: normal

Date: Sun, 8 Apr 2007 17:37:22 -0300
From: Carlos Carvalho [EMAIL PROTECTED]
To: debian-cd@lists.debian.org
Subject: followup: jigdo template mdsum mismatch??
Message-ID: [EMAIL PROTECTED]

Looking at this portion of jigdo-mirror,

# If possible, check md5sum of template data
if test $templateMD5; then
set -- `$jigdoFile md5sum --report=quiet template`
if test $1 = $templateMD5; then
log Template checksum is correct
else
log Error - template checksum mismatch
exitCode=1
rm -f image template
return 0
fi
else

$jigdoFile is jigdo-file --cache=$tmpDir/jigdo-cache.db
--cache-expiry=1w --report=noprogress --no-check-files,

as usual (this is the default in jigdo-mirror). However when used with
--no-check-files jigdo-file does NOT produce any md5sum! Taking a
trace of jigdo-mirror I get this:

+ test OLshs7sHh08k63h8bLp8-Q   -- This is the md5sum of the template,

++ jigdo-file --cache=/home/debian-cd-sync/alpha.cd/jigdo-cache.db --cache-expir
y=1w --report=noprogress --no-check-files md5sum --report=quiet template
+ set --
+ test '' = OLshs7sHh08k63h8bLp8-Q
+ log 'Error - template checksum mismatch'

This shows that jigdo-file is returning an empty checksum. Running
the command by hand does produce nothing, with an exit status of zero.
Removing the --no-check-files argument yields the correct checksum.

This is a bug in jigdo-file, for not ignoring the option when used
with a md5sum command, since the man page says All options are
silently ignored if they are not applicable to the current command.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.9
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-15)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]