On Friday 29 Aug 2003 8:29 pm, Richard Bos wrote:
Op vrijdag 29 augustus 2003 17:50, schreef Keith Powell:
I have a lot of packages in my /var/cache/apt/archives folder. I would like APT to install them all on a new SuSE installation on another hard drive rather than downloading them all again. So I burnt them on to a CD.
I then copied them on to the new hard drive, keeping the same path. However, I can't get APT on the new hard drive to install them. If I reselect all these packages with Synaptic, it wants to download them all again, not look in the folder.
How can I get APT to look in the folder and just install them from there?
Does your sources.list file look the same? Did you do an "apt-get update" at the new machine? Are you sure that the rpms are the most recent one, if there are newer pkgs at the server, these will be selected.
I have tried "rpm --rebuilddb" but that hasn't solved it.
Apt and rpm are 2 complete different things. rpm is the truck bringing the load and apt is the manager telling what to load and where to bring it.
An associated question:
Does APT make a log of what it downloads? I think it must do. For example,
apt-get does not do did natively. You could add the following script:
/usr/lib/apt/scripts/log
for i, pkg in ipairs(pkglist()) do if statupgrade(pkg) then print(pkgname(pkg)..": "..verstr(pkgvercur(pkg)).." -> "..verstr (pkgvercand(pkg))) end end
Now in /etc/apt/apt.conf you have to connect this to an apt-get slow, e.g: Scripts::Apt::Upgrade:: "log";
Now each time a upgrade is performed you get the update info.
More about apt and scripting at: https://moin.conectiva.com.br/AptRpm/Scripting
if 8 packages are marked in Synaptic for downloading and the download is interrupted after only a few have been downloaded, if these same 8 packages are later marked again for the download to be resumed, those already downloaded are skipped, but they are all installed. I can't find where it logs what it is doing.
Perhaps there is one (simple?) answer for both questions?
Apt sees the package in the archive directory and knows that the download is complete. For this reason it can skip the download.
Hello Richard. Thank you for your comprehensive reply, and sorry for the delay in answering it. I did do an "apt-get update" on the new installation. Although I assumed that the files on the repository were the same as the ones on the hard drive, the ones on the drive were about two weeks old, so they may have been superceeded. I must check later today, when I have time. I did an "rpm --rebuilddb" in case APT looked in that file during its checking. I didn't know if it did or not. At that time, I was trying all sorts of things to get APT to install from the hard drive. Thank you for the script. Cheers Keith