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

Re: saving .debs to their original name



On Thu, Feb 12, 2004 at 01:43:36AM +0800, Dan Jacobson wrote:
> > Why?  It might change, and you don't need it.  apt-get --print-uris
> > gives you the URI and the filename.  Since you have both, you can
> > either use wget's -O to put it in the right place when downloading,
> > or rename things to the correct filename afterwards.
> 
> In http://jidanni.org/comp/apt-offline/index_en.html I was thinking of
> using wget -i on e.g., the unfamiliar Windows environment, where I
> might not have all that flexibility. Or maybe I needn't worry about
> renaming, anyway e.g. if I were to use dpkg-scanpackages later.
> 
> Therefore, if why apt-get --print-uris gives alternative names were
> documented, we might better understand the dangers of saving to the
> original names. However, I cannot submit http://bugs.debian.org/231776

Like I said in an earlier reply, the epoch is the part for which the URI 
doesn't the file name, so the rename script I posted strips out the 
escaped epoch part.

$ apt-cache show gcc-3.3 | grep-dctrl -sVersion .
Version: 1:3.3.3-0pre3
           ^^^^^^^^^^^

The URL where this version may be downloaded is:
"http://http.us.debian.org/debian/pool/main/g/gcc-3.3/
gcc-3.3_3.3.3-0pre3_i386.deb"
        ^^^^^^^^^^^

Notice the epoch is simply missing in the URL.  When you apt-get install 
it, the epoch will be present, aka gcc-3.3_1%3a3.3.3-0pre3.deb, by 
simpling stripping [0-9]%3a your resulting .debs will match the URIs, 
and "it'll just work".

I see now the flaws with this are (a) files from multiple epochs but 
with the same version would clobber each other and (b) I assume that 
epochs < 10, it only replaces a single digit.



Reply to: