LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-02-2022, 01:55 AM   #46
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656

Quote:
Originally Posted by PartiZan View Post
Very poor excuse for wrong behavior. I would say it's even funny, like saying that this is not a bug, this is feature.
Wrong behavior to you, but not by the designer of the program.

It was specifically written this way, without any possibility that it could be a bug or unintended. The developer purposefully removes everything except for the package name before looking in the PACKAGES.TXT.

Just because it doesn't work the way you expect it to work doesn't mean it isn't working as intended.
 
2 members found this post helpful.
Old 04-02-2022, 10:59 AM   #47
PartiZan
Member
 
Registered: Mar 2022
Location: Chicago
Distribution: RHEL, Slackware
Posts: 38

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by bassmadrigal View Post
Wrong behavior to you, but not by the designer of the program.

It was specifically written this way, without any possibility that it could be a bug or unintended. The developer purposefully removes everything except for the package name before looking in the PACKAGES.TXT.

Just because it doesn't work the way you expect it to work doesn't mean it isn't working as intended.
Cool. I should employ this "wisdom" at work. If somebody tells me there is a bug in the code, I say: "This is by design. Wrong behavior to you, but not by the designer of the program"
 
Old 04-02-2022, 11:28 AM   #48
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,118

Rep: Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192
Quote:
Originally Posted by PartiZan View Post
Cool. I should employ this "wisdom" at work. If somebody tells me there is a bug in the code, I say: "This is by design. Wrong behavior to you, but not by the designer of the program"
IMHO you could apply whatever work logic you like also to opensource projects but you have to actually hire the coders first.

Last edited by ponce; 04-02-2022 at 11:30 AM.
 
Old 04-02-2022, 01:35 PM   #49
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by PartiZan View Post
Cool. I should employ this "wisdom" at work. If somebody tells me there is a bug in the code, I say: "This is by design. Wrong behavior to you, but not by the designer of the program"
If you are the developer, the boss of the developer, or a paying customer, you can have more control over how your project functions. If you are simply an enduser who doesn't have the ability to control the development, then you are at the mercy of whether the developer thinks it's a bug or not.

Based on how this is coded, I don't believe the developer would consider this a bug. It seems very, very intentional.

Just because you don't like it doesn't mean it is a bug.
 
2 members found this post helpful.
Old 04-02-2022, 06:46 PM   #50
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 508

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
Quote:
Originally Posted by PartiZan View Post
Still not good. Another, but similar weird thing.

Attachment 38671
What's the problem with your slackpkg output? I didn't bother reading all the way back through the thread to find the start of this particular shitstorm.

Also.. be careful calling this a bug. You are implying that something is broken.. which is not the case here.

Slackpkg isn't giving you an error or reporting incorrect information so there is no bug here. This is at most a design flaw and should be discussed as such. If you try to suggest that this feature is broken then a bunch of people are going to get all defensive and cranky. Nobody gets a trophy for pointing out a minor quirk in the way information is displayed.

Last time I ran into an issue like this at work I literally looked at our client and asked them "what is the intended result as described in your product definition? What is it supposed to do?".
 
Old 04-02-2022, 06:53 PM   #51
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 508

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
And FWIW, I've been poking at the way slackpkg info <pkg> displays info on my screen and there is definitely room for improvement. It's not broken, but when viewing info for a package that exists in multiple repos (I'm using slackpkg+) things get pretty messy. There's definitely room for discussion on improving that output because right now it hurts my brain..
Code:
root@vapyr:~# slackpkg info mesa-compat32


NOTICE: pkglist is older than 24h; you are encouraged to re-run 'slackpkg update'

PACKAGE NAME:  mesa-compat32-21.3.5-x86_64-2compat32.txz
PACKAGE LOCATION:  ./x-compat32
PACKAGE SIZE (compressed):  20005 K
PACKAGE SIZE (uncompressed):  200780 K
PACKAGE DESCRIPTION:
mesa-compat32: mesa-compat32 (a 3-D graphics library)
mesa-compat32:
mesa-compat32: Mesa is a 3-D graphics library with an API very similar to that of
mesa-compat32: another well-known 3-D graphics library. The Mesa libraries are used
mesa-compat32: by X to provide both software and hardware accelerated graphics.
mesa-compat32:
mesa-compat32: Mesa was written by Brian Paul.
mesa-compat32:
mesa-compat32: Homepage: https://www.mesa3d.org
mesa-compat32:
mesa-compat32: This package contains 32-bit compatibility binaries.

PACKAGE NAME:  mesa-compat32-21.3.5-x86_64-2compat32.txz
PACKAGE LOCATION:  ./slackware64-compat32/x-compat32
PACKAGE SIZE (compressed):  41988 K
PACKAGE SIZE (uncompressed):  200780 K
PACKAGE DESCRIPTION:
mesa-compat32: mesa-compat32 (a 3-D graphics library)
mesa-compat32:
mesa-compat32: Mesa is a 3-D graphics library with an API very similar to that of
mesa-compat32: another well-known 3-D graphics library. The Mesa libraries are used
mesa-compat32: by X to provide both software and hardware accelerated graphics.
mesa-compat32:
mesa-compat32: Mesa was written by Brian Paul.
mesa-compat32:
mesa-compat32: Homepage: https://www.mesa3d.org
mesa-compat32:
mesa-compat32: This package contains 32-bit compatibility binaries.


Package:    mesa-compat32-21.3.5-x86_64-2compat32
Repository: compat32
Path:       ./x-compat32/mesa-compat32-21.3.5-x86_64-2compat32.txz
Url:        http://192.168.0.13/mirror/slackware/multilib/15.0/x-compat32/mesa-compat32-21.3.5-x86_64-2compat32.txz

Package:    mesa-compat32-21.3.5-x86_64-2compat32
Repository: multilib
Path:       ./slackware64-compat32/x-compat32/mesa-compat32-21.3.5-x86_64-2compat32.txz
Url:        https://taper.alienbase.nl/people/alien/multilib/15.0/slackware64-compat32/x-compat32/mesa-compat32-21.3.5-x86_64-2compat32.txz
My brain has better things to do than parse large blocks of machine readable text. I have a computer to handle those mundane tasks.
 
2 members found this post helpful.
Old 04-02-2022, 08:32 PM   #52
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Pithium View Post
What's the problem with your slackpkg output?
They put in a full package, including version, arch, and build number, and slackpkg stripped everything to only search PACKAGES.TXT for the package name only.

As I tried pointing out, the way this is coded leaves no chance that this wasn't intentional.
 
Old 04-02-2022, 09:01 PM   #53
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 508

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
Quote:
Originally Posted by bassmadrigal View Post
They put in a full package, including version, arch, and build number, and slackpkg stripped everything to only search PACKAGES.TXT for the package name only.

As I tried pointing out, the way this is coded leaves no chance that this wasn't intentional.
Relax with the declarations of intent. You aren't a slackpkg dev and your name isn't credited at the top of the script

All I saw were a bunch of claims about a "bug" but no real description of what that bug was. It's clearly working as designed whether that was intentional or not. PartiZan needs to be careful throwing around words like "bug" or "broken" because some people (read: you) get all bent out of shape over a stupid semantics problem.

Either way, slackpkg is a stupidly simple script. If I cared at all about the dump of text from the info option I could have easily fixed it in the amount of time everyone here spent debating it.
 
Old 04-02-2022, 11:31 PM   #54
PartiZan
Member
 
Registered: Mar 2022
Location: Chicago
Distribution: RHEL, Slackware
Posts: 38

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by bassmadrigal View Post
They put in a full package, including version, arch, and build number, and slackpkg stripped everything to only search PACKAGES.TXT for the package name only.

As I tried pointing out, the way this is coded leaves no chance that this wasn't intentional.
This was not intentional for sure; It was written and forgotten. It's not by design, but by negligence.
 
Old 04-03-2022, 12:13 AM   #55
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 508

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
Quote:
Originally Posted by PartiZan View Post
This was not intentional for sure; It was written and forgotten. It's not by design, but by negligence.
A softer tone in regards to unpolished features is a good idea here. There's been a lot of work done on the mission-critical features of slackpkg in the past few years so it's not surprising that one of the lesser used functions just dumps an ugly wad of text to the screen without any extra formatting.

You pointed out a good area for improvement so don't ruin it by suggesting that the developers who donated their free time to the project should have worked harder.
 
2 members found this post helpful.
Old 04-03-2022, 12:20 AM   #56
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 508

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
Since I know 15.0 attracted a bunch of new users, this whole situation presents a learning opportunity regarding how slackware packages are updated.

Line 513 in /usr/sbin/slackpkg is the source of your frustration.
Code:
	info)
		PATTERN=$(echo $ARG | sed -e 's/\+/\\\+/g' -e 's/\./\\\./g')
		NAME=$(cutpkg $PATTERN)
		awk -F: "/PACKAGE NAME:.* ${NAME}-[^-]+-(${ARCH}|fw|noarch)-[^-]+/,/^$/ {
                                found=1
				 if (\$1 ~ /"$NAME"/) {
				 print \$PATTERN 
				} else {
				print \$0
				} 
                        }
                        END {
				if ( found != 1 ) {
			print \"No packages found! Try:\n\n\tslackpkg search $PATTERN\n\nand choose one (and ONLY one package).\n\"
				}
			}" ${WORKDIR}/PACKAGES.TXT 2>/dev/null
Instead of being toxic and accusing volunteer developers of being negligent, maybe clean it up yourself so we can all celebrate?
 
1 members found this post helpful.
Old 04-03-2022, 12:51 AM   #57
PartiZan
Member
 
Registered: Mar 2022
Location: Chicago
Distribution: RHEL, Slackware
Posts: 38

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Pithium View Post
Relax with the declarations of intent. You aren't a slackpkg dev and your name isn't credited at the top of the script

All I saw were a bunch of claims about a "bug" but no real description of what that bug was. It's clearly working as designed whether that was intentional or not. PartiZan needs to be careful throwing around words like "bug" or "broken" because some people (read: you) get all bent out of shape over a stupid semantics problem.

Either way, slackpkg is a stupidly simple script. If I cared at all about the dump of text from the info option I could have easily fixed it in the amount of time everyone here spent debating it.
The whole Slackware is simple and stupid thing (and some targeted groups of people love it for that). On the other hand, "slackpkg info" behaves in a very shitty way. The excuse about stupidly simple script doesn't work. It is negligence, not simplicity.

Last edited by PartiZan; 04-03-2022 at 12:54 AM.
 
Old 04-03-2022, 01:03 AM   #58
PartiZan
Member
 
Registered: Mar 2022
Location: Chicago
Distribution: RHEL, Slackware
Posts: 38

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Pithium View Post
Since I know 15.0 attracted a bunch of new users, this whole situation presents a learning opportunity regarding how slackware packages are updated.

Line 513 in /usr/sbin/slackpkg is the source of your frustration.
Code:
	info)
		PATTERN=$(echo $ARG | sed -e 's/\+/\\\+/g' -e 's/\./\\\./g')
		NAME=$(cutpkg $PATTERN)
		awk -F: "/PACKAGE NAME:.* ${NAME}-[^-]+-(${ARCH}|fw|noarch)-[^-]+/,/^$/ {
                                found=1
				 if (\$1 ~ /"$NAME"/) {
				 print \$PATTERN 
				} else {
				print \$0
				} 
                        }
                        END {
				if ( found != 1 ) {
			print \"No packages found! Try:\n\n\tslackpkg search $PATTERN\n\nand choose one (and ONLY one package).\n\"
				}
			}" ${WORKDIR}/PACKAGES.TXT 2>/dev/null
Instead of being toxic and accusing volunteer developers of being negligent, maybe clean it up yourself so we can all celebrate?
I can do that locally, not a big deal.

Trying to suggest things to improve is something toxic now...
 
Old 04-03-2022, 01:07 AM   #59
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,118

Rep: Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192
Quote:
Originally Posted by PartiZan View Post
Still not good. Another, but similar weird thing.

Attachment 38671
Quote:
Originally Posted by PartiZan View Post
Very poor excuse for wrong behavior. I would say it's even funny, like saying that this is not a bug, this is feature.
Quote:
Originally Posted by PartiZan View Post
Cool. I should employ this "wisdom" at work. If somebody tells me there is a bug in the code, I say: "This is by design. Wrong behavior to you, but not by the designer of the program"
Quote:
Originally Posted by PartiZan View Post
This was not intentional for sure; It was written and forgotten. It's not by design, but by negligence.
Quote:
Originally Posted by PartiZan View Post
The whole Slackware is simple and stupid thing (and some targeted groups of people love it for that). On the other hand, "slackpkg info" behaves in a very shitty way. The excuse about stupidly simple script doesn't work. It is negligence, not simplicity.
sorry PartiZan, but what's the point of complaining about it here on this forum?
if you think this is a bug open an issue on slackpkg's issues tracker
Quote:
Originally Posted by PartiZan View Post
I can do that locally, not a big deal.
and if you have a patch for it, better!

Quote:
Originally Posted by PartiZan View Post
Trying to suggest things to improve is something toxic now... Well, what I can say is go to my black list for your stupidity.
...but please avoid personal attacks.

Last edited by ponce; 04-03-2022 at 01:10 AM.
 
2 members found this post helpful.
Old 04-03-2022, 01:11 AM   #60
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,377

Rep: Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757
The slackpkg "info" option works by parsing the ${WORKDIR}/PACKAGES.TXT file. The file is created by the slackpkg "update" option and is ordered by the PRIORITY setting in /etc/slackpkg/slackpkg.conf.
If the desired behaviour is to stop the output from "slackpkg info" after the highest priority match is found, then
Code:
diff -u3  /usr/sbin/slackpkg.orig /usr/sbin/slackpkg
--- /usr/sbin/slackpkg.orig	2022-04-03 14:58:05.614835271 +1000
+++ /usr/sbin/slackpkg	2022-04-03 15:39:45.020798168 +1000
@@ -521,6 +521,7 @@
 				print \$0
 				} 
                         }
+                        { if ( found == 1 && (! \$0) ) {exit} }
                         END {
 				if ( found != 1 ) {
 			print \"No packages found! Try:\n\n\tslackpkg search $PATTERN\n\nand choose one (and ONLY one package).\n\"
Personally, I have no peeve with the existing behaviour. As shown above, it can be altered, but I would not like it to be the default due to the interaction with the PRIORITY setting.

Last edited by allend; 04-03-2022 at 01:13 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KDE x64 current bug reports fulalas Slackware 36 10-12-2021 01:16 AM
How stable is -Current compared to Stable? bulletfreak Slackware 7 08-01-2016 06:25 PM
Stable 13 kernel vs Current kernel in Stable system linus72 Slackware 6 04-01-2010 07:45 AM
[BUG] Current pkgtools installpkg bug jazzor Slackware 7 04-16-2009 05:30 AM
How to submit bug reports to Mandrakesoft? registering Mandriva 2 06-04-2004 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration