[OpenWrt-Devel] want to clarify why a local mirror doesn't work for mtd-utils

Robert P. J. Day rpjday at crashcourse.ca
Sun Sep 28 13:00:08 EDT 2014


  i asked about this once upon a time, and i did some extra research
recently, so i just want to clarify how i *think* some downloads are
being done -- specifically, mtd-utils.

  i set up a local mirror, and it has a mtd-utils-1.4.5.tar.gz tarball
in it, but if i'm setting up a new openwrt build directory, that
tarball simply won't be used and, based on what i've read, here's why.

  here's an early snippet from tools/mtd-utils/Makefile:

PKG_NAME:=mtd-utils
PKG_VERSION:=1.4.5

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5319b84974fcb71504aed2d1b8285e9c0a4a4bb8
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_CAT:=zcat

  so, *if* i understand this correctly, the source for mtd-utils is
obtained by checking out a specific commit ID from the mtd-utils git
repo -- that would be the commit ID (apparently) corresponding to
version 1.4.5. and upon such a checkout, that build's dl/ downloads
directory will now have the tarball mtd-utils-1.4.5.tar.gz.  so far,
so good.

  however, if i copy that tarball to my local mirror directory to be
used for any subsequent builds, it will never be used since there is
no md5sum setting in the Makefile, so that source will always be
downloaded anew in each new build directory, is that correct?

  also, there is no point adding a "PKG_SOURCE_MD5SUM=" setting to
that Makefile since (as i see it), every time you check out the same
version of mtd-utils from its git repo, the subsequent tarball will
have a different md5sum value, simply due to the internal timestamp
corresponding to the creation time of the tarball.

  am i understanding all this correctly? or have i just misread
something? it sure seems that that's what's happening, unless i've
completely messed up my testing. and, surely, that can't be the only
package that will act that way -- i just used mtd-utils since that's
the only example i've stumbled over so far.

  thoughts?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list