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

Re: apt-get --print-uris: why filenames sometimes different?



Dan Jacobson wrote:
$ man apt-get

       --print-uris Instead of fetching the files to install their
              URIs are printed.  Each URI will have the path, the
              destination file name, ... Note that the file name to
              write to will not always match the file name on the
              remote site!...

Indeed, why are some of those names different?  The difference I found
was that sometimes an [0-9]%3a is inserted:

$ apt-get -qq --print-uris dist-upgrade|sed "s=.*/==;s/'//;s/.%3a//"|\
awk '$1!=$2{print $1,$2}' #eliminated the differences with ^^^^^^^^

But why the need to be different?  I'm following
/usr/share/doc/apt/offline.html/ch3.html .

The difference is the epoch. %3a is the escape code for ":". When the upstream versioning becomes screwy for whatever reason, an epoch[a number followed by a colon] is prepended to the debian version[or the epoch is bumped up a notch] so that it sorts correctly[newer versions need to sort before older versions]. It isn't possible to get the uri to match the filename conservatively cause both "%" and/or ":" would need to be escaped/would be escaped by wget so this is how it was decided it would be done since it was also decided that the filename would include the full version.

Also, I don't understand why are you are trying to eliminate the differences, they are there for a reason[apt will look for the filenames with the %3a in /var/cache/apt/archives/ not the filenames corresponding to the uri's.



Reply to: