Change the dependencies of a deb package
You can change the dependencies of a deb package like this:
- Unpack deb: ar x golden-linux.deb (will create i.e. three files: debian-binary control.tar.gz data.tar.gz)
- Unpack control archive: tar xzf control.tar.gz (will create: postinst postrm preinst prerm md5sums control)
- Fix dependencies in control (use a text editor)
- Repack control.tar.gz: tar c {post,pre}{inst,rm} md5sums control | gzip -c > control.tar.gz
- Repack deb: ar rcs newpackage.deb debian-binary control.tar.gz data.tar.gz (order important! See [Note] )
[Note]: dpkg wouldn't be able to read the metadata of a package quickly if it had to search for where the data section ended!
Ref: serverfault.com
Written by Camilo Cota
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Debian
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#