|
声明: slackpkg 算是很关键的程序,所以打补丁之前您需要知道您在做什么。欢迎提意见和建议~;)
#1: 以前 slackpkg upgrade-all 找要更新的包需要等个几分钟,现在一眨眼就 OK 了~;)
- --- /ext4/slackware_rsync/slackware64-current/slackware64/ap/slackpkg-2.80.2-noarch-3/usr/libexec/slackpkg/core-functions.sh 2009-07-27 09:33:49.000000000 +0800
- +++ /usr/libexec/slackpkg/core-functions.sh 2009-08-22 07:41:30.106445523 +0800
- @@ -567,7 +567,11 @@
- done
- ;;
- upgrade-all)
- - for i in $(cut -f2 -d\ ${TMPDIR}/tmplist); do
- + cut -f2-6 -d\ ${TMPDIR}/tmplist > ${TMPDIR}/lpkg
- + cut -f2-6 -d\ ${TMPDIR}/pkglist > ${TMPDIR}/spkg
- + potential=$(cat ${TMPDIR}/{s,l}pkg | sort | uniq -u | cut -f1 -d\ - | uniq -d )
- + #for i in $(cut -f2 -d\ ${TMPDIR}/tmplist); do
- + for i in $potential; do
- givepriority ${i}
- [ ! "$FULLNAME" ] && continue
复制代码
#2: slackpkg new-config 不能找到 /etc 以外的 .new 文件,有时候这会令人很头疼,打这个补丁就好了:
- --- a/usr/libexec/slackpkg/functions.d/post-functions.sh 2009-07-27 09:33:49.000000000 +0800
- +++ b/usr/libexec/slackpkg/functions.d/post-functions.sh 2009-08-18 01:45:33.706801788 +0800
- @@ -113,21 +113,27 @@
-
- looknew() {
-
- - # with ONLY_NEW_DOTNEW set, slackpkg will search only for
- - # .new files installed in actual slackpkg's execution
- - if [ "$ONLY_NEW_DOTNEW" = "on" ]; then
- - ONLY_NEW_DOTNEW="-cnewer $TMPDIR/timestamp"
- - else
- - ONLY_NEW_DOTNEW=""
- - fi
- -
- echo -e "\nSearching for NEW configuration files"
- - FILES=$(find /etc -name "*.new" ${ONLY_NEW_DOTNEW} \
- - -not -name "rc.inet1.conf.new" \
- - -not -name "group.new" \
- - -not -name "passwd.new" \
- - -not -name "shadow.new" \
- - -not -name "gshadow.new" 2>/dev/null)
- + #DOTNEWFILES=$(gzip -cd ${WORKDIR}/*-dotnew-filelist.gz)
- + DOTNEWFILES=$(cat /var/log/packages/* | \
- + grep -Eo '[^ ]*\.new$' | \
- + sed -e '/etc\/group.new$/d' -e '/etc\/passwd.new$/d' -e '/etc\/shadow.new$/d' \
- + -e '/etc\/gshadow.new$/d' -e '/etc\/rc.d\/rc.inet1.conf.new$/d')
- +
- + FILES=''
- + for i in $DOTNEWFILES; do
- + # with ONLY_NEW_DOTNEW set, slackpkg will search only for .new
- + # files installed in actual slackpkg's execution
- + if [ "$ONLY_NEW_DOTNEW" = "on" ]; then
- + if [ "/${i}" -nt "$TMPDIR/timestamp" ]; then
- + FILES=$FILES' /'${i}
- + fi
- + else
- + if [ -e "/${i}" ]; then
- + FILES=$FILES' /'${i}
- + fi
- + fi
- + done
- if [ "$FILES" != "" ]; then
- echo -e "\n\
- Some packages had new configuration files installed.
复制代码 |
|