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 02-25-2013, 01:01 PM   #1
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Rep: Reputation: 190Reputation: 190
sqg - sbopkg queuefile generator


Just committed to svn r918:

"import sqg - sbopkg queuefile generator - into contrib/. Thanks to slakmagik and Mauro Giachero for suggestions, comments, and modifications."

From the top of the script:

"A script designed to generate queuefiles for sbopkg with recursively-listed dependencies from the REQUIRES line of the .info files."

You can pull it from SVN or grab it directly from here:

https://code.google.com/p/sbopkg/sou...oc/contrib/sqg

We welcome testers and feedback.

Thanks!
 
Old 02-25-2013, 01:26 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
thanks for this

I'll try it soon (work things are taking most of my time ATM ).

Last edited by ponce; 02-25-2013 at 01:29 PM.
 
1 members found this post helpful.
Old 02-25-2013, 01:54 PM   #3
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Original Poster
Rep: Reputation: 190Reputation: 190
Thanks, ponce. I'd definitely appreciate your feedback.
 
Old 02-25-2013, 03:14 PM   #4
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Rep: Reputation: 125Reputation: 125
Great litle script!
I only have one question. Does it check if any required packages are already installed on the system?

Many thanks
 
Old 02-25-2013, 03:43 PM   #5
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Original Poster
Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by Totoro-kun View Post
Great litle script!
I only have one question. Does it check if any required packages are already installed on the system?

Many thanks
You're welcome! No, it doesn't check if any required packages are on the system. That is not its job. It just creates queuefiles for sbopkg by parsing the REQUIRES= line in each .info file recursively. Basically, it just does what you would do manually if you looked at each REQUIRES= line and created an sbopkg queuefile by hand. It's then up to the user to view the resulting queuefile and make edits as necessary. For example, to pass options to the SlackBuild scripts. This is documented in sbopkg's queuefiles functionality.

When you load up the resulting queuefile in sbopkg then sbopkg will, just like with other queuefiles, mark what is already installed when you process the queue.

Last edited by chess; 02-25-2013 at 06:54 PM.
 
Old 02-25-2013, 05:52 PM   #6
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
It might be a good idea to check for "%README%" in the REQUIRES line and just echo the packages in the generated queuefile that include it to the console at the end. I understand that one is expected to read the README of each package in the queue before building, but this might make it clear that certain packages require additional action. Or since this will probably be used in bulk, add comments in the queuefile with README packages. Just a thought.

Last edited by T3slider; 02-25-2013 at 05:55 PM.
 
Old 02-25-2013, 06:07 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
While the idea of checking for %README% is a good one, it only works reliably if all maintainers add it to their info-files, when clarifications about optional dependencies (or other options) are mentioned in the README.
 
1 members found this post helpful.
Old 02-25-2013, 07:12 PM   #8
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Original Poster
Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by T3slider View Post
It might be a good idea to check for "%README%" in the REQUIRES line and just echo the packages in the generated queuefile that include it to the console at the end. I understand that one is expected to read the README of each package in the queue before building, but this might make it clear that certain packages require additional action. Or since this will probably be used in bulk, add comments in the queuefile with README packages. Just a thought.
Great idea. Just committed this to the script in SVN. Thanks!
 
Old 02-26-2013, 01:48 PM   #9
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
Hi Chess,

I played a little with sqg using it with my repository:
- I've tried to modify it a little to use it when we have a git repo;
- I've deleted the setting of REPO_ROOT, REPO_NAME and REPO_BRANCH because they override the ones specified in /etc/sbopkg/sbopkg.conf (personal taste I think, really dunno if this is on purpose);
- doing the above, I had to remove the check for REPO_DIR because that happens before /etc/sbopkg/sbopkg.conf is sourced.

http://pastebin.com/jMUMFCa9
 
1 members found this post helpful.
Old 02-26-2013, 02:46 PM   #10
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Original Poster
Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by ponce View Post
Hi Chess,
Hi, ponce - thanks for checking out the script! :-)

Quote:
I played a little with sqg using it with my repository:
- I've tried to modify it a little to use it when we have a git repo;
Nice. Thanks for this -- seems like a good addition but I have not yet carefully looked at the patch. I'll have to test it out.

Quote:
- I've deleted the setting of REPO_ROOT, REPO_NAME and REPO_BRANCH because they override the ones specified in /etc/sbopkg/sbopkg.conf (personal taste I think, really dunno if this is on purpose);
- doing the above, I had to remove the check for REPO_DIR because that happens before /etc/sbopkg/sbopkg.conf is sourced.
Yes, this was on purpose to allow the user to override sbopkg.conf in sqg without having to modify sbopkg.conf every time. I know the variables can be passed too, but I think it's helpful to be able to set them within sqg as well without having to touch sbopkg.conf. Perhaps we keep the REPO_ROOT stuff in there while adding the git functionality?

Thanks again for checking it out and offering some suggestions. We should definitely add the git part.
 
Old 02-26-2013, 03:44 PM   #11
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Original Poster
Rep: Reputation: 190Reputation: 190
ponce, how about this (lightly tested with your git repo):

http://pastebin.com/EM0ALjSn
 
1 members found this post helpful.
Old 02-27-2013, 01:01 AM   #12
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
I just checked it: works fine and looks better than my attempt

about the REPO_* variables...

I understand the script it's meant to be edited before launching it so this is really of little importance, but I was pondering if by default can be better to use the /etc/sbopkg/sbopkg.conf values (and so just comment out the three REPO_* lines): that should be the repository the user launching the script should be using already and of which he most probably have a local copy.

I noticed this because because I launched it only uncommenting the QUEUEDIR line and ATM I don't have a /var/lib/sbopkg/SBo local directory.

But it's really a no-issue...

Last edited by ponce; 02-27-2013 at 04:10 AM.
 
1 members found this post helpful.
Old 02-27-2013, 09:24 AM   #13
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Original Poster
Rep: Reputation: 190Reputation: 190
Thanks, ponce. I'll merge these changes into the svn copy and take another look at the REPO_ variables issue. Thanks for testing and for your suggestions and input!
 
Old 02-28-2013, 10:35 PM   #14
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Original Poster
Rep: Reputation: 190Reputation: 190
Slight tweak to the script to skip packages with an empty REQUIRES= line unless a new SKIP_EMPTY variable is uncommented. Probably makes no sense to create queuefiles for packages with no dependencies in most cases.
 
Old 02-28-2013, 11:20 PM   #15
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
nice, here I was clearing after the ones where $(cat $i | wc -l)=1 but it's if they don't get created at all it's one step further

maybe they could be useful for an eventual queuefile parser that will rely on a complete *.sqf database, but I think such software doesn't exists yet...

Last edited by ponce; 02-28-2013 at 11:23 PM.
 
  


Reply

Tags
queuefiles, sbopkg, slackbuilds, sqg



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
sbopkg problem... Alexvader Slackware 7 02-03-2014 01:01 AM
What other functionalities would like to have on sbopkg ChrisAbela Slackware 2 05-11-2012 03:50 AM
sbopkg help rng Slackware 6 03-16-2012 09:32 AM
Sbopkg... Alexvader Slackware 24 11-23-2009 11:38 AM
Sbopkg Popularity Murdock1979 Slackware 35 09-08-2009 01:53 AM

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

All times are GMT -5. The time now is 08:02 AM.

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