Ubuntu: How to use dpkg to finish configuring extracted packages



Question:

The command "dpkg -i debfilename.deb" will install (extract and configure) the packages in defilename.deb.

How do I do this same operation in two steps: 1) extract the files, and 2) configure the files?

Alternatively, how could I run the installation step without overwriting the files that already got created the previous time it was run?

I want to edit a line of one source file that has an error and re-install without overwriting that file. Thank you.


Solution:1

You can use dpkg-source in order to pack and unpack the source files of a Debian package.

More info:

Wikipedia dpkg dpkg-dev contains a series of development tools required to unpack, build and upload Debian source packages.[10] These include:

  • dpkg-source packs and unpacks the source files of a Debian package.

As written in Wikipedia Deb File Format

Since Debian 0.93, a deb package is implemented as an ar archive.[7] This archive contains three files in a specific order:

  • debian-binary - Contains a single line giving the package format version number. (2.0 for current versions of Debian).
  • control archive - A tar archive named control.tar contains the maintainer scripts and the package meta-information (package name, version, dependencies and maintainer). Compressing the archive with gzip or xz is supported. The file extension changes to indicate the compression method.
  • data archive - A tar archive named data.tar contains the actual installable files. Compressing the archive with gzip, bzip2, lzma or xz is supported. The file extension changes to indicate the compression method.


Solution:2

The *.deb is an installed package. If the installer included features to allow the user to make modifications during install (such as the phpmyadmin and mysql installers), you would receive a prompt where necessary.

If you don't receive a prompt it isn't part of the package. You would have to install the package, then configure it after the installation.

Alternatively you could try to find the source to the package. Compiling the source gives the user the option of making the type of changes you have mentioned. You could also create a *.deb for the installer that can include end user prompts for custom configuration.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »