1

I'm trying to modify an nvidia-related package from the Ubuntu Saucy repositories. I change the Build-Depends: line, I run debuild -S to generate a source upload for my PPA, and... surprise, the Build-Depends line in debian/control reverts to the original. How is this possible and how do I prevent this insanity? I mean, in general, how can a package affect the input to its build process?

This is similar to gcc -o prog prog.c being able to change prog.c. I don't know why Debian made source building so Turing complete -- or why anyone would take advantage of such misguided features.

dget http://archive.ubuntu.com/ubuntu/pool/restricted/n/nvidia-graphics-drivers-319-updates/nvidia-graphics-drivers-319-updates_319.60-0ubuntu1.dsc
dpkg-source -x nvidia-graphics-drivers-319-updates_319.60-0ubuntu1.dsc
# change the Build-Depends line
perl -pi.bak -e 's/(xserver-xorg-dev)/xserver-xorg-dev-lts-raring | $1/' debian/control
cp debian/control /tmp
debuild -S
diff debian/control /tmp/control # proving debuild changed debian/control
2
  • 1
    Can you list the exact commands you used to get to that point? For example, did you use apt-get source to download the sources? – Faheem Mitha Oct 23 '13 at 14:01
  • Repro steps added to OP – dan3 Oct 23 '13 at 14:19
2

I see a control.in file at nvidia-graphics-drivers-319-updates-319.60/debian/templates/control.in. I assume the control file is regenerated from this file, though I've not checked this carefully. I've run into such situations before, usually with more complex packaging. I suggest altering that file instead of the control file.

1
  • Let's see if that works, thanks. If so, this is not such a new mechanism as I thought. – dan3 Oct 23 '13 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.