Don't regenerate GNU Info if the dir contains a .keepinfodir file, bug 257260.
authorUlrich Mueller <ulm@gentoo.org>
Fri, 3 Sep 2010 17:33:41 +0000 (19:33 +0200)
committerUlrich Mueller <ulm@gentoo.org>
Sun, 5 Sep 2010 10:29:36 +0000 (12:29 +0200)
bin/ebuild-helpers/prepinfo
pym/_emerge/main.py

index fa37e5e6438f45fa56b7a911e43f94441eec7e78..cbbba3ed0b4ac56deca56122581d5e726f226b64 100755 (executable)
@@ -24,6 +24,9 @@ if [[ ! -d ${D}${infodir} ]] ; then
 fi
 
 find "${D}${infodir}" -type d -print0 | while read -d $'\0' x ; do
+       for f in "${x}"/.keepinfodir*; do
+               [[ -e ${f} ]] && continue 2
+       done
        rm -f "${x}"/dir{,.info}{,.gz,.bz2}
 done
 
index 4ca9283dd39e044a7127dfb647baaf88300b7ba1..a5d5bf8caa08150f475fa983cc2a2e59539debbb 100644 (file)
@@ -107,11 +107,13 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
                        if z=='':
                                continue
                        inforoot=normpath(root+z)
-                       if os.path.isdir(inforoot):
-                               infomtime = os.stat(inforoot)[stat.ST_MTIME]
-                               if inforoot not in prev_mtimes or \
-                                       prev_mtimes[inforoot] != infomtime:
-                                               regen_infodirs.append(inforoot)
+                       if os.path.isdir(inforoot) and \
+                               not [x for x in os.listdir(inforoot) \
+                               if x.startswith('.keepinfodir')]:
+                                       infomtime = os.stat(inforoot)[stat.ST_MTIME]
+                                       if inforoot not in prev_mtimes or \
+                                               prev_mtimes[inforoot] != infomtime:
+                                                       regen_infodirs.append(inforoot)
 
                if not regen_infodirs:
                        portage.writemsg_stdout("\n")