pkgsrc-WIP-discuss archive

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

Re: mk/git-package.mk (eliminates caching if no updates)



  Once I had a proposal for mk/git-package.mk to implement
non-cache-file-update if the repository has no any changes
since recent cache files in hand.

  The discussions were that all VCS packages having cache
support would have the similar mechanism especially cvs and
svn have very much similar code.

  Today, I noticed svn-package.mk does not honor old cache
file.  Meaning that the same day cache is effective (can be
read), but other old ones may be ingored.

  I have looked at cvs-package.mk and svn-package.mk and they
should be more mimic than the shape of today.

  So, for the first step, I would like to modify cvs-package.mk
part without any logical change (with very minor exception).

  The comparison is made by following command.
--------
(..wip/mk)% sed -e 's/Subversion/CVS/g' -e 's/SVN/CVS/g' -e 's/svn/cvs/g' 
svn-package.mk 
   >!  svn-package.mk-compare
(..wip/mk)% diff -u svn-package.mk-compare cvs-package.mk|less
--------
Thanks a lot,
---
Makoto Fujiwara, 
mef%NetBSD.org@localhost


Index: cvs-package.mk
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/mk/cvs-package.mk,v
retrieving revision 1.36
diff -u -r1.36 cvs-package.mk
--- cvs-package.mk      20 Nov 2009 11:18:59 -0000      1.36
+++ cvs-package.mk      25 Sep 2011 11:37:27 -0000
@@ -90,7 +90,7 @@
 
 DISTFILES?=            # empty
 PKGNAME?=              ${DISTNAME:C,-[0-9].*,,}-cvs-${_CVS_PKGVERSION}
-# Enforce PKGREVISION unless CVS_TAG is set:
+# Enforce PKGREVISION unless CVS_TAG is set
 .if empty(CVS_TAG)
 . if defined(CHECKOUT_DATE)
 PKGREVISION?=          $(CHECKOUT_DATE:S/-//g)
@@ -124,7 +124,7 @@
 
 .for repo in ${CVS_REPOSITORIES}
 .  if !defined(CVS_ROOT.${repo})
-PKG_FAIL_REASON+=      "[cvs-package.mk] CVS_ROOT.${repo} must be set."
+PKG_FAIL_REASON+=      "[cvs-package.mk] CVS_ROOT."${repo:Q}" must be set."
 .  endif
 .endfor
 
@@ -152,6 +152,7 @@
 # Generation of repository-specific variables
 #
 
+# determine appropriate checkout date or tag
 .for repo in ${CVS_REPOSITORIES}
 CVS_MODULE.${repo}?=   ${repo}
 
@@ -185,7 +186,7 @@
 #   create cache archive
 _CVS_CREATE_CACHE.${repo}=     \
        ${STEP_MSG} "Creating cached CVS archive 
"${_CVS_DISTFILE.${repo}:Q}"."; \
-       ${MKDIR} ${_CVS_DISTDIR:Q};                                     \
+       ${MKDIR} ${_CVS_DISTDIR:Q};                                             
        \
        pax -w -z -f ${_CVS_DISTDIR}/${_CVS_DISTFILE.${repo}:Q} 
${CVS_MODULE.${repo}:Q}
 .endfor
 
@@ -212,9 +213,13 @@
        esac;                                                           \
        ${STEP_MSG} "Downloading "${CVS_MODULE.${repo}:Q}" from 
"${CVS_ROOT.${repo}:Q}"."; \
        ${SETENV} ${_CVS_ENV}                                           \
-         ${_CVS_CMD} ${_CVS_FLAGS} -d ${CVS_ROOT.${repo}:Q}            \
-           checkout ${_CVS_CHECKOUT_FLAGS} ${_CVS_TAG_FLAG.${repo}}    \
-             -d ${repo} ${CVS_MODULE.${repo}:Q};                               
\
+         ${_CVS_CMD}                                                   \
+                       ${_CVS_FLAGS}                                   \
+                       -d ${CVS_ROOT.${repo}:Q}                        \
+                       checkout ${_CVS_CHECKOUT_FLAGS}                 \
+                       ${_CVS_TAG_FLAG.${repo}}                        \
+                       -d ${repo}                                      \
+                       ${CVS_MODULE.${repo}:Q};                        \
        ${_CVS_CREATE_CACHE.${repo}}
 .endfor


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
pkgsrc-wip-discuss mailing list
pkgsrc-wip-discuss%lists.sourceforge.net@localhost
https://lists.sourceforge.net/lists/listinfo/pkgsrc-wip-discuss


Home | Main Index | Thread Index | Old Index