Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Preserve the sources extracted by dpkg-source so as to save time

+1
−0

It takes a long time to build even the source package for a PPA of a huge project, and while the build isn't finished my computer is under heavy load so I can barely navigate a browser. The frustration is doubled when I get an error during that process.

Most of the times, errors are caused by a "malformed" patch. To avoid those, I incorporated the habit of copying the patches directory over to the unpacked .orig tarball and executing quilt push -a -v to make sure all patches apply successfully.

However, the Debian tool chest can be a bit arcane at times. That very same patch set occasionally fails when building the package with debuild -S -d -sd. For example,

 dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building chromium-browser using existing ./huge-stuff_116.0.521.orig.tar.xz
### AFTER A LONG TIME... ###
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: error: line after --- isn't as expected in diff 'huge-stuff.orig.lbv71S/debian/patches/priority.patch' (line 5)

This long time, I reckon, is caused by dpkg-source extracting the .orig tarball every single time I issue a build, even if it had just done so for the previous failed build.

Is there a way to preserve the extracted sources so that dpkg-source doesn't have to extract it again in the next iteration?

I couldn't find anything in the manual when looking for tarball.


Only keep reading if you are curious; The following is irrelevant to the question.

The actual error in the question was stupid, caused by the patch header being

--- a/foo/bar.h
--- b/foo/bar.h

instead of

--- a/foo/bar.h
+++ b/foo/bar.h

Nonetheless, quilt push -a -v did happily apply it somehow (exit status 0) when I tried it on the unpacked sources:

Applying patch patches/priority.patch
patching file foo/bar.h

Now at patch patches/priority.patch
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Have you tried `nice` and/or `ionice`? (3 comments)

1 answer

+1
−0

From man dpkg-source,

-ss Specifies that the original source is available both as a directory
    and as a tarfile. dpkg-source will use the directory to create the
    diff, but the tarfile to create the .dsc.  This option must be used
    with care - if the directory and tarfile do not match a bad source
    archive will be generated.

It should also be noted that

If no second argument is supplied then dpkg-source will look for the
original source tarfile package_upstream-version.orig.tar.gz or the
original source directory directory.orig depending on the -sX arguments.

Unfortunately, that build option is only available for source format 1.0, which is obsolete and quite limited (it doesn't even support debian/patches).

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »