bhobjj
09-04-2006, 06:09 PM
TIP: Hacking a DEB Package With dpkg-deb
Sometimes, a deb will have the wrong (or unnecessary) dependency information in the package, or you may just want to change it for some other reason. With dpkg-deb, you can hack a deb package.
WARNING: You could break things by doing this.
You can use dpkg-deb to edit the package and change its dependencies.
Extract the filesystem tree to a directory "packagename.x.x.x":
$ dpkg-deb -x packagename.x.x.x.deb packagename.x.x.x
Extract the control file information:
$ dpkg-deb -e packagename.x.x.x.deb packagename.x.x.x/DEBIAN
$ cd packagename.x.x.x/DEBIAN
Edit the file called: control
Change the desired version number for the dependency that you want to change.
$ cd ../../
Rebuild the deb package:
$ dpkg-deb -b packagename.x.x.x packagename.x.x.x.deb
Reference:
man dpkg-deb
Sometimes, a deb will have the wrong (or unnecessary) dependency information in the package, or you may just want to change it for some other reason. With dpkg-deb, you can hack a deb package.
WARNING: You could break things by doing this.
You can use dpkg-deb to edit the package and change its dependencies.
Extract the filesystem tree to a directory "packagename.x.x.x":
$ dpkg-deb -x packagename.x.x.x.deb packagename.x.x.x
Extract the control file information:
$ dpkg-deb -e packagename.x.x.x.deb packagename.x.x.x/DEBIAN
$ cd packagename.x.x.x/DEBIAN
Edit the file called: control
Change the desired version number for the dependency that you want to change.
$ cd ../../
Rebuild the deb package:
$ dpkg-deb -b packagename.x.x.x packagename.x.x.x.deb
Reference:
man dpkg-deb