Giter Club home page Giter Club logo

hoorex's People

Contributors

cwilling avatar drgibbon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

drgibbon

hoorex's Issues

bad targets

Deal with bad package names at command line. Currently we just fail and show backtrace.

Filter output to display only those pkgs from input list

Sometimes I just want an ordering of the packages I input to hoorex i.e. no info about other packages possibly related by some dependency to those in the original list.

NB. somewhat similar filters already exist: -I & -i options restrict output to packages already installed on the system.

Reqirement for pyxdg

Could we do without pyxdg package as a prerequisite to run HooRex? It would make HooRex much more self-contained without it ...

Seems to not work with packages that have a dash (-) in the name.. Seems to have been a problem with the cache..

Examples:

$ ./hoorex -r ttf-mscorefonts -d
DEBUG: VERBOSE mode set at command line
DEBUG: Set sbo_path to /home/aaditya/slackbuilds from config file
DEBUG: sbo_path: /home/aaditya/slackbuilds
DEBUG: Loading existing repo data
DEBUG: PkgData loaded from file OK
DEBUG: Processing initial targets of: []
DEBUG: REVERSE mode set at command line
DEBUG: [[]]
$ ./hoorex -r cantarell-fonts -d
DEBUG: VERBOSE mode set at command line
DEBUG: Set sbo_path to /home/aaditya/slackbuilds from config file
DEBUG: sbo_path: /home/aaditya/slackbuilds
DEBUG: Loading existing repo data
DEBUG: PkgData loaded from file OK
DEBUG: Processing initial targets of: []
DEBUG: REVERSE mode set at command line
DEBUG: [[]]

Tried with 0.5.6 as well as git version.

Edit user config

There's no internal mechanism for editing the user's default configuration; just manual editing of their defaults.cfg file. Probably want something like:
hoorex -c|--configure key=value
It would need some validation component i.e. is it a valid key? is it a valid value?

deptarget = prereqs

Hi,
when running with DEPTARGET=PREREQS only .info-files with a PREREQS= line are considered when running build_dicts().
I'm not sure if this is intended behaviour, is it?

Reproduction:
on a new SBo repo run "hoorex -d -f". Around 2000 packages are found.
Running "DEPTARGET=PREREQS hoorex -d -f" results in zero packages.
Now add a PREREQS-line to any package and re-run the above command.

Patch:

diff --git a/hoorex b/hoorex
index 0829d69..06c15a2 100755
--- a/hoorex
+++ b/hoorex
@@ -353,6 +353,20 @@ def build_dicts(sbo_path, PkgData, deptarget='REQUIRES'):
                             DirectRequires[pkgname].remove('%README%')
                         except:
                             pass
+                    else:
+                        n = reg_requires.search(txt)
+			if n:
+                            value = ''
+                            if n.group('value'):
+                                # Remove line continuation backslashes
+                                value = n.group('value').replace('\\', '')
+                            hlog.debug("Adding %s ----- (%s)" % (pkgname, value))
+                            PkgCategory[pkgname] = category
+                            DirectRequires[pkgname] = value.split()
+                        try:
+                            DirectRequires[pkgname].remove('%README%')
+                        except:
+                            pass
 
     #print
     hlog.debug("Step 1 done - %d entries" % len(DirectRequires))

This works for me so far, but I didn't test it in depth.

And maybe it is possible to set the repoData filename and PREREQS==True from the config file? So we can have two config files, one with prereqs and one without them. I have to admid, I'm not sure if this would be useful.

Thanks for the tool and enjoy the weekend :)
Dennis

Can't write initial configuration as root

[root@raymonde:~] # hoorex lame
Traceback (most recent call last):
File "/usr/bin/hoorex", line 427, in
main()
File "/usr/bin/hoorex", line 32, in main
default_config = load_user_config()
File "/usr/bin/hoorex", line 372, in load_user_config
with open(config_file, 'wb') as configfile:
IOError: [Errno 2] No such file or directory: '/root/.config/hoorex/defaults.cfg'

Output to file

Do we need a "write to file" option? Its easy enough to redirect stdout without a dedicated option.

--long output in pipeline

Using --long output in any but last stage of pipeline fails because sorting expects just a list of package names, not list of category/package

Different dependency targets

We calculate dependencies using the REQUIRES field in packages' .info files. In some repos the .info files may be enhanced with fields to describe different dependencies. We should be able to determine the dependency relationships with these differently named fields. A command line option backed by configuration setting for this is easy enough (build_dicts already has a karg deptarget='REQUIRES' so that the caller could specify a different deptarget).

The main problem is when the new field used in the .info fields includes a $REQUIRES entry i.e. it normally relies on shell expansion. Since we don't use shell to decipher the .info files, we'd have to do that ourselves.

Relax unknown package names

At the moment we log as critical any input package names that are unknown i.e. not from the SBo repo, and then exit. How about being more relaxed about this - just ignore it and carry on. Perhaps some option to enforce strictness though ..

Configurable groups for input

We have ready for next release some predefined groups that can used as input, rather than having to itemize some large list on the command line, using the new -g|--group option. The groups that HooRex know about are all the SBo software categories (audio, libraries, system etc.) as well as the "all" group i.e. everything in the repository. So 'hoorex -g desktop' means to use all the package names in the desktop category as input.

The predefined groups are probably more cute than useful; what might be really useful is if the user could define their own groups e.g. 'hoorex -G mine="abc uwh kfj ... jfdh" in which "mine" would be the group name and abc, uwh, kfj, some more pkgs and jfdh would be the package names in the group. We could save that in the user's configuration so they could always run "hoorex -g mine" to process all the packages in the mine group.

Or, is it sufficient that since we can have package names taken from stdin, the user could just make a file with the packages of interest and then do "hoorex < package_list_file.txt"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.