[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: trying to search how a package installer software works in GNU/LINUX system....



Hi,

HENA FATHIM wrote:

> We tried dpkg_1.15.8.4ubuntu3.1.tar.bz2 and
> we trying to understand the contents of a dpkg_1.15.8.4ubuntu3.1.tar.bz2 's
> src/processarc.c.  Are we doing it the right way?.

Sort of.  If you do

	git clone git://git.debian.org/git/dpkg/dpkg.git

then you will get a copy of the latest version of dpkg, with full history.
Then from the dpkg/ directory you can do

	git gui blame src/processarc.c

to find explanations of how each line came to be the way it is.  That might
or might not help.

> We find there are different packages dpkg-deb
> and dpkg. we identified that dpkg-deb packs, unpacks and provides
> information about Debian archives. dpkg to install and remove packaged from
> the system.

There are two different commands dpkg-deb and dpkg (in the same dpkg
package), though dpkg itself also offers most of dpkg-deb's
functionality.  dpkg-deb provides some functionality for getting at
the content of a .deb:

	-x, --extract archive directory
		Extracts the filesystem tree from a package archive
		into the specified directory.

		Note that extracting a package to the root directory
		will not result in a correct installation!  Use dpkg
		to install packages.

As the manual explains, it does not take care of actual package
installation, and in fact dpkg uses dpkg-deb --fsys-tarfile to do
that.

> If it is dpkg, which file(s) are responsible
> for installing the archived files of a package?....

As has been said a few times, if you are expecting us to find first
the file, then the function, then the line number for you to change,
and then what to change it to, that's not going to work.  I personally
would be quite happy to help someone who shows that they are already
learning, but you haven't seemed to do that.  My advice from before
still applies: you can trace dpkg's behavior using "dpkg -D1".  Now
some additional advice: you can add printf() statements within dpkg to
see when each piece of code is executed, and you can use strace to
see what system calls it is making.  Also: "grep" is your friend.

Kind regards,
Jonathan


Reply to: