~ubuntu-branches/debian/wheezy/dpkg/wheezy

« back to all changes in this revision

Viewing changes to scripts/Dpkg/Source/Package/V3/quilt.pm

  • Committer: Bazaar Package Importer
  • Author(s): Guillem Jover, Guillem Jover, Raphaël Hertzog, Jonathan Nieder, Steve Langasek, Mark Hymers, Updated programs translations, Updated man page translations, Updated scripts translations, Updated dselect translations
  • Date: 2011-04-01 23:56:54 UTC
  • Revision ID: james.westby@ubuntu.com-20110401235654-8y800dtb75skfrh7
Tags: 1.16.0
[ Guillem Jover ]
* Use DPKG_MAINTSCRIPT_PACKAGE environment variable as package name on
  dpkg-divert when no --package or --local options have been specified.
* Do not allow versions starting with non-digit when doing strict parsing,
  warn otherwise.
* Update dpkg(1) to note that --status-fd output does not contain newlines
  in error messages anymore (this was fixed in 1.15.0).
* Add a new --status-logger option to dpkg, similar to --status-fd but
  instead invoke the command ourselves and feed the status information
  to its standard input. Suggested by Raphaël Hertzog.
* Add missing space in update-alternative --set-selections output.
* Add missing options to update-alternative --help output.
* Count “conffile name is duplicated” for dpkg-deb warning count summary.
* Improve and clarify strings for translation. Closes: #604914
* Prefix all fatal error messages with “error: ”.
* Do not check presence of update-rc.d in the PATH in dpkg, as it's not
  a program needed for dpkg correct operation.
* Fix dpkg -GEO options on multiple versions of the same packages.
  Closes: #31141
* Propagate --admindir to programs run from maintainer scritpts.
  Closes: #97076
* Do not fail when trying to remove the root directory. This will only
  happen either on distributions where dpkg is a foreign package manager,
  or on artificial dpkg databases.
* Always warn when parsing any package control data which does not have
  an Architecture field except for status and status log files when
  packages are not-installed or half-installed.
* By default reject installing packages w/o an Architecture field. They
  now need --force-architecture, dpkg will still warn about them though.
* Fix build failure when passing --disable-nls to configure.
* Do not segfault on “dpkg -i --no-act”.
* Add missing semicolon to the vsnprintf() compat declaration.
  Thanks to Robert Millan. Closes: #612203
* On install for Ubuntu adjust the i386 GNU cpu name in cputable.
  Thanks to Colin Watson <cjwatson@ubuntu.com>. Closes: #611741
* Sync the info database directory on unpack instead of the temporary
  control information directory, and print the correct pathname on error
  instead of the last file acted on that directory.
* Document in dpkg-query --help output and man page that --list and --show
  arguments are optional.
* Do not read and write the available file unnecessarily.
  Thanks to Michel Lespinasse <walken@zoy.org>. Closes: #397121
* Fix typo in «dpkg-name --overwrite» argument parsing so that it actually
  works at all. Thanks to Ivan Gagis <igagis@gmail.com>. LP: #728708
* Add armhf support to ostable and triplettable. Closes: #594179
* Set the modification time for unpacked symlinks on supported systems.
* Fix undefined value useage in dpkg-genchanges when adding files w/o a
  matching architecture, because they are not present in debian/control,
  this is most commonly the case due to dpkg-distaddfile.
* Terminate immediately on dpkg-divert rename errors instead of propagating
  up the error codes, this improves error reporting and avoids triggering
  leak detectors. Closes: #620380
* When moving a diverted file across filesystems in dpkg-divert, remove
  the source file.

[ Raphaël Hertzog ]
* Fail properly when debian/source/format is empty. Closes: #600854
* Add new deb-src-control(5) manual page documenting the debian/control
  file contained in source packages.
  - it documents the X[SBC]- prefix. Closes: #476335
  - it documents the VCS-* fields too. Closes: #483119
  Thanks to Oxan van Leeuwen <oxan@oxanvanleeuwen.nl> who wrote it
  as part of the Google Code In program.
* Enhance dpkg-shlibdeps to not fail immediatly when a library is not found.
  Instead continue and fail after all problems have been reported. Thanks
  to Chris Baines <cbaines8@gmail.com> for the patch. Closes: #596841
* Fix dpkg-source to not list Debian packaging files as modified
  upstream files in Format "1.0" when unpacking to a non-standard
  directory.
* Apply patch from Colin Watson to let dpkg-buildflags return -O3
  instead of -O2 when building ppc64 packages on Ubuntu. Closes: #612472
* Add new function get_control_path() to Dpkg::Path, it wraps dpkg-query
  --control-path.
* Update dpkg-shlibdeps to be multiarch-ready:
  - use get_control_path() to find symbols/shlibs files
  - parse correctly the output of dpkg --search
* Small fix to support files >2GB in .deb on 64-bit systems. Closes: #616502
  Thanks to Martin Dorey <mdorey@bluearc.com> for the patch.
* dpkg-source now keeps the file ordering in the autogenerated patch when
  regenerating it. Closes: #606080
  Thanks to Colin Watson for the patch.
* dpkg-source now uses a timestamp retrieved from the filesystem when
  resetting the timestamp of patched files so that a time skew when using
  NFS doesn't introduce any inconsistency. Closes: #613023
  Thanks to Jonathan Nieder <jrnieder@gmail.com> for the patch and the
  diagnosis.
* dpkg-source will now remove quilt's .pc directory when --unapply-patches
  is in use. Closes: #591858
* dpkg-source is now a bit less strict when parsing patches:
  - it accepts seeing the same file twice; Closes: #608829
  - it doesn't match on the English text "No newline at end of file" as it
    might be translated in some cases. Closes: #612465
* Improve parser in Dpkg::Control::Hash to not require an empty line
  before the PGP signature. Closes: #617923
  Thanks to Roger Leigh for the initial patch.
* Fix a regression in dpkg-divert where using --rename led to a failure when
  the rename implies crossing file systems. Thanks to Durk Strooisma for
  spotting it.
* Use the correct mtime when installing a file with statoverrides.
  Regression introduced in 1.16.0. LP: #739179
* Remove duplicate word in german translation of dpkg(1). Closes: #616096
* Strip repeated non-significant spaces before and after newlines
  in Uploaders. Closes: #598922
* Ignore whitespaces after options in headers of changelog entries.
  Closes: #605719
* Fix dpkg-source's regression with empty patches (introduced while fixing
  #613023). Closes: #619541

[ Jonathan Nieder ]
* Remove support for use of synchronous sync(2), due to its pernicious
  side-effects and to ease maintenance.
* Clarify that an up-to-date dpkg only needs to be unpacked for
  dpkg-maintscript-helper to work.

[ Steve Langasek ]
* Add new variables to dpkg-architecture, DEB_HOST_MULTIARCH and
  DEB_BUILD_MULTIARCH, that return the "ideal" GNU triplet for each
  architecture which should be used as the path component for library
  installation.

[ Mark Hymers ]
* Add support for Built-Using field. Closes: #619311

[ Updated programs translations ]
* German (Sven Joachim).
* Portuguese (Miguel Figueiredo).
* Spanish (Javier Fernandez-Sanguino).
* Swedish (Peter Krefting).

[ Updated man page translations ]
* German (Helge Kreutzmann).
* Swedish (Peter Krefting).

[ Updated scripts translations ]
* German (Helge Kreutzmann).
* Swedish (Peter Krefting).

[ Updated dselect translations ]
* Spanish (Javier Fernandez-Sanguino).

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
use Dpkg::Gettext;
28
28
use Dpkg::ErrorHandling;
29
29
use Dpkg::Source::Patch;
30
 
use Dpkg::Source::Functions qw(erasedir);
 
30
use Dpkg::Source::Functions qw(erasedir fs_time);
31
31
use Dpkg::IPC;
32
32
use Dpkg::Vendor qw(get_current_vendor run_vendor_hook);
33
33
use Dpkg::Control;
164
164
sub apply_quilt_patch {
165
165
    my ($self, $dir, $patch, %opts) = @_;
166
166
    $opts{"verbose"} = 0 unless defined($opts{"verbose"});
167
 
    $opts{"timestamp"} = time() unless defined($opts{"timestamp"});
 
167
    $opts{"timestamp"} = fs_time($dir) unless defined($opts{"timestamp"});
168
168
    my $path = File::Spec->catfile($dir, "debian", "patches", $patch);
169
169
    my $obj = Dpkg::Source::Patch->new(filename => $path);
170
170
 
171
171
    info(_g("applying %s"), $patch) if $opts{"verbose"};
172
172
    $obj->apply($dir, timestamp => $opts{"timestamp"},
 
173
                verbose => $opts{"verbose"},
173
174
                force_timestamp => 1, create_dirs => 1, remove_backup => 0,
174
175
                options => [ '-t', '-F', '0', '-N', '-p1', '-u',
175
176
                             '-V', 'never', '-g0', '-E', '-b',
221
222
    my @applied = $self->read_patch_list($pc_applied);
222
223
    my @patches = $self->read_patch_list($self->get_series_file($dir));
223
224
    open(APPLIED, '>>', $pc_applied) || syserr(_g("cannot write %s"), $pc_applied);
224
 
    $opts{"timestamp"} = time();
 
225
    $opts{"timestamp"} = fs_time($pc_applied);
225
226
    foreach my $patch (@$patches) {
226
227
        $self->apply_quilt_patch($dir, $patch, %opts);
227
228
        print APPLIED "$patch\n";
236
237
 
237
238
    my $pc_applied = File::Spec->catfile($dir, ".pc", "applied-patches");
238
239
    my @applied = $self->read_patch_list($pc_applied);
239
 
    $opts{"timestamp"} = time();
 
240
    $opts{"timestamp"} = fs_time($pc_applied) if @applied;
240
241
    foreach my $patch (reverse @applied) {
241
242
        my $path = File::Spec->catfile($dir, "debian", "patches", $patch);
242
243
        my $obj = Dpkg::Source::Patch->new(filename => $path);
243
244
 
244
245
        info(_g("unapplying %s"), $patch) if $opts{"verbose"};
245
246
        $obj->apply($dir, timestamp => $opts{"timestamp"},
 
247
                    verbose => 0,
246
248
                    force_timestamp => 1, remove_backup => 0,
247
249
                    options => [ '-R', '-t', '-N', '-p1',
248
250
                                 '-u', '-V', 'never', '-g0', '-E',
249
251
                                 '--no-backup-if-mismatch' ]);
250
252
        erasedir(File::Spec->catdir($dir, ".pc", $patch));
251
253
    }
252
 
    unlink($pc_applied);
 
254
    erasedir(File::Spec->catdir($dir, ".pc"));
253
255
}
254
256
 
255
257
sub prepare_build {
352
354
        # reverse-apply the patch, drop .pc/$patch, re-apply it
353
355
        # with the correct options to recreate the backup files
354
356
        my $patch_obj = Dpkg::Source::Patch->new(filename => $patch);
355
 
        $patch_obj->apply($dir, add_options => ['-R', '-E']);
 
357
        $patch_obj->apply($dir, add_options => ['-R', '-E'], verbose => 0);
356
358
        erasedir(File::Spec->catdir($dir, ".pc", $auto_patch));
357
359
        $self->apply_quilt_patch($dir, $auto_patch);
358
360
    } else {