1

I am managing repository with a with reprepro. Sometimes I need to upload source packages to the repo. For several packages reprepro asks for additional information:

 $ reprepro -b /srv/reprepro/ubuntu/ includedsc utopic /tmp/packages/buildenv_cocaine_04.03.2015-11.50/blackhole_0.2.3-1.dsc
 No section and no priority for 'blackhole', skipping.

However, the binary package contains all I need:

  # dpkg -I /tmp/packages/buildenv_cocaine_04.03.2015-11.50/blackhole-dev_0.2.3-1_amd64.deb | grep -i "section\|priority"
  Section: libdevel
  Priority: extra

I guess that's a bug in a reprepro, so I would like to implement a workaround that could check the missing sections automatically. Which utility can I use in order to inspect source package?

Vitaly Isaev
  • 611
  • 1
  • 7
  • 19

1 Answers1

2

When uploading packages, the section and priority are read from the .changes file, in the Files: stanzas (see https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Files).

To retrieve the section and priority from a .dsc (and the associated files), you can use dscextract from the devscripts package with a little scripting.

dscextract <yourdsc> debian/control

will extract debian/control (or fail if it can't); then you can read the section and priority from source section of the control file (stop at the first empty line).

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • Thanks for a prompt reply! Unfortunately that doesn't work when the name of `.dsc` and corresponding tarball `.tar.xz` doesn't match each other. I guess this happens quite often when several packages are built from the same tarball. In such case dscextract can't resolve this: `# dscextract cocaine-framework-native_0.11.1.3.dsc debian/control ./cocaine-framework-native_0.11.1.3.tar.gz not found` – Vitaly Isaev Mar 04 '15 at 15:45
  • How do you end up with a `.dsc` without the corresponding tarball? Would it be possible for you to post your `.dsc`? – Stephen Kitt Mar 04 '15 at 15:54
  • Thank you! [Here](http://dropmefiles.com/2R7ta) is the one of my `dsc`. You can also reproduce them if you build this project: `git clone https://github.com/cocaine/cocaine-framework-native --recursive -b v0.11` – Vitaly Isaev Mar 04 '15 at 16:58
  • Thanks. I still don't understand how you end up with a `.dsc` with no corresponding tarball though... – Stephen Kitt Mar 04 '15 at 22:46
  • I would be very grateful if you could build that project and confirm or refute the absence ot `tar.xz` in the end of build process. I tried to build them multiple times and had no luck. Probably my build system is broken or project is inproperly configured. – Vitaly Isaev Mar 05 '15 at 09:35
  • I built `cocaine-core` and `cocaine-framework-native`, and after fixing the build-dependencies on the latter (https://github.com/cocaine/cocaine-framework-native/pull/17) I got both a `.dsc` and a matching `.tar.xz`. – Stephen Kitt Mar 07 '15 at 15:05
  • thanks a lot! You showed me the way of fixining the similar problems with other packages. – Vitaly Isaev Mar 08 '15 at 13:22