I'm working on a project that [1] that aims to bring the PKGBUILD format used 
on Arch Linux to Debian. That's besides the point though, and it's mainly just 
to help showcase what I'm doing brought me to my current issue.



Anyway, part of the process that my program previously used is running 'dpkg 
-b' to build a directory layout into a .deb package. This always seemed to take 
forever though, and I've since gone with just creating the .deb package 
manually [2] with tar and ar.



When I try installing the packages my program builds (with 'apt install 
./debname.deb'), it works fine. But if I then try to reinstall the package 
(with 'apt reinstall ./debname.deb'), this error keeps popping up for some 
reason (the variables surrounded by '{}' represent values in a control file):



Repository is broken: {Package}:{Architecture} (= {Version}) has no Size 
information



Is there anything I'm doing wrong when creating the .deb package (mainly 
concerned with link 2 where the actual package creation takes place)? I've 
tried looking at 'dpkg-deb/build.c' in dpkg's source code [3] to see what dpkg 
might be doing when building packages, but nothing I tried got me to any 
solution.



[1]: https://github.com/makedeb/makedeb

[2]: 
https://github.com/makedeb/makedeb/blob/alpha/src/functions/fakeroot_build.sh#L44-L53

[3]: 
https://salsa.debian.org/dpkg-team/dpkg/-/blob/main/dpkg-deb/build.c#L504-513

---

Hunter Wittenborn

https://www.hunterwittenborn.com

https://github.com/hwittenborn

Reply via email to