Commit graph

533 commits

Author SHA1 Message Date
slakmagik
239b2b1489 add split_pkg_name() to function-alize the acquisition of package name
components, using it in check_for_updates() and add_all_to_queue() and
changing the declared and used variables to suit - also
reformatting/reindenting a few lines, correcting a couple of typos, and fixing
the variable declarations of info_item() along the way - thanks to Mauro and
Chess for review and suggestions.
2009-05-30 02:41:52 +00:00
chess.griffin
8f3a0e6960 update ChangeLog-current.txt 2009-05-29 16:55:23 +00:00
chess.griffin
57fefa0da2 add several new functions for checking the SBo GPG-signed tarballs both during the build/install process as well as manually in the info_item menu; tweak the layout of the build logs just a little bit; other misc. little fixes when dealing with exiting the queue. 2009-05-29 16:35:25 +00:00
chess.griffin
26fc3f6ebe add a regex fix to remove some double quotes; also split the regex's out into separate lines for easier reading; thanks to Mauro and slakmagik. 2009-05-28 20:54:34 +00:00
chess.griffin
c2c7cb1442 I keep forgetting to commit this little fix 2009-05-28 19:45:48 +00:00
mauro.giachero
8b681ae0b3 remove_obsolete_sources(): make the progressbar interruptible.
Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-28 10:19:13 +00:00
mauro.giachero
cfdf6ac7be add_*_to_queue(): general improvements.
This patch implements the renames checking for
add_item_to_queue(), thus enabling the use of obsolete
names in legacy queues.
That function can fail if the used name cannot be found.
For that reason, check its return status where appropriate
to properly report such errors to the user.
While at it, improve the add_all_to_queue() interface.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-28 10:18:59 +00:00
chess.griffin
c9b022f774 change 'kill' to 'kill -9' PID when changing repositories; this seems to fix a dialog breakage I was experiencing when switching back and forth between SBo and Slamd64 repos 2009-05-27 01:01:27 +00:00
chess.griffin
efef808176 update ChangeLog-current.txt 2009-05-26 14:50:54 +00:00
chess.griffin
f975490582 add a new 'add_all_to_queue function in the queue menu that allows a user to dump all installed packages into the queue; also delete two leftover references to BACKUPQUEUE_LOCK which were part of a function removed wtih r590. 2009-05-26 14:12:01 +00:00
mauro.giachero
74de95eee3 Avoid an error spitting exiting sbopkg with empty queue.
Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-26 12:23:48 +00:00
mauro.giachero
c8b479507a Scattered minor cleanups.
Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-26 09:05:49 +00:00
mauro.giachero
2b553679e8 Tweak info_item()
Cleanup and tweak info_item():
- the code to detect already available packages in $OUTPUT
  is now more robust and readable;
- the code to determine already installed versions of the
  package is now more robust and readable;
- the "Installed:" line now also lists non-SBo packages
  (this is useful for Slackware-current users, as well as
  for people using non-SBo third-party packages)
- the window title now also shows the package tag, to
  remove some ambiguity (e.g. as of now, Slackware-current
  has a libzip package with the same "signature" as the
  SBo one, and from the info_item() dialog it looks like
  they are the same package when in fact they are not).

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-26 09:05:38 +00:00
chess.griffin
d21b989c27 tweak all repos.d/* and renames.d/* files to make comments consistent. 2009-05-26 03:47:06 +00:00
chess.griffin
0b0335e657 edit renames.d and repos.d files and set Id propset on all 2009-05-26 03:35:12 +00:00
slakmagik
f3b635a3aa comment stripcom() and make the variable name consistent with others 2009-05-25 17:03:37 +00:00
chess.griffin
c5af8e5f24 remove two stale commented out lines 2009-05-25 16:17:35 +00:00
chess.griffin
f80edb7aef change KEEPLOG test to fit other similar tests 2009-05-25 04:36:57 +00:00
chess.griffin
ec2663e653 more sbopkg.conf.5 tweaks 2009-05-25 03:21:25 +00:00
slakmagik
fc84284c3d add stripcom() and use it in save_user_queue() to make sure we're only
comparing relevant things when deciding whether to save the queue on exit
2009-05-24 20:57:04 +00:00
chess.griffin
09664bf11d fix typo in sbopkg.conf.new and tweak it a bit 2009-05-24 20:43:57 +00:00
chess.griffin
f9bbe5ed36 update sbopkg.SlackBuild to include README-queuefiles 2009-05-24 19:38:56 +00:00
chess.griffin
0f3a1941e3 add ARCH explanation to sbopkg.conf.new 2009-05-24 19:30:08 +00:00
slakmagik
7a67084d2b fix issue with build_package()'s return code getting swallowed up in a pipe 2009-05-23 17:57:19 +00:00
chess.griffin
bee4c7c760 update ChangeLog-current.txt 2009-05-23 04:58:28 +00:00
chess.griffin
749d776734 add exported ARCH to sbopkg.conf.new 2009-05-23 04:56:20 +00:00
chess.griffin
dfa5bd29ce add propset keywords to README-queuefiles and README-repos.d 2009-05-23 04:49:46 +00:00
chess.griffin
65feae6ed3 add README-queuefiles to /doc directory. 2009-05-23 04:44:05 +00:00
slakmagik
8fdf2e1361 fix vim modeline 2009-05-22 21:21:52 +00:00
chess.griffin
4a88fc9f65 add ability to build/install more than one queuefile from cli, e.g. $ sbopkg -b 'queue1 queue2' 2009-05-22 20:16:30 +00:00
chess.griffin
0dd4a6a668 modify queuefile format so now queuefiles are simply one 'APP' per line; deselected apps can be be indicated by prepending a '-' in front of the APP name, such as '-APP'; this should make using and sharing queuefiles easier and more intuitive; also update ChangeLog-current.txt 2009-05-22 14:33:29 +00:00
mauro.giachero
cf5963a290 search_package(): do not leak $PKG.
Before this patch, search_package leaked $PKG and in some
places the code actually made use of that. Since $PKG is the
unmodified first parameters of the function, there's really
no need to use the leaked value -- just use whatever was
put as first argument to the call.
As a side effect, probably some cosmetic bug got fixed,
since $PKG was also used in odd places.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 16:35:11 +00:00
mauro.giachero
d789a128e8 Invert can_skip_line() return value logic.
Code reading suggests that if "can_skip_line $FOO" is true,
the line can be skipped. Unfortunately, the code acts
backwards (if the function returns 0, the line _can't_ be
skipped).
Invert the function return logic so to make the code less
confusing.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 16:34:59 +00:00
mauro.giachero
b43772cb7a Remove load_backup_queue().
This function is unused since a long time, and likely won't
be used anytime soon, so delete it.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 16:34:46 +00:00
mauro.giachero
77534078e3 Do not use the ARCH variable.
ARCH is a special name for SlackBuilds, and it will get even
more important now that Slackware is going to support x86_64.
This patch makes sure sbopkg doesn't use it internally any
more.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 16:34:34 +00:00
mauro.giachero
cf78790cc0 git support: add ChangeLog.txt.
Since git repositories track the whole history of a project,
there's no point in maintaining a change log for them. Sbopkg
expects one nevertheless, since it's historically rsync
oriented.
This patch adds the little code needed to automatically
generate a meaningful ChangeLog.txt from the project history.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 16:34:21 +00:00
mauro.giachero
30ad5a995d Fix '-s' command line switch.
The '-s' switch got broken, mainly because it used "leaking"
variables. Give it a proper interface, and use that.
Also, properly check for search failures.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 16:34:09 +00:00
chess.griffin
e3421a6bd5 update ChangeLog-current.txt 2009-05-21 13:24:50 +00:00
mauro.giachero
9ee548f2c3 Refactor get_source() a bit.
Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:51:04 +00:00
mauro.giachero
1d47dfab92 Rework source checking.
David Spencer reported on the ML that the current sbopkg
behavior of checking the MD5 only just after the download
breaks some (bad) applications, like Google Earth, which
don't change the source file name on version upgrades.

This patch puts an additional check for existing sources,
so to workaround this issue (at the expense of extra MD5
checks for all other good applications). Moreover, add an
option to retry the download, which comes handy with the
aforementioned bad applications since otherwise the user had
to start the build twice (the first time he sees a failed
MD5 check and has the option to delete the downloaded file,
and the second time the source gets downloaded again).

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:08:01 +00:00
mauro.giachero
50c293ff1e Fix queue processing.
Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:07:51 +00:00
mauro.giachero
da958c527d Improve file cleanup for search-related functions.
This patch revisits some cleanup path, and makes sure that
the temporary files are deleted where appropriate.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:07:40 +00:00
mauro.giachero
d8a74980be Cleanup gen_search_package().
This patch replaces some wrong 'continue' statements with
'return 0' (which is functionally equivalent on all call
sites), merging some of them at the end of the function.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:07:30 +00:00
mauro.giachero
a24462f13f Use return values to implement the jump back to the main menu.
sbopkg 'touch'es a file (sbopkg_return_main_menu) to track
that the user asked to jump back to the main menu from a
"deep" menu level (such as info_item).
This patch converts it to the usage of function return values,
which makes the code smaller and easier to read.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:07:19 +00:00
mauro.giachero
31ce00b3d1 Sanity check $SBOPKGTMP.
Since we do many file operations in $SBOPKGTMP, including
some 'rm -rf', check its content on startup to make sure no
user files are mistakenly in there.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:07:09 +00:00
mauro.giachero
bd057d45e4 Cleanup {edit,delete,pick}_local_{info,SlackBuild}() and more.
This patch removes some code duplication and modifies some
detail about the EDITOR, PAGER and HAS_NCURSES variables.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:06:57 +00:00
mauro.giachero
b4cef20b18 Add the museek-plus->museek+ rename.
Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
2009-05-21 08:06:46 +00:00
chess.griffin
5da74910d6 enforce '.sboq.' extension to queuefiles; also, if argument passed at cli is the name of a queuefile and a package, ask user which one he wants to use 2009-05-20 12:51:16 +00:00
chess.griffin
c39e7e2b1b fix typo to man page 2009-05-18 19:40:28 +00:00
chess.griffin
cb8eb52669 update both man pages; these man pages might need more tweaking but there were a couple of things I had been wanting to fix/update in the meantime 2009-05-18 19:38:20 +00:00