LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   When is a package "installed" in debian? (https://www.linuxquestions.org/questions/debian-26/when-is-a-package-installed-in-debian-546315/)

Quakeboy02 04-15-2007 05:07 PM

When is a package "installed" in debian?
 
I ran into an odd situation this weekend. On my test mule I use dmraid. I had to add an offset to pdc.h in order for my old FastTrak66 to see a couple of older drives I have. I made the mistake of using apt-get to remove the debian version of dmraid, and then I used make install to install the version of dmraid I compiled. But, the next time I booted, no dmraid and I was stuck with the classic "waiting on root file system".

I got round this by using a knoppix and apt-get to reinstall the debian dmraid package and then doing a make install over top of that in order to replace libdmraid.a. Apparently there is something different between installing a deb and just doing a make install. Clearly now that I know what's going on I can get around it, but it would be nice to have some basic understanding of what happened.

cgjones 04-15-2007 05:24 PM

My guess would be that installing it via APT sets up any startup scripts that are needed, such as /etc/init.d/dmraid. Whereas compiling it from source doesn't set up any distro specific stuff.

Quakeboy02 04-15-2007 05:30 PM

"My guess would be that installing it via APT sets up any startup scripts that are needed, such as /etc/init.d/dmraid. Whereas compiling it from source doesn't set up any distro specific stuff."

dmraid has to be part of the kernel package in the initramfs (sorry, don't have terminology correct), because it has to get executed to setup the mapper before the kernel takes over the hardware. It's kind of puzzling because I had run update-initramfs but libdmraid.a simply wasn't there when the kernel gave up and tossed me into intramfs. I could see the devmapper there, but no libdmraid.

nx5000 04-16-2007 01:39 AM

Quote:

Originally Posted by Quakeboy02
I ran into an odd situation this weekend. On my test mule I use dmraid. I had to add an offset to pdc.h in order for my old FastTrak66 to see a couple of older drives I have. I made the mistake of using apt-get to remove the debian version of dmraid, and then I used make install to install the version of dmraid I compiled.

You should have used only the debian tool as long as you can.
apt-get build-dep package
apt-get source package
cd package-*
cd src maybe
patch -p1 < ...
cd ..
EDITOR=gvim dch -v 0.5.quake <-- that's supposing you patch version 0.5 of "package" and you want to add your version number.
Enter a comment for your package.
Rebuild the package:
fakeroot debian/rules binary maybe
cd .. ; dpkg -i package_0.5.quake_i386.deb


My guess would be that the debian version of dmraid includes other stuff that you missed when you did a make ?
Or different compile options.

Quakeboy02 04-16-2007 02:42 AM

Quote:

nx5000: You should have used only the debian tool as long as you can.
Thanks!!!!! For some reason, it just didn't occur to me that there would be a *debian* source package for this package. There were some dependency issues, and some confusion over udeb vs deb files. But, I managed to change the header file to add my drives, compile it, and it looks like it works. It's much better this way, assuming it boots up, which I think it will. I'm saving a link to this solution.

Cheers


All times are GMT -5. The time now is 12:12 AM.