Build succeeds but upload fails with "Unable to find source publication..."

Asked by Braden Pellett

In KeckCAVES/ppa while trying to build and upload binaries for libvrui2.4 I get the error:

   Rejected:
   Unable to find source publication libvrui2.4/2.4-004-1~quantal1 in quantal

I suspect this is because I do a little hackery in the rules file to attemt to create a binary package with a modified version from the source package version. Assuming that is the problem, is there a non-upload-error-producing way to do this?

The reason I am doing that is because (1) I need to support having multiple versions of the library installed in parallel (hence the name "libvrui2.4"), and (2) it is only a few utility executable binaries that are also built that would cause conflicts with future libvrui2.x library installs, so I wanted to split out those binaries into a package with the more generic name "vrui-utils" and move the "2.x" into its version string, i.e. "004" becomes "2.4-004".

Is there a recommended way to do this?

Thanks much!

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
William Grant
Solved:
Last query:
Last reply:
Revision history for this message
Best William Grant (wgrant) said :
#1

The Source field of the binary's DEBIAN/control file must include the source version in parentheses if it doesn't match the binary version. See <http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source>.

You should probably be overriding dh_gencontrol (eg. using "dh_gencontrol -psomepackage -- -vsomeversion") rather than dh_builddeb, which will fix the Source field automatically.

Revision history for this message
Braden Pellett (dabrado) said :
#2

Interesting, I'll look at that!

So the reason I didn't override dh_gencontrol directly was because it seemed to be doing more stuff than just a basic dh_gencontrol call, giving dh_gencontrol various options and around that appending to each packages substvars file and doing a chmod and chown. Namely:

       echo misc:Depends= >> debian/libvrui2.4-dev.substvars
       dpkg-gencontrol -plibvrui2.4-dev -ldebian/changelog -Tdebian/libvrui2.4-dev.substvars -Pdebian/libvrui2.4-dev
       chmod 644 debian/libvrui2.4-dev/DEBIAN/control
       chown 0:0 debian/libvrui2.4-dev/DEBIAN/control
       echo misc:Depends= >> debian/libvrui2.4-doc.substvars
       dpkg-gencontrol -plibvrui2.4-doc -ldebian/changelog -Tdebian/libvrui2.4-doc.substvars -Pdebian/libvrui2.4-doc
       chmod 644 debian/libvrui2.4-doc/DEBIAN/control
       chown 0:0 debian/libvrui2.4-doc/DEBIAN/control
       echo misc:Depends= >> debian/vrui-utils.substvars
       dpkg-gencontrol -pvrui-utils -ldebian/changelog -Tdebian/vrui-utils.substvars -Pdebian/vrui-utils
       chmod 644 debian/vrui-utils/DEBIAN/control
       chown 0:0 debian/vrui-utils/DEBIAN/control
       echo misc:Depends= >> debian/libvrui2.4.substvars
       dpkg-gencontrol -plibvrui2.4 -ldebian/changelog -Tdebian/libvrui2.4.substvars -Pdebian/libvrui2.4
       chmod 644 debian/libvrui2.4/DEBIAN/control
       chown 0:0 debian/libvrui2.4/DEBIAN/control

...so rather than reimplement that stuff in the rules file, I decided to try to just modify the one control file that needed changing.

Would it still be preferrable to override dh_gencontrol? Perhaps there is a way to hook into just the "vrui-utils" part of that without touching the other stuff..? Or is the above more than is needed? Or should I just not worry about copying+pasting the above directly into the rules file and add the one flag for the vrui-utils dh_gencontrol?

Thanks!

Revision history for this message
William Grant (wgrant) said :
#3

Those commands are all invoked by dh_gencontrol. You don't have to reimplement them in rules; just call dh_gencontrol with additional arguments.

Revision history for this message
Braden Pellett (dabrado) said :
#4

Oohh, I understand now! Somehow I missed your point that dh_gencontrol could be invoked just for a single package, so that I could override the version for just one of the packages. Sorry!

Thanks much!

Revision history for this message
Braden Pellett (dabrado) said :
#5

Thanks William Grant, that solved my question.