LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 05-14-2017, 05:59 PM   #61
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375

Quote:
Originally Posted by Qury View Post
hi montagdude

your tool is great!
I'm glad you like it!

Quote:
Originally Posted by Qury View Post
Can i make a feature request?
As your tool is very fast it would be cool if it could generate queue files as well.
It would definitely be possible to do that, but I'm not sure it makes sense as a feature, since sboui doesn't use queue files. What would be the intended use case? Are you just looking for something to replace the functionality of sqg, only faster?
 
Old 05-15-2017, 03:02 AM   #62
Qury
Member
 
Registered: Feb 2004
Location: Dublin
Distribution: Slackware
Posts: 84

Rep: Reputation: 48
Quote:
Originally Posted by montagdude View Post
What would be the intended use case? Are you just looking for something to replace the functionality of sqg, only faster?
Exactly.
 
Old 05-15-2017, 07:36 AM   #63
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Quote:
Originally Posted by Qury View Post
Exactly.
Okay, well like I said, I don't think it really belongs as a feature for sboui. For one, because sboui doesn't use queue files, so it doesn't really make sense for it to generate them, and also because queue files are an sbopkg thing, and I don't want it to be focused on any specific package manager.

However, if it would be useful to you, I could post an unofficial patch that would allow sboui to generate queue files for the entire repo. Would you be interested in that? In the longer term, maybe it would be better to make a standalone sqg replacement using some of the sboui codebase, but I'm not going to promise that I will actually do that.
 
Old 05-15-2017, 09:59 AM   #64
Qury
Member
 
Registered: Feb 2004
Location: Dublin
Distribution: Slackware
Posts: 84

Rep: Reputation: 48
hi,un unofficial patch is certainly welcome

If it is a lot of effort on you part, i would say don't do it, personally i could live without this functionality.
I think of it as a nice-to-have
 
Old 05-15-2017, 10:24 AM   #65
Gordie
Member
 
Registered: Aug 2007
Distribution: Slackware64 14.2, Kernel generic-4.4.75, Alien Bob's Plasma 5
Posts: 253

Rep: Reputation: 69
I have decided to give sboui a whirl. Spent a few hours using it to get familiar with it but didn't compile anything. Now I am using it on another desktop to compile filezilla and its dependencies. Nice! I like it a lot
 
Old 05-15-2017, 05:46 PM   #66
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Quote:
Originally Posted by Qury View Post
hi,un unofficial patch is certainly welcome

If it is a lot of effort on you part, i would say don't do it, personally i could live without this functionality.
I think of it as a nice-to-have
I'll give it a try. I don't think it should be hard to do.

Quote:
Originally Posted by Gordie View Post
I have decided to give sboui a whirl. Spent a few hours using it to get familiar with it but didn't compile anything. Now I am using it on another desktop to compile filezilla and its dependencies. Nice! I like it a lot
Thanks! Filezilla isn't one I've tested before, but I'm doing so now.
 
Old 05-15-2017, 07:32 PM   #67
mralk3
Member
 
Registered: May 2015
Posts: 869

Rep: Reputation: 278Reputation: 278Reputation: 278
Great tool! I like the simplicity of the UI. Some things I noticed while testing:
  1. Changing the default editor from vi to vim does not persist after restarting. vi is still the default editor after changing this setting.
  2. Same as the above. Changing the repository directory setting does not persist. On my raspberry pi I use some non-standard paths in order to save files created to an external USB to lessen the amount of read/writes to the SD Card.

    Relevant sbopkg.conf paths:
    Code:
    export TMP=${TMP:-/usb/SBo}
    export OUTPUT=${OUTPUT:-/usb/sbopkg/packages}
    
    LOGFILE=${LOGFILE:-/usb/sbopkg/log/sbopkg-build-log}
    QUEUEDIR=${QUEUEDIR:-/usb/sbopkg/queues}
    REPO_ROOT=${REPO_ROOT:-/usb/sbopkg/repo-root}
    SRCDIR=${SRCDIR:-/usb/sbopkg/source}
  3. Using the w3m SlackBuild as an example. Unable to browse the patches directory. This is something that sbopkg doesn't include. It would be great feature to be able to review every file distributed with all SlackBuilds.
  4. Again with w3m: After removing/installing/upgrading a package from the options menu, hitting dismiss, and hitting escape to return to the main menu, the screen is refreshed, then the filter for grouped packages resets, and the menu highlight moves back to the top of the list. This can be a bit annoying if a user has a ton of SlackBuilds installed and is trying to remove a few but has to keep moving the cursor back to a desired group -> SlackBuild. The only time this isn't an issue for me is when I search for a specific SlackBuild by name.

Keep up the good work!
 
Old 05-15-2017, 07:55 PM   #68
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Quote:
Originally Posted by mralk3 View Post
Great tool! I like the simplicity of the UI. Some things I noticed while testing:
  1. Changing the default editor from vi to vim does not persist after restarting. vi is still the default editor after changing this setting.
  2. Same as the above. Changing the repository directory setting does not persist. On my raspberry pi I use some non-standard paths in order to save files created to an external USB to lessen the amount of read/writes to the SD Card.
That's normal. Any settings that you want to persist should be set in /etc/sboui/sboui.conf or ~/.sboui.conf. The options window is just for temporary changes to settings during runtime.

Quote:
Originally Posted by mralk3 View Post
  • Using the w3m SlackBuild as an example. Unable to browse the patches directory. This is something that sbopkg doesn't include. It would be great feature to be able to review every file distributed with all SlackBuilds.
I was wondering if someone would mention that. Generally, the files in the top-level directory are the ones that people would most likely want to view, so I restricted the file browser to only let you view those. I'll try to work on letting you descend into lower directories for the next version.

Quote:
Originally Posted by mralk3 View Post
  • Again with w3m: After removing/installing/upgrading a package from the options menu, hitting dismiss, and hitting escape to return to the main menu, the screen is refreshed, then the filter for grouped packages resets, and the menu highlight moves back to the top of the list. This can be a bit annoying if a user has a ton of SlackBuilds installed and is trying to remove a few but has to keep moving the cursor back to a desired group -> SlackBuild. The only time this isn't an issue for me is when I search for a specific SlackBuild by name.
The reason I did that is because sometimes the lists change after installing/upgrading/removing/reinstalling. For example, if you have filtered by upgradable SlackBuilds, and you upgrade one, that one will no longer exist in the list after the operation. How would you like it to behave in such a case? Maybe after such an operation, it should check in the list to see if the previously highlighted item still exists, and if not jump back to the beginning (or maybe to the nearest one)? It sounds easy, but it becomes tricky especially if the category disappears from the filter after the changes are applied. Let me know how you think it should work, though.

(PS Ctrl-s will let you quickly jump back to wherever you want in the list.)

Last edited by montagdude; 05-15-2017 at 09:04 PM. Reason: config file is /etc/sboui/sboui.conf, not /etc/sboui.conf
 
1 members found this post helpful.
Old 05-15-2017, 08:07 PM   #69
mralk3
Member
 
Registered: May 2015
Posts: 869

Rep: Reputation: 278Reputation: 278Reputation: 278
Quote:
Originally Posted by montagdude View Post
That's normal. Any settings that you want to persist should be set in /etc/sboui.conf or ~/.sboui.conf. The options window is just for temporary changes to settings during runtime.
I figured it was user error on my part. Thanks for clearing that up.
Quote:
Originally Posted by montagdude View Post
The reason I did that is because sometimes the lists change after installing/upgrading/removing/reinstalling. For example, if you have filtered by upgradable SlackBuilds, and you upgrade one, that one will no longer exist in the list after the operation. How would you like it to behave in such a case? Maybe after such an operation, it should check in the list to see if the previously highlighted item still exists, and if not jump back to the beginning (or maybe to the nearest one)? It sounds easy, but it becomes tricky especially if the category disappears from the filter after the changes are applied. Let me know how you think it should work, though.
It depends on how the user is filtering. For unfiltered groups, it should jump back to the original Slackbuild since the list is so long. If its filtered by a specific Slackbuild name, then go back to the top. If filtered by installed, go back to the original Slackbuild. For upgradeable, go back to the top, since the list shouldn't show the SlackBuild in question any more.

I haven't played with any of the other filters yet so I am unable to say what the functionality for "tagged", "blacklisted", and "non-dependencies" should be.
 
Old 05-15-2017, 08:08 PM   #70
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Also, I just noticed you were wanting to remove a bunch of things at once. You might want to look into the tagging function (t or T). That's what it's designed for.
 
Old 05-15-2017, 08:17 PM   #71
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Quote:
Originally Posted by mralk3 View Post
It depends on how the user is filtering. For unfiltered groups, it should jump back to the original Slackbuild since the list is so long. If its filtered by a specific Slackbuild name, then go back to the top. If filtered by installed, go back to the original Slackbuild. For upgradeable, go back to the top, since the list shouldn't show the SlackBuild in question any more.
Ah, but what about if you are using the Installed filter and removing a SlackBuild. Then that list will change too. You see, it gets complicated. I think that maybe the best way to do it would be to highlight the same item by number in the list after doing an install/upgrade/reinstall/remove, unless the category disappeared. That way, either the same one will be highlighted (if the list stayed the same) or one next to it. I'll mess around with it, anyway.
 
Old 05-15-2017, 08:30 PM   #72
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Quote:
Originally Posted by Qury View Post
hi,un unofficial patch is certainly welcome
Here is a fun little patch for you.

Code:
--- CMakeLists.txt	2017-05-15 20:42:11.071119698 -0400
+++ CMakeLists.txt.new	2017-05-15 20:41:15.780117819 -0400
@@ -14,7 +14,7 @@
 
 # Default compiler flags
 set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall")
-set(CMAKE_CXX_FLAGS_RELEASE "-O2")
+set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fopenmp")
 
 # Some default directories
 set(CONFDIR /etc/sboui
--- include/MainWindow.h	2017-05-15 20:42:11.071119698 -0400
+++ include/MainWindow.h.new	2017-05-15 20:41:25.392118145 -0400
@@ -109,6 +109,10 @@
                                const std::string & name="Information",
                                const std::string & info="Enter: Dismiss");
 
+    /* Generate sbopkg-style build queues */
+
+    void genQueues();
+
     /* Prints package version information as status */
 
     void printPackageVersion(const BuildListItem & build);
--- src/MainWindow.cpp	2017-05-15 20:42:11.071119698 -0400
+++ src/MainWindow.cpp.new	2017-05-15 20:41:05.634117474 -0400
@@ -29,6 +29,9 @@
 #include "QuickSearch.h"
 #include "PackageInfoBox.h"
 #include "MainWindow.h"
+#include <fstream>
+#include "DirListing.h"
+#include "requirements.h"
 
 /*******************************************************************************
 
@@ -1834,6 +1837,66 @@
 
 /*******************************************************************************
 
+Generates sbopkg-compatible queue files for entire repository
+
+*******************************************************************************/
+void MainWindow::genQueues()
+{
+  unsigned int i, j, k, ncategories, nbuilds, nbuildorder;
+  std::string queuedir, response, queuefilename;
+  DirListing top_dir, category_dir;
+  int stat;
+  std::vector<BuildListItem *> reqlist;
+
+  def_prog_mode();
+  endwin();
+
+  queuedir = "/var/lib/sbopkg/queues";
+  response = "";
+  std::cout << "Enter location to write queue files [/var/lib/sbopkg/queues]: ";
+  std::getline(std::cin, response);
+  if (response != "") { queuedir = response; }
+  stat = top_dir.setFromPath(queuedir);
+  if (stat == 1)
+  {
+    reset_prog_mode();
+    draw(true);
+    displayError("Queue directory does not exist.");
+    return;
+  } 
+
+  ncategories = _slackbuilds.size();
+  for ( i = 0; i < ncategories; i++ )
+  {
+    nbuilds = _slackbuilds[i].size();
+#pragma omp parallel for default(shared) private(j,stat,reqlist,nbuildorder,queuefilename,k)
+    for ( j = 0; j < nbuilds; j++ )
+    {
+      std::cout << "Generating queue for " << _slackbuilds[i][j].name()
+                << " ..." << std::endl;
+
+      stat = compute_reqs_order(_slackbuilds[i][j], reqlist, _slackbuilds);
+      reqlist.push_back(&_slackbuilds[i][j]);
+      nbuildorder = reqlist.size();
+
+      queuefilename = queuedir + "/" + _slackbuilds[i][j].name() + ".sqf";
+      std::ofstream queuefile;
+      queuefile.open(queuefilename.c_str());
+      for ( k = 0; k < nbuildorder; k++ )
+      {
+        queuefile << reqlist[k]->name() << std::endl;
+      }
+      queuefile.close();
+    }
+  }
+      
+  reset_prog_mode(); 
+  draw(true);
+  displayMessage("Successfully generated queue files for repo.");
+}
+
+/*******************************************************************************
+
 Displays the main window
 
 *******************************************************************************/
@@ -1993,6 +2056,8 @@
     else if (selection == "e") { applyTags("Reinstall"); }
     else if ( (selection.size() == 1) && (selection[0] == 0x13) )  // Ctrl-s
       quickSearch(); 
+    else if ( (selection.size() == 1) && (selection[0] == 0x07) )  // Ctrl-g
+      genQueues(); 
   }
 
   return signals::quit;
Save it as genqueues.patch and put it in the SlackBuilds/system/sboui directory. Then, add this line in the sboui.SlackBuild:

Code:
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

# Patch to generate sbopkg-style build queues with Ctrl-g
patch -p0 < $CWD/genqueues.patch

mkdir -p build
cd build
  cmake \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release ..
  make
  make install DESTDIR=$PKG
cd ..
Now you can generate queue files for the entire repo with Ctrl-g. As a bonus, it runs in parallel.

Just a few caveats:
  • I have only verified this very briefly by comparing the vlc queuefile with the one written by sqg.
  • It does not add a comment for SlackBuilds with optional dependencies like sqg does.
  • The patch will probably fail when sboui is updated. As this is unsupported, it will be up to you to fix it when that happens.
 
Old 05-15-2017, 09:06 PM   #73
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Quote:
Originally Posted by mralk3 View Post
I figured it was user error on my part. Thanks for clearing that up.
I realized I mistyped in my other post. The configuration file is /etc/sboui/sboui.conf, not /etc/sboui.conf. Sorry about that.
 
1 members found this post helpful.
Old 05-16-2017, 03:55 AM   #74
Qury
Member
 
Registered: Feb 2004
Location: Dublin
Distribution: Slackware
Posts: 84

Rep: Reputation: 48
Quote:
Originally Posted by montagdude View Post
Here is a fun little patch for you.
Unbelievable! That was very quick.

Thanks for this, your patch worked great!

Thank You.
 
Old 05-16-2017, 11:39 PM   #75
montagdude
Member
 
Registered: Apr 2016
Posts: 575

Original Poster
Rep: Reputation: 375Reputation: 375Reputation: 375Reputation: 375
Quote:
Originally Posted by mralk3 View Post
I figured it was user error on my part. Thanks for clearing that up.

It depends on how the user is filtering. For unfiltered groups, it should jump back to the original Slackbuild since the list is so long. If its filtered by a specific Slackbuild name, then go back to the top. If filtered by installed, go back to the original Slackbuild. For upgradeable, go back to the top, since the list shouldn't show the SlackBuild in question any more.

I haven't played with any of the other filters yet so I am unable to say what the functionality for "tagged", "blacklisted", and "non-dependencies" should be.
I've made two changes in the development branch. One is to try to restore the original selection as closely as possible after installing, upgrading, etc. The other is to allow browsing and viewing files in subdirectories. They will go into the next release. Good suggestions, by the way!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Call for Testers: MATE 1.17 willysr Slackware 25 04-21-2017 12:55 PM
[SOLVED] Call for Testers: MATE 1.14 for -Current willysr Slackware 13 05-27-2016 08:08 AM
Updating w3af to version 1.6.49 in SBo, need testers mralk3 Slackware 3 12-12-2015 05:54 PM
Call for Testers: MATE 1.8 willysr Slackware 137 08-06-2014 01:50 AM
ncurses-5.2-28 conflicts with file from package ncurses-5.2-12 tubby Linux - Software 4 06-16-2002 12:00 AM


All times are GMT -5. The time now is 06:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration