and then run the program inside M-x gdb RET of emacs. If I want to
test a possible fix I then just use the same emacs to modify files and
then rerun dpkg-buildpackage and debi to test my changes.
The above is not really usable with v3 source packages: apparently
dpkg-buildpackage modifies the timestamps of source files and emacs
complains that these files have changed on the disk. Should I just
modify emacs to ignore this warning?
I asked my question on #debian-devel and was given the suggestion that
I should copy the source tree to a different directory for build. This
works but is slow and also has the problem that M-x gdb will open
files of the build directory instead of the original one. If I then
accidentally modify something in the build directory it will get
overwritten by the build.
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 84y6gf4egf.fsf@sauna.l.org">http://lists.debian.org/84y6gf4egf.fsf@sauna.l.org
04-22-2010, 05:29 PM
Niels Thykier
proper edit-build-install-test cycle with v3 source packages?
Timo Juhani Lindfors wrote:
> If I hit a bug in a v1 source package I often do
>
> apt-get source foo
> cd foo-*
> DEB_BUILD_OPTIONS="noopt debug nostrip" dpkg-buildpackage -rfakeroot -us -uc
> sudo debi ../foo*.changes
>
> and then run the program inside M-x gdb RET of emacs. If I want to
> test a possible fix I then just use the same emacs to modify files and
> then rerun dpkg-buildpackage and debi to test my changes.
>
> The above is not really usable with v3 source packages: apparently
> dpkg-buildpackage modifies the timestamps of source files and emacs
> complains that these files have changed on the disk. Should I just
> modify emacs to ignore this warning?
>
> I asked my question on #debian-devel and was given the suggestion that
> I should copy the source tree to a different directory for build. This
> works but is slow and also has the problem that M-x gdb will open
> files of the build directory instead of the original one. If I then
> accidentally modify something in the build directory it will get
> overwritten by the build.
>
>
Have you tried adding "-b" to dpkg-buildpackage as well? I think that
should do it (unless the build/clean does weird things).
~Niels
04-22-2010, 06:01 PM
Timo Juhani Lindfors
proper edit-build-install-test cycle with v3 source packages?
Niels Thykier <niels@thykier.net> writes:
> Have you tried adding "-b" to dpkg-buildpackage as well?
Thanks! This seems to work:
$ dget http://people.debian.org/~hertzog/packages/debsrc3.0/sample7_1.0-1.dsc
$ dpkg-source -x sample*.dsc
$ cd sample7-1.0
$ touch -d 1970-01-01 upstream/README
$ dpkg-buildpackage -rfakeroot -us -uc -b
$ ls -l upstream/README
-rw-r--r-- 1 lindi kurp 437 Jan 1 1970 upstream/README
Since source packages are not so sensitive to build directory I
suppose I can generate the source package with
(rsync --delete -a . ../build-foo && cd ../build-foo && dpkg-buildpackage -rfakeroot -uc -us -S)
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 84tyr34b99.fsf@sauna.l.org">http://lists.debian.org/84tyr34b99.fsf@sauna.l.org
04-23-2010, 06:37 AM
Raphael Hertzog
proper edit-build-install-test cycle with v3 source packages?
Hi,
On Thu, 22 Apr 2010, Niels Thykier wrote:
> Timo Juhani Lindfors wrote:
> > The above is not really usable with v3 source packages: apparently
> > dpkg-buildpackage modifies the timestamps of source files and emacs
> > complains that these files have changed on the disk. Should I just
> > modify emacs to ignore this warning?
No, there's no reason for those timestamps to be changed on build.
> Have you tried adding "-b" to dpkg-buildpackage as well? I think that
> should do it (unless the build/clean does weird things).
Using this option just avoids calling dpkg-source and works around what
looks like a bug. Why not report the bug instead?
Timo, I'd be glad if you could check whether the attached patch fixes the
issue for you. If yes, I'll commit it to dpkg.
Cheers,
--
Raphaël Hertzog
Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/
diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm
index 58c494b..ae4223e 100644
--- a/scripts/Dpkg/Source/Package/V3/quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/quilt.pm
@@ -163,12 +163,14 @@ sub apply_quilt_patch {
my ($self, $dir, $patch, %opts) = @_;
$opts{"verbose"} = 0 unless defined($opts{"verbose"});
$opts{"timestamp"} = time() unless defined($opts{"timestamp"});
+ $opts{"force_timestamp"} = 1 unless defined($opts{"force_timestamp"});
+ $opts{"create_dirs"} = 1 unless defined($opts{"create_dirs"});
+ $opts{"remove_backup"} = 0 unless defined($opts{"remove_backup"});
my $path = File::Spec->catfile($dir, "debian", "patches", $patch);
my $obj = Dpkg::Source::Patch->new(filename => $path);
info(_g("applying %s"), $patch) if $opts{"verbose"};
- $obj->apply($dir, timestamp => $opts{"timestamp"},
- force_timestamp => 1, create_dirs => 1, remove_backup => 0,
+ $obj->apply($dir, %opts,
options => [ '-s', '-t', '-F', '0', '-N', '-p1', '-u',
'-V', 'never', '-g0', '-E', '-b',
'-B', ".pc/$patch/" ]);
@@ -327,9 +329,10 @@ sub register_autopatch {
# reverse-apply the patch, drop .pc/$patch, re-apply it
# with the correct options to recreate the backup files
my $patch_obj = Dpkg::Source::Patch->new(filename => $patch);
- $patch_obj->apply($dir, add_options => ['-R', '-E']);
+ $patch_obj->apply($dir, add_options => ['-R', '-E'],
+ force_timestamp => 0);
erasedir(File::Spec->catdir($dir, ".pc", $auto_patch));
- $self->apply_quilt_patch($dir, $auto_patch);
+ $self->apply_quilt_patch($dir, $auto_patch, force_timestamp => 0);
} else {
# Remove auto_patch from series
if ($has_patch) {
04-23-2010, 08:05 AM
Timo Juhani Lindfors
proper edit-build-install-test cycle with v3 source packages?
Raphael Hertzog <hertzog@debian.org> writes:
> Timo, I'd be glad if you could check whether the attached patch fixes the
> issue for you. If yes, I'll commit it to dpkg.
Doesn't seem to help:
$ dget http://people.debian.org/~hertzog/packages/debsrc3.0/sample7_1.0-1.dsc
$ dpkg-source -x sample*.dsc
$ cd sample7-1.0
$ touch -d 1970-01-01 upstream/README
$ dpkg-buildpackage -rfakeroot -us -uc
$ ls -l upstream/README
-rw-r--r-- 1 lindi lindi 437 Apr 23 07:57 upstream/README
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 84pr1q4mqp.fsf@sauna.l.org">http://lists.debian.org/84pr1q4mqp.fsf@sauna.l.org