Commit Graph

400 Commits

Author SHA1 Message Date
mauro.giachero
b9dad2286e Assorted fixes to the menu navigation
This patch brings in some fixes to the menu navigation (like some
"Main Menu" buttons not bringing to the main menu and some erratic
behavior when pressing ESC) and puts a new "Main Menu" button
in the search results dialog.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-02-05 13:48:03 +00:00
mauro.giachero
02e0d19060 Updates: make the progress bar interruptible with ESC
Add a simple non-blocking read-alike function and use it to check
whether the user pressed ESC during the updates.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-02-05 08:10:12 +00:00
mauro.giachero
ef8c8602fa Apply slakmagik's misc (cleanup) patch
This patch cleans up the code, removing some useless parts
and fixing some style issues (some user-visible).
Many thanks are again due to to slakmagik for his continuous
efforts in improving sbopkg!

Signed-off-by: slakmagik
Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-02-05 08:09:51 +00:00
mauro.giachero
5a7e20a146 Search: apply slakmagik's search_string patch
This patch adds the ability to search applications' READMEs
for specific words, also using regular expressions.
Many thanks to slakmagik for implementing this in the first place
and for his efforts in addressing the minor problems affecting
earlier versions of the code.

Signed-off-by: slakmagik
Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-02-05 08:09:42 +00:00
chess.griffin
ab38f5e12a modify ChangeLog-current.txt; also, I meant to change SQDIR to QUEUEDIR before committing r433 but forgot (I like more descriptive vars); make that change now 2009-02-03 03:49:01 +00:00
chess.griffin
08d85254d1 commit slakmagik's view_more_file patch that provides a means for the user to view other files in the repo, such as doinst.sh and .desktop files, adds a new sbopkg.conf variable, SQDIR, for 'saved queues directory' and provides a list of saved queues instead of asking the user to enter a filename; thanks to slakmagik for the patch; modified by Mauro and Chess 2009-02-03 03:38:44 +00:00
chess.griffin
fecac6f520 commit slakmagik's 'useless uses of cat' patch ;-); thanks to slakmagik for the patch and thanks to Mauro for some comments and modifications to it. 2009-02-02 20:22:48 +00:00
chess.griffin
11192d71f0 tag and release 0.26.2 2009-01-31 02:08:12 +00:00
chess.griffin
35a005c7b4 fix regression where packages could not be installed in certain instances 2009-01-31 02:00:51 +00:00
chess.griffin
e287141392 fix filetype on ChangeLog-current and both man pages back to unix; not sure how those got switched to dos 2009-01-30 23:09:43 +00:00
chess.griffin
1f34ff46c3 tag and release 0.26.1 2009-01-30 22:07:32 +00:00
chess.griffin
30155b7ff5 fix issue where user would be told each individual update was added to the queue as it was added; also fix bug where sometimes search results would be duplicated in the search results dialog; thanks to Phillip Warner for both bug reports. 2009-01-30 04:34:45 +00:00
chess.griffin
1b25251101 modify sbopkg.conf and related man page regarding changing SLACKVER=12.2 to SLACKVER=12.2; thanks to TSquaredF for the suggestion 2009-01-30 04:18:27 +00:00
chess.griffin
780d64ff49 commit slakmagik's 'reassignment and convert to case' patch; also, implement a couple of security fixes, namely, customize the info_item and queue menus depending if user is not root (thanks to slakmagik for the original implementation of this), and also, do a couple of checks in install_package funtion, including checking that user is root and also that package to be installed has root:root permissions; thanks to Phillip Warner for raising these issues. 2009-01-30 03:43:33 +00:00
chess.griffin
e9213e6fd4 tag and release 0.26.0 2009-01-29 14:47:33 +00:00
mauro.giachero
0753b20302 Fix info_item $ARCH visualization
This patch fixes most of the problems with $ARCH visualization
in info_item.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-29 14:36:18 +00:00
chess.griffin
e41f94790f remove most of the remaining old commented out code 2009-01-28 17:30:23 +00:00
chess.griffin
08db2b3c1a clean up changes to check_write 2009-01-28 17:26:35 +00:00
chess.griffin
5e44f31e73 correctly test whether we are loading a queue so as to not show a done message after each one is loaded -- introduced in r400 and r401 2009-01-28 15:33:07 +00:00
chess.griffin
f80218a292 remove UPDATELIST-DEBUGGING; update TODO; remove reference to UPDATELIST-DEBUGGING from sbopkg(8) man page 2009-01-28 14:49:17 +00:00
chess.griffin
4a6a0825e9 list sbopkg-renames in sbopkg(8) man page; minor ChangeLog-current.txt edits 2009-01-28 14:43:31 +00:00
chess.griffin
c093887f28 add simple check for sbopkg-renames 2009-01-28 14:25:55 +00:00
mauro.giachero
160ad59fad Properly manage sbopkg-renames on install
Since the sbopkg-renames is just another configuration file,
give it the .new extension and manage it on installation.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-28 12:56:23 +00:00
mauro.giachero
7a23a7cf8c Print MD5 sums on failures
Print the obtained and expected MD5 sums on mismatch.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-28 12:56:12 +00:00
mauro.giachero
157991f117 Allow users to use sbopkg without a global configuration file
This patch allows users to run sbopkg even without the global
configuration file, or when it doesn't contain all the required
variables, as long as the ~/.sbopkg.conf file is available and
complete enough to fill the gaps.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-28 12:56:04 +00:00
chess.griffin
ff2d6ef940 remove commented out code in queue_menu and utilities_menu 2009-01-27 19:48:08 +00:00
chess.griffin
59bfe8bf28 remove old commented out code replaced by new add_item_to_queue function. 2009-01-27 19:43:11 +00:00
chess.griffin
221ca87dfb remove old browsing code: get_category_items_list and browse_items 2009-01-27 19:19:48 +00:00
chess.griffin
fedbca2b32 say goodbye to old update code :-) 2009-01-27 19:16:05 +00:00
chess.griffin
b5789a4b57 work on the delete queue; fix sed expression removing ON or OFF b/c it was causing some strangeness from time to time; also, redo the commit where nothing displayed if user presses 'Done' without making any changes 2009-01-27 17:35:14 +00:00
chess.griffin
f5b861fea9 extend last commit to backup queue i.e., do not prompt for each pkg in backup queue as it is loaded; do not tell user items were deleted from queue if nothing was deleted; make the backup silent; update for-next-release 2009-01-27 16:49:43 +00:00
chess.griffin
58d38b7dec do not prompt user after each individual app is added to the queue when loading a saved queue (but still provide this feedback for single additions to the queue from info_item or search results; also, do not ask user if they want to keep or delete queue when doing a single build; thanks to alkos333 for the suggestion on the former. 2009-01-27 16:29:02 +00:00
mauro.giachero
0a7c217a08 Delete queue: make better use of 'sed'
Make delete_build_queue() use 'sed' the right way instead
of doing an "approximate" first pass and a second "fix-up"
patch.

Many thanks to slakmagik for pointing out the issue and
for providing the right regular expressions. Also, my
sincere apologies for crediting him as "jsunx1" in some
previous commits.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-27 15:53:58 +00:00
mauro.giachero
66d1ecb5de Update list: show progress indicator
Show a nice progress indicator instead of a "please wait"-style message.
The code containg a CLI implementation of a progress bar, and a gateway
function choosing between the "dialog" and the "cli" version depending
on whether we're using ncurses. The code should also be generic
enough to be reused whenever another gauge comes handy.

Many thanks to alkos333 for the idea and for the "dialog" implementation.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-27 15:53:47 +00:00
chess.griffin
6474e2de71 update contributors - fix João's name and add TSquaredF 2009-01-27 04:16:42 +00:00
chess.griffin
5a6df761a0 show BUILD in prechecklog; change 'ERROR' to 'WARNING' when app is already in the queue; update for-next-release 2009-01-27 03:40:58 +00:00
chess.griffin
6ca876b4ad fix segfault when selecting 'Main Menu' from the info_item menu 2009-01-27 03:06:19 +00:00
chess.griffin
dd1bcc81fe clean up queue and utilities menu functions so they are like the main menu function; there are still other menus that need to be cleaned up like this. 2009-01-27 02:33:05 +00:00
chess.griffin
ac2acef76c Comment out the 'Exit sbopkg' from main menu and shorten it by 1; use <Exit> button to exit sbopkg 2009-01-27 02:07:10 +00:00
chess.griffin
d9ae15df75 first crack at fixing issue where failed download would still attempt a md5sum check; correctly remove the temporary backup queue; fix issue where the local/original slackbuild/.info would display twice 2009-01-27 01:41:09 +00:00
chess.griffin
eb8d12c105 fix issue where more than one build option/flavor would cause the options dialog to not load; thanks to TSquaredF for the bug report 2009-01-26 19:28:51 +00:00
chess.griffin
09ade47410 minor word changes and small resizing of some menus 2009-01-24 18:54:24 +00:00
chess.griffin
2e2694f309 add test for DEBUG upon startup 2009-01-24 16:12:12 +00:00
chess.griffin
4e71a3c264 futher tweaks to the ck_dir function to improve readability; fix a typo while I am there. 2009-01-24 15:40:47 +00:00
chess.griffin
a8f802ba32 re-fix artwiz by adding all three artwiz language to sbopkg-renames; update ChangeLog-current.txt 2009-01-24 14:03:40 +00:00
chess.griffin
340d31e43a fix minor typos etc. 2009-01-24 04:42:10 +00:00
chess.griffin
f126a461e1 inform user which .info and SlackBuild are being used in the prechecklog 2009-01-24 03:57:37 +00:00
chess.griffin
7baa04f4b9 change check_write so it functions similarly to has_root 2009-01-24 03:37:22 +00:00
chess.griffin
14cc6fe331 back out double info_item menu; hide 'permission denied' message when testing via touch whether a sbopkg dir is writable, since we tell the user that anyway; minor message tweaks. 2009-01-23 21:20:57 +00:00
chess.griffin
d911a10706 test if local repo is empty before browsing and display an error message if it is. 2009-01-23 20:19:29 +00:00
mauro.giachero
3c9b3d9742 Fix slack-desc parsing regression from r361
Prior to r361, there were two places where the slack-desc
was parsed: in the "package browser" and in the "search
results". r361 tossed most of the "package browser" code,
including that part.
It happens that the two implementation were different,
and of course the removed one was the better of the two.
This patch applies a further improved implementation to
the current code.

Thanks to "jsunx1" for providing the original
implementation and for pointing out the regression.
Thanks to Chess Griffin for preparing and sending me
a patch restoring the old behavior.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-23 16:12:36 +00:00
mauro.giachero
f5af902be3 Rework the Original/Local selection code
Clean up the Original/Local selection code a
little, removing an useless loop and making
"Local" the default choice.
Thanks to "jsunx1" for raising the issue and
providing a partial implementation.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-23 16:12:26 +00:00
mauro.giachero
15d6f98acf Remove artwiz-aleczapka from sbopkg-renames
I don't know what was the problem with this, but
I haven't found indication of a rename in the
slackbuilds.org mailing list or in the repository
itself.
For this reason, remove it from the sbopkg-renames
file.
Note that I still don't know the reason for the
old quirk, removed by r333.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-23 16:12:17 +00:00
mauro.giachero
ef793216cd Rework the main menu
Rework the main menu to reduce complexity and code
replication.
Thanks to "jsunx1" for suggesting this and for providing
a similar implementation.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-23 16:12:07 +00:00
mauro.giachero
0fcf52265b Validation: revert r365 and do it properly.
The implementation of r365 has some major problem,
deleting the permanent log being the most user-visible.
Undo that crud and do the checks in a proper way.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-23 16:11:57 +00:00
chess.griffin
a4ff19fadc revise PAGER fix for show_readme; thanks to slakmagik for the suggestion; remove the 'warning' before running an update check -- adds an unnecessary step and the point about the update debugging really is not relevant anymore. 2009-01-23 00:07:37 +00:00
chess.griffin
f856f309b8 remove minor cruft; mark old code as FIXME for future deletion 2009-01-22 22:30:49 +00:00
chess.griffin
7e2c041fd9 commit modified patch from slakmagik re: converting case of KEEPLOG and testing its value before showing the permanent log in dialog; fix some issues in the 'delete items from queue' where empty/blank lines would end up in the queue, messing things up; since PIDFILE is now set locally, use full name in cleanup function. 2009-01-22 21:34:22 +00:00
mauro.giachero
75c087660c Validate the files/folders specified in sbopkg.conf
Make sure that the files and folders specified in the
configuration file can be created/accessed, and create
the directories if required.
This also fixes some bugs, such as the log not being
created if the LOGFILE specifies a nonexistent directory.
Thank to Alex for pointing this problem out.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-22 16:45:39 +00:00
mauro.giachero
459c36864a Downloads: implement proper URL hex substitution.
Remove the old code for replacing hex codes in URLs
(like %2B for '+') and add a generic code replacing
any %xy sequence with the proper character.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-22 16:45:29 +00:00
mauro.giachero
102d89c316 Updates: fix confirmation dialog ESC behavior
The "check for updates" confirmation dialog should
abort checking when the user presses ESC.
Thanks to Alex for reporting the issue.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-22 16:45:19 +00:00
mauro.giachero
166fe433e6 Use line matching with grep.
Use the "-x" option with grep, instead of using "^$"
in the regular expression.
Thanks to Slakmagik for pointing this out.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-22 16:45:10 +00:00
mauro.giachero
6bca567933 Package browser: use the search infrastructure
A lot of the package browser code replicates the search
functionality.
This patch extends the search infrastructure a bit and
uses that for browsing, too.
Many thanks to Chess for point out the major problems
affecting earlier releases of this patch.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
Signed-off-by: Chess Griffin
2009-01-22 16:45:00 +00:00
mauro.giachero
cd1f6aa495 pid_check: verify older PID's existence.
If $PIDFILE exists, verify whether it refers to a running
process. This way the amount of false positives is greatly
reduced, which is a good thing during development when
a crash can terminate sbopkg leaving the $PIDFILE in place.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-22 11:28:16 +00:00
mauro.giachero
52cbcbcbde Fix directory creation.
Remove a stale "exit" introduced by r354, causing sbopkg
to exit whenever a new directory is created.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-22 11:28:06 +00:00
chess.griffin
acf87ceed2 commit patch from slakmagik that improves the handling of the creation of sbopkg-related directories; fix two issues found in recent patches - line split in show_readme broke PAGER; also, incorrect dialog labeling in remove_sources caused that function to fail. 2009-01-22 03:21:43 +00:00
chess.griffin
06c03ecfdc commit patch from slakmagik that improves the checking of root privileges and how error messages related to not having root privileges are handled; thanks to slakmagik for the patch. 2009-01-22 03:03:51 +00:00
chess.griffin
0ab309ea81 commit patch from slakmagik that tweaks the precheck log a bit 2009-01-22 01:32:00 +00:00
chess.griffin
8b4c2e1f19 commit patch from slakmagik that brings user straight back to search box if search fails 2009-01-22 01:29:47 +00:00
chess.griffin
5cb04eb9a8 fix issue where downloaded sources with a space would fail md5sum check (GNOME-Colors, for example); also fix issue with erroneous check for empty_queue when using -b or -i from cli. 2009-01-22 01:26:46 +00:00
chess.griffin
8d4fba2225 a few minor tweaks to some comments; clarify that deleting all items from queue cannot be undone; fix issue in save_user_queue where the queue was sorted, it now just copies the TMPQUEUE to the USERQUEUE. 2009-01-21 13:45:24 +00:00
mauro.giachero
61268e5344 Fixes to delete_build_queue.
Fix the following bugs:
- "dialog" segfaults when asked to display an empty
  menu, so avoid that
- the "empty queue" test is done checking the existence
  of $TMPQUEUE, not its content. For this reason,
  delete $TMPQUEUE if it only contains whitespace.
Also, declare some variables as local.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-21 11:45:43 +00:00
mauro.giachero
f2c618b8e9 Fix view_queue selection with overlapping names.
Fix view_queue selection with packages whose name is the initial
part of another package name (e.g. "libbonobo" and "libbonoboui").

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-01-21 08:33:45 +00:00
chess.griffin
97ae2a37a6 provide error msg if trying to run updates when using LOCALREPO/local directory 2009-01-21 04:59:28 +00:00
chess.griffin
34689ae6f5 tweak sbopkg.conf(5) man page 2009-01-21 03:20:40 +00:00
chess.griffin
1987c6fd26 edit both man pages about /local directory; other minor nits 2009-01-21 03:18:39 +00:00
chess.griffin
91ca26e6c3 modify sbopkg.conf for LOGFILE; other cleanups in same man page 2009-01-21 03:09:26 +00:00
chess.griffin
54fda65ea5 add support for /home/sbo/local; check if SLACKVER is 'local' before trying to do rsync. 2009-01-21 03:01:37 +00:00
chess.griffin
ee51ae0328 add in new sbopkg-renames file which is needed for Mauro's update code. 2009-01-21 01:19:39 +00:00
chess.griffin
3707f1a3cf use new add_item_to_queue function when backup queue is loaded or when user's saved queue is loaded. 2009-01-21 01:05:19 +00:00
chess.griffin
59ef49e159 merge in two patches from slakmagik that allow the user to maintain (and retain between rsyncs) an optional /local/ directory in the local SBo repo tree where the user could have other SlackBuilds created and maintained locally in the SBo style; also, second patch introduces LOGFILE sbopkg.conf variable, which allows the user to set the name and location of the permanent build log; thanks to slakmagik for these two very nice additions. 2009-01-21 00:55:00 +00:00
chess.griffin
da2fa378f7 only check empty_queue in process_queue when BUILDPKGS=1 2009-01-20 22:49:56 +00:00
chess.griffin
db57b92f08 add initial implementation of new delete_build_queue instead of clear_build_queue; this function allows user to remove individual items from queue or delete the whole queue; there are probably other/better ways to do this but this is a first crack at it. 2009-01-20 22:13:13 +00:00
chess.griffin
1a4afd58da modify add_item_to_queue so the three arguments passed to it are APP, VERSIONBUILD, and ONOFF, which make it possible to send the results of the sbopkg-update-queue to this new function for processing 2009-01-20 04:58:06 +00:00
chess.griffin
0d89a29fa0 merge in Mauro's new update code. 2009-01-20 04:38:16 +00:00
chess.griffin
17a05947c2 minor tweaks to add_item_to_queue. 2009-01-20 04:09:42 +00:00
chess.griffin
736b669f67 add two calls to the new add_item_to_queue function, one in the info_item menu (where users add individual items) and in the search results dialog; also add in the code to add_item_to_queue that replaces APP if the user so chooses. 2009-01-20 04:03:06 +00:00
chess.griffin
a2654dd298 fix a few things in add_item_to_queue 2009-01-20 03:39:51 +00:00
chess.griffin
2578c33894 minor whitespace fix; add a new 'add_item_to_queue' that will be a function called from several places -- it takes APP and VERSIONBUILD as arguments, and then tests to see if APP is already in the queue; if not, add it; if so, then ask user if they want to replace or skip. See the comment to this function for more info. This function is not finished and is not called anywhere yet. 2009-01-20 03:35:45 +00:00
chess.griffin
4c37d528ee create an 'empty_queue' function to test if TMPQUEUE is empty since that is done in several places, and then in those other places, just test the return of empty_queue; bring in initial code in the view_queue function where deselecting an item in the queue changes it status from ON to OFF and does not remove it from queue; still need to implement a way to remove items from queue -- maybe turn the 'clear queue' menu item into another checklist where folks can remove individual items or clear the queue. 2009-01-20 03:20:12 +00:00
chess.griffin
da9511b197 commit a large whitespace patch, which does several things, including adding the 'crunch' functions to eliminate extra spaces, reformats the entire script around 78 columns, and improves the formatting of functions and comments; thanks to slakmagik for the patch. 2009-01-20 02:16:19 +00:00
chess.griffin
793ad8511c apply alternate usage patch from slakmagik -- this uses EOF to create the -h help information rather than a bunch of echo lines. 2009-01-18 20:01:09 +00:00
chess.griffin
be7b5f75a1 tag and release 0.25.0 2009-01-17 02:35:02 +00:00
chess.griffin
c1d9f5a0bb revert a minor change to the size of a dialog. 2009-01-17 02:13:46 +00:00
chess.griffin
7e6349b150 add menu item and function to clear build queue. 2009-01-17 02:04:09 +00:00
chess.griffin
9ed8e475c9 tweak how the temporary backup queue is managed; now it is removed automatically whether the user loads it or not. 2009-01-17 00:33:18 +00:00
chess.griffin
f777578f0f forgot to add one change to the check for path code 2009-01-16 21:23:07 +00:00
chess.griffin
7307d03a63 apply another patch from slakmagik to quiet down some more of the junk appearing with certain 'ls' calls; also, add in test for a pathname when user enters the name of the queue to load or save. If no path is detected, then default to save the user's queue in TMP (/tmp/SBo). 2009-01-16 21:11:18 +00:00
chess.griffin
e8d38048a0 apply two patches from slakmagik that fix a variable test, clean up and fix some the slack-desc information capture, and change the updatelist view from cat to PAGER when using the cli; also, add in a few minor tweaks that attempt to avoid the brief junk seen at the bottom of the screen when moving around the dialog interface; there are still a couple of these left, but this fix gets rid of some of it. 2009-01-16 20:03:07 +00:00
chess.griffin
3447f86f3d move check for backup to when queue submenu is first accessed; show a message when quitting sbopkg about the automatic backup. 2009-01-15 20:22:00 +00:00