Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-16-2009, 12:51 AM
|
#1
|
Member
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423
Rep:
|
slackpkg failed to find /usr/lib64/man.conf.new or man.conf should be in /etc?
slackpkg only look for .new files in /etc, right? But man has it's configuration file in /usr/lib(64)...
I see man was configured with
Code:
CFLAGS="$SLKCFLAGS" \
./configure +lang all +traditional -confdir /usr/lib${LIBDIRSUFFIX}
in man.SlackBuild.
so why use -confdir /usr/lib${LIBDIRSUFFIX}? Or slackpkg should add a exception for it?
|
|
|
08-16-2009, 07:18 AM
|
#2
|
Member
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215
Rep:
|
In addition to /usr/lib/man.conf.new, I also missed:
/usr/share/vim/vimrc.new.
I think it's been there since May. 
|
|
|
08-16-2009, 08:27 AM
|
#3
|
Member
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423
Original Poster
Rep:
|
Hmm, horrible... Maybe slackpkg should grab all the .new files from something like /var/log/packages/* and check the existence of them. Rather than find .new files in some directories...
|
|
|
08-16-2009, 09:22 AM
|
#4
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Rep: 
|
Write PiterPunk and suggest it.
|
|
|
08-16-2009, 09:58 AM
|
#5
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
Quote:
Originally Posted by Bruce Hill
Write PiterPunk and suggest it.
|
Indeed, that'd be the most appropriate sol'n in the long term. Meanwhile, depend on:
shell# find / -name *.new
to be sure.
Sasha
|
|
|
08-16-2009, 10:10 AM
|
#6
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Rep: 
|
grissiom knows find ... actually, write Piter with your fix in "diff -u"
That's what I've done, and he responds.
|
|
|
08-16-2009, 10:59 PM
|
#7
|
Member
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423
Original Poster
Rep:
|
Quote:
Originally Posted by GrapefruiTgirl
Indeed, that'd be the most appropriate sol'n in the long term. Meanwhile, depend on:
shell# find / -name *.new
to be sure.
Sasha
|
This will be painful..... ;(
|
|
|
08-16-2009, 11:02 PM
|
#8
|
Member
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423
Original Poster
Rep:
|
Quote:
Originally Posted by Bruce Hill
grissiom knows find ... actually, write Piter with your fix in "diff -u"
That's what I've done, and he responds.
|
Thanks for the suggestion~ I hope I could write the patch... Hmm, a busy night...
|
|
|
08-17-2009, 01:19 AM
|
#9
|
Member
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423
Original Poster
Rep:
|
Ok, here is the patch: (I have mailed Piter as well)
Code:
--- 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-17 13:59:36.546147926 +0800
@@ -113,21 +113,22 @@
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)
+ 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 [ -r "/${i}" ]; then
+ FILES=$FILES' '${i}
+ fi
+ fi
+ done
if [ "$FILES" != "" ]; then
echo -e "\n\
Some packages had new configuration files installed.
--- a/usr/libexec/slackpkg/core-functions.sh 2009-07-27 09:33:49.000000000 +0800
+++ b/usr/libexec/slackpkg/core-functions.sh 2009-08-17 13:57:01.685149882 +0800
@@ -937,6 +937,10 @@
for i in $DIRS; do
bunzip2 -c $TMPDIR/${i}-MANIFEST.bz2 | awk -f /usr/libexec/slackpkg/filelist.awk | \
gzip > ${TMPDIR}/${i}-filelist.gz
+ bunzip2 -c $TMPDIR/${i}-MANIFEST.bz2 | 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' | \
+ gzip > ${TMPDIR}/${i}-dotnew-filelist.gz
done
cp ${TMPDIR}/*-filelist.gz ${WORKDIR}/
This algorithm does not search for third-party .new files. Should slackpkg take care for third-party packages? I don't think so..
|
|
|
08-17-2009, 08:12 AM
|
#10
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
IMHO it should -- just because it'd be handy:
A) identify any .new files created by anything it (slackpkg) installs.
B) (maybe as an option?) be able to locate any .new files anywhere/from any location or installed item. Given the relative easiness of implementing such a search, then why not?

Sasha
|
|
|
08-17-2009, 08:13 PM
|
#11
|
Member
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423
Original Poster
Rep:
|
Quote:
Originally Posted by GrapefruiTgirl
IMHO it should -- just because it'd be handy:
A) identify any .new files created by anything it (slackpkg) installs.
B) (maybe as an option?) be able to locate any .new files anywhere/from any location or installed item. Given the relative easiness of implementing such a search, then why not?

Sasha
|
Hmm, I think slackpkg doesn't _have_ to have this feature. But yes, I _have_ to admit it is handy  So here is an other patch against slackpkg-2.80.2-noarch-3: (/usr/libexec/slackpkg/core-functions.sh remain unchanged)
Code:
--- 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.
|
|
|
08-17-2009, 08:21 PM
|
#12
|
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
Very cool -- nice work! Wonder what PiterPunk will have to say. Do let us know
PS - I agree with you -- it doesn't NEED the extra option for `find all` but it IS/would-be handy.
Sasha
|
|
|
08-18-2009, 02:57 AM
|
#13
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,941
Rep: 
|
You can find out what Piter PUNK thinks here:
Code:
/usr/doc/slackpkg-2.80.2/ChangeLog
or whatever your current version happens to be.
|
|
|
All times are GMT -5. The time now is 10:47 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|