• Bug#249274: debpartial: does not work at all (1/2)

    From Adeodato =?iso-8859-1?Q?Sim=F3?=@1:229/2 to All on Sun Aug 15 06:00:08 2004
    From: [email protected]

    package debpartial
    tag 249274 patch
    severity 249274 grave # Renders package unusable || wrong Dependencies
    quit

    * Klaumi Klingsporn [Sun, 16 May 2004 13:45:56 +0200]:

    debpartial doesn't work; I allways get an broken pipe message;


    * Gert Kulyk [Tue, 10 Aug 2004 14:57:36 +0200]:

    I've had the same problem. The Problem is, that the
    script was written when ruby 1.6 was system default.
    Now 1.8 is default, and obviously the API has changed.
    It works fine if you install the required libs using
    the 1.6 version (still shipped with unstable/testing)
    and change the first line in the script
    "/usr/bin/debpartial" from
    "#!/usr/bin/ruby" to "#!/usr/bin/ruby1.6".

    The examples are working with above changes, too. In
    the debcopy script (found in
    /usr/share/doc/debpartial/examples) additionally
    you'll need to change one line to import zlib
    correctly.

    I hope this issue will soon be resolved by the
    Maintainer. If not, I'll try to make a NMU.

    attached are some patches for the debpartial script:

    - debpartial.good-gz addresses the bug in question, using the
    Zlib::GzipWriter.open() method properly (for ruby1.8).

    - debpartial.no-space addresses all the 'don't put space before
    argument parentheses' warnings, which ruby1.8 prints out even
    without -w.

    - and debpartial.no-grouped addresses the '(...) interpreted as
    grouped expression' warnings that get printed with ruby1.8 -w.

    the also attached debcopy.diff does the same for the debcopy sample
    script.


    --
    Adeodato Sim�
    EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621

    When all is summed up, a man never speaks of himself without loss; his accusations of himself are always believed; his praises never.
    -- Michel de Montaigne

    --- debpartial 2003-05-08 12:37:02.000000000 +0200
    +++ debpartial.good-gz 2004-08-15 05:09:46.000000000 +0200
    @@ -863,12 +863,10 @@
    def write_packages_gz (name, dist, cat, arch, sep_pkg, dest_dir, dir)
    file = dir + "binary-#{arch}/Packages.gz"
    install (dest_dir + "/" + dir + "binary-#{arch}")
    - open(dest_dir + "/" + file, "w") { |pkgs_file|
    + Zlib::GzipWriter.open(dest_dir + "/" + file) { |gz|
    print "Writing Packages.gz of #{name} for (#{dist},#{cat},#{arch})... "
    $stdout.flush
    - gz = Zlib::GzipWriter.new(pkgs_file)
    i = $packages[dist + "/" + cat + "/" + arch].packages_file_of(sep_pkg, gz) - gz.close
    print "#{i}.\n"
    }
    end
    @@ -878,15 +876,13 @@
    [] if write_src[dist + "/" + cat] == nil
    file = dir + "source/Sources.gz"
    install (dest_dir + "/" + dir + "source")
    - open(dest_dir + "/" + file, "w") { |pkgs_file|
    + Zlib::GzipWriter.open(dest_dir + "/" + file) { |gz|
    print "Writing Sources.gz of #{name} for (#{dist},#{cat})... "
    $stdo