pkgsrc-WIP-discuss archive

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

[PATCH] cache filename change for mk/git-package.mk



I found wip/emacs-current-nox11 was outdated.

 While modifying it for git-package version, I thought
following line of mk/git-package.mk is NOT appropriate (,which I wrote).

| #   cache file name (compression is not really effective)
| _GIT_DISTFILE.${_repo_}=  
${PKGBASE}-${GIT_MODULE.${_repo_}}-${_GIT_TAG.${_repo_}}.tar
(This line is similar to mk/cvs-package.mk)

This will make the cache file as 
emacs-emacs-2010-07-27.tar 
        for the emacs-current and
emacs-nox11-emacs-2010-07-27.tar 
        for the emacs-current-nox11.

Meaning emacs-current and emacs-current-nox11 does NOT share the
same git repository.

But those two should be the same one.
This is due to ${PKG_BASE} is different.

So the change I would propose:

(The impact of this change is that the name of cache files
under distfiles/git-package/ will be different hereafter. Old
saved (cached) files won't be used unless they are renamed
manually .... but this should not be any serious.)


If no objection in a few days, I would like to commit this, thanks.

Index: mk/git-package.mk
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/mk/git-package.mk,v
retrieving revision 1.3
diff -u -r1.3 git-package.mk
--- mk/git-package.mk   12 Jul 2010 08:30:44 -0000      1.3
+++ mk/git-package.mk   28 Jul 2010 02:26:38 -0000
@@ -91,7 +91,7 @@
 
 # Cache support:
 #   cache file name (compression is not really effective)
-_GIT_DISTFILE.${_repo_}=  
${PKGBASE}-${GIT_MODULE.${_repo_}}-${_GIT_TAG.${_repo_}}.tar
+_GIT_DISTFILE.${_repo_}=  ${GIT_MODULE.${_repo_}}-${_GIT_TAG.${_repo_}}.tar
 
 #   command to extract cache file
 _GIT_EXTRACT_CACHED.${_repo_}=    \
@@ -116,9 +116,9 @@
        cd ${WRKDIR};                                                   \
        if [ ! -d ${_GIT_DISTDIR} ]; then mkdir -p ${_GIT_DISTDIR:Q};  fi;      
\
        ${_GIT_EXTRACT_CACHED.${_repo_}};                               \
-       p="$$(cd ${_GIT_DISTDIR} && ls -t ${PKGBASE}-${GIT_MODULE.${_repo_}}-* 
| head -n 1)";   \
+       p="$$(cd ${_GIT_DISTDIR} && ls -t ${GIT_MODULE.${_repo_}}-* | head -n 
1)";      \
        if [ -n "$$p" ]; then                                           \
-           q="$$(cd ${_GIT_DISTDIR} && ls -t 
${PKGBASE}-${GIT_MODULE.${_repo_}}-* | wc -l)" && \
+           q="$$(cd ${_GIT_DISTDIR} && ls -t ${GIT_MODULE.${_repo_}}-* | wc 
-l)" &&    \
            if [ $$(($$q)) -gt 3 ] ; then           \
               ${STEP_MSG} "(1a) more than 3 generation files found in 
${_GIT_DISTDIR}, you may";       \
               ${STEP_MSG} "     delete them manually to avoid getting them fat 
--> $$p etc" ;          \
---
Makoto Fujiwara, 
Chiba, Japan, Narita Airport and Disneyland prefecture.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
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