Hello community, here is the log from the commit of package checkmedia for openSUSE:Factory checked in at Wed Aug 26 15:14:52 CEST 2009. -------- --- checkmedia/checkmedia.changes 2008-10-06 17:06:26.000000000 +0200 +++ checkmedia/checkmedia.changes 2009-08-25 14:57:33.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Aug 25 14:56:10 CEST 2009 - snwint@suse.de + +- fixed tagmedia to use iso size from header + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- checkmedia-2.2.tar.bz2 New: ---- checkmedia-2.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ checkmedia.spec ++++++ --- /var/tmp/diff_new_pack.uO0r1I/_old 2009-08-26 15:13:53.000000000 +0200 +++ /var/tmp/diff_new_pack.uO0r1I/_new 2009-08-26 15:13:53.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package checkmedia (Version 2.2) +# spec file for package checkmedia (Version 2.3) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,7 +23,7 @@ Group: System/Management AutoReqProv: on Summary: Check Installation Media -Version: 2.2 +Version: 2.3 Release: 1 Source: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ checkmedia-2.2.tar.bz2 -> checkmedia-2.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/checkmedia-2.2/tagmedia new/checkmedia-2.3/tagmedia --- old/checkmedia-2.2/tagmedia 2006-05-02 11:20:26.000000000 +0200 +++ new/checkmedia-2.3/tagmedia 2009-08-25 14:54:59.000000000 +0200 @@ -35,10 +35,19 @@ help if $iso eq ''; +$buf_size = 1 << 20; + die "$iso: $!\n" unless open F, $iso; -die "$iso: $!\n" unless sysread F, $buf0, 0x8373; -die "$iso: $!\n" unless sysread F, $tag, 0x200; -die "$iso: file too short\n" unless length($buf0) == 0x8373 && length($tag) == 0x200; +die "$iso: $!\n" unless sysread F, $buf0, $buf_size; +$l = length($buf0); +$buf_size = $l if $l < $buf_size; +die "$iso: file too short\n" if ($l < 0x9000) || ($l & 0x3ff); + +die "$iso: no iso9660 fs\n" if substr($buf0, 0x8000, 7) ne "\x01CD001\x01"; +$iso_size = 2 * unpack("V", substr($buf0, 0x8050, 4)); # in kB + +$tag = substr($buf0, 0x8373, 0x200); +substr($buf0, 0x8373, 0x200) = ' ' x 0x200; if($opt_check) { unshift @opt_add_tag, "check=1"; @@ -58,8 +67,13 @@ $md5 = Digest::MD5->new; $md5->add($buf0); - $md5->add(' ' x 0x200); - $md5->addfile(*F); + + while(($iso_size -= $l >> 10) > 0) { + $l = $iso_size > $buf_size >> 10 ? $buf_size : $iso_size << 10; + $l = sysread F, $buf0, $l; + $md5->add($buf0); + } + $md5 = $md5->hexdigest; unshift @opt_add_tag, "md5sum=$md5"; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org